Skip to content
Cirrus home
Sign in

Reference

Deployments

Run a strategy on paper or live accounts, then pause, stop or take it live.

Read the guide first

List a strategy's deployments #

GET /v2/strategies/{strategy_id}/deployments scope read

The strategy's deployments, newest first.

Parameters

  • strategy_id path · string required

    Strategy id.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

404strategy_not_found

No automated strategy with this id for the caller.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v2/strategies/<strategy_id>/deployments" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": [
    {
      "id": "01M59F60KTGB8Z8KZN7YD3NPGJ",
      "strategy_id": "01M59F60KBWPK7TJJEQJXB3CME",
      "strategy_name": "NIFTY manual straddle",
      "version": 1,
      "mode": "paper",
      "status": "active",
      "status_reason": null,
      "strategy_tag": "auto.01M59F60KTGB",
      "accounts": [
        {
          "account": "P1",
          "multiplier": 1
        },
        {
          "account": "P2",
          "multiplier": 2
        }
      ],
      "units": [
        {
          "account": "P1",
          "unit_id": "01M59F60KT01MG5H5YK26WE5MN",
          "status": "active",
          "status_reason": null
        },
        {
          "account": "P2",
          "unit_id": "01M59F60KTKBMX8KK1GDA493S3",
          "status": "active",
          "status_reason": null
        }
      ],
      "start_on": null,
      "end_on": null,
      "acknowledged": [],
      "compiled_hash": "sha256:93332f0feac143d79d9430ca8c247082ad8af7ca2820ba1492bc4af7a3c61937",
      "last_intent": {
        "action": "deploy",
        "exit_now": false,
        "at": "2026-10-19T06:57:00.028Z",
        "delivered": false
      },
      "engine_connected": false,
      "created_at": "2026-10-19T06:57:00.026Z",
      "updated_at": "2026-10-19T06:57:00.028Z",
      "stopped_at": null,
      "pnl": {
        "trading_day": "2026-10-19",
        "realized": 0,
        "unrealized": 0,
        "total": 0,
        "ltp_stale": false
      }
    }
  ],
  "error": null
}

Deploy a strategy #

POST /v2/strategies/{strategy_id}/deployments scope strategies

Runs a version (default: the latest, saving the draft as a new version first when it changed) on 1 to 4 accounts: paper (forward test on Paper accounts: live prices, simulated money) or live (live accounts; needs the strategies_live scope and the account's broker to be open for live deployments).

More about this

Refused when the version has blockers (422 not_deployable), when a warning that needs acknowledging (unlimited_loss) is not in acknowledge (422 acknowledgement_required), or at 3 running deployments. The intent is saved, then handed to the strategy engine: last_intent.delivered says whether it took it. Takes an optional Idempotency-Key.

Parameters

  • strategy_id path · string required

    Strategy id.

Body fields

  • mode string required

    One of: paper, live

  • accounts object[] required

    1 to 4 accounts; all paper (forward test) or all live.

  • version integer (int32) | null

    The version to run (default: the latest, saving the draft as a new version first when it changed).

  • start_on string | null

    First trading day (YYYY-MM-DD).

  • end_on string | null

    Last trading day (YYYY-MM-DD).

  • bindings object | null
  • acknowledge string[]

    Warning codes the user acknowledged (unlimited_loss).

Errors

HTTPCodeWhen
400malformed_json

The body is not JSON, or does not fit the request shape (unknown or missing fields, wrong types).

401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

403live_not_enabled

Live deployments need the strategies_live scope and a broker open for live automated strategies.

404strategy_not_found

No automated strategy with this id for the caller.

404version_not_found

No such version of the strategy.

404account_not_found

No linked broker account with this id for the caller.

409deployment_limit_reached

The most deployments that may run at once are running; stop one first.

422not_deployable

The strategy version cannot be deployed yet (a component or option not released, or an underlying not open); message says why.

422acknowledgement_required

A warning must be acknowledged to deploy (e.g. unlimited_loss): add its code to acknowledge.

422invalid_request

The request is well-formed but not valid; field names the input.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

POST
curl -X POST "https://cirrus.pocketful.in/v2/strategies/<strategy_id>/deployments" \
  -H "Authorization: token $CIRRUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "paper",
    "accounts": [
      {
        "account": "P1"
      },
      {
        "account": "P2",
        "multiplier": 2
      }
    ]
  }'
Response · 201
{
  "status": "success",
  "data": {
    "id": "01M574VKAX6MG5BY1HWXCDNNDJ",
    "strategy_id": "01M574VKA1TTA2BFREM70ZEB9D",
    "strategy_name": "NIFTY manual straddle",
    "version": 1,
    "mode": "paper",
    "status": "active",
    "status_reason": null,
    "strategy_tag": "auto.01M574VKAX6M",
    "accounts": [
      {
        "account": "P1",
        "multiplier": 1
      },
      {
        "account": "P2",
        "multiplier": 2
      }
    ],
    "units": [
      {
        "account": "P1",
        "unit_id": "01M574VKAXNYV06E6HEBZ5VV48",
        "status": "active",
        "status_reason": null
      },
      {
        "account": "P2",
        "unit_id": "01M574VKAXHVS1Y56YFHHSRT9D",
        "status": "active",
        "status_reason": null
      }
    ],
    "start_on": null,
    "end_on": null,
    "acknowledged": [],
    "compiled_hash": "sha256:93332f0feac143d79d9430ca8c247082ad8af7ca2820ba1492bc4af7a3c61937",
    "last_intent": {
      "action": "deploy",
      "exit_now": false,
      "at": "2026-10-18T09:18:04.130Z",
      "delivered": false
    },
    "engine_connected": false,
    "created_at": "2026-10-18T09:18:04.125Z",
    "updated_at": "2026-10-18T09:18:04.125Z",
    "stopped_at": null
  },
  "error": null
}

Get a deployment #

GET /v2/deployments/{deployment_id} scope read

One deployment with its units (one per account).

Parameters

  • deployment_id path · string required

    Deployment id.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

404deployment_not_found

No deployment with this id for the caller.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "id": "01M59F60KTGB8Z8KZN7YD3NPGJ",
    "strategy_id": "01M59F60KBWPK7TJJEQJXB3CME",
    "strategy_name": "NIFTY manual straddle",
    "version": 1,
    "mode": "paper",
    "status": "active",
    "status_reason": null,
    "strategy_tag": "auto.01M59F60KTGB",
    "accounts": [
      {
        "account": "P1",
        "multiplier": 1
      },
      {
        "account": "P2",
        "multiplier": 2
      }
    ],
    "units": [
      {
        "account": "P1",
        "unit_id": "01M59F60KT01MG5H5YK26WE5MN",
        "status": "active",
        "status_reason": null
      },
      {
        "account": "P2",
        "unit_id": "01M59F60KTKBMX8KK1GDA493S3",
        "status": "active",
        "status_reason": null
      }
    ],
    "start_on": null,
    "end_on": null,
    "acknowledged": [],
    "compiled_hash": "sha256:93332f0feac143d79d9430ca8c247082ad8af7ca2820ba1492bc4af7a3c61937",
    "last_intent": {
      "action": "deploy",
      "exit_now": false,
      "at": "2026-10-19T06:57:00.028Z",
      "delivered": false
    },
    "engine_connected": false,
    "created_at": "2026-10-19T06:57:00.026Z",
    "updated_at": "2026-10-19T06:57:00.028Z",
    "stopped_at": null,
    "pnl": {
      "trading_day": "2026-10-19",
      "realized": 0,
      "unrealized": 0,
      "total": 0,
      "ltp_stale": false
    }
  },
  "error": null
}

Pause a deployment #

POST /v2/deployments/{deployment_id}/pause scope strategies

No new cycles on any account.

More about this

An open trade keeps being managed by its own rules (stops, target, trailing, square-off): pausing never abandons a position.

Parameters

  • deployment_id path · string required

    Deployment id.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

403live_not_enabled

Live deployments need the strategies_live scope and a broker open for live automated strategies.

404deployment_not_found

No deployment with this id for the caller.

409deployment_finished

The deployment is stopped; deploy the strategy again to run it.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

POST
curl -X POST "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/pause" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "id": "01M574VKAX6MG5BY1HWXCDNNDJ",
    "strategy_id": "01M574VKA1TTA2BFREM70ZEB9D",
    "strategy_name": "NIFTY manual straddle",
    "version": 1,
    "mode": "paper",
    "status": "paused",
    "status_reason": "paused_by_user",
    "strategy_tag": "auto.01M574VKAX6M",
    "accounts": [
      {
        "account": "P1",
        "multiplier": 1
      },
      {
        "account": "P2",
        "multiplier": 2
      }
    ],
    "units": [
      {
        "account": "P1",
        "unit_id": "01M574VKAXNYV06E6HEBZ5VV48",
        "status": "paused",
        "status_reason": null
      },
      {
        "account": "P2",
        "unit_id": "01M574VKAXHVS1Y56YFHHSRT9D",
        "status": "paused",
        "status_reason": null
      }
    ],
    "start_on": null,
    "end_on": null,
    "acknowledged": [],
    "compiled_hash": "sha256:93332f0feac143d79d9430ca8c247082ad8af7ca2820ba1492bc4af7a3c61937",
    "last_intent": {
      "action": "pause",
      "exit_now": false,
      "at": "2026-10-18T09:18:07.185Z",
      "delivered": false
    },
    "engine_connected": false,
    "created_at": "2026-10-18T09:18:04.125Z",
    "updated_at": "2026-10-18T09:18:07.185Z",
    "stopped_at": null
  },
  "error": null
}

Resume a deployment #

POST /v2/deployments/{deployment_id}/resume scope strategies

New cycles again (a paused or errored deployment, once nothing blocks it: the engine checks).

More about this

After a safety pause (the circuit breaker tripped on an account) the body must acknowledge it: {"acknowledged": true}, else 422 acknowledgement_required with what the breaker saw. The body is optional otherwise.

Parameters

  • deployment_id path · string required

    Deployment id.

Body fields

  • acknowledged boolean

    Required (true) when the deployment was paused for safety (the circuit breaker tripped): you have looked at what happened.

Errors

HTTPCodeWhen
400malformed_json

The body is not JSON, or does not fit the request shape (unknown or missing fields, wrong types).

401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

404deployment_not_found

No deployment with this id for the caller.

409deployment_finished

The deployment is stopped; deploy the strategy again to run it.

422acknowledgement_required

A warning must be acknowledged to deploy (e.g. unlimited_loss): add its code to acknowledge.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

POST
curl -X POST "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/resume" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "id": "01M574VKAX6MG5BY1HWXCDNNDJ",
    "strategy_id": "01M574VKA1TTA2BFREM70ZEB9D",
    "strategy_name": "NIFTY manual straddle",
    "version": 1,
    "mode": "paper",
    "status": "active",
    "status_reason": null,
    "strategy_tag": "auto.01M574VKAX6M",
    "accounts": [
      {
        "account": "P1",
        "multiplier": 1
      },
      {
        "account": "P2",
        "multiplier": 2
      }
    ],
    "units": [
      {
        "account": "P1",
        "unit_id": "01M574VKAXNYV06E6HEBZ5VV48",
        "status": "active",
        "status_reason": null
      },
      {
        "account": "P2",
        "unit_id": "01M574VKAXHVS1Y56YFHHSRT9D",
        "status": "active",
        "status_reason": null
      }
    ],
    "start_on": null,
    "end_on": null,
    "acknowledged": [],
    "compiled_hash": "sha256:93332f0feac143d79d9430ca8c247082ad8af7ca2820ba1492bc4af7a3c61937",
    "last_intent": {
      "action": "resume",
      "exit_now": false,
      "at": "2026-10-18T09:18:07.257Z",
      "delivered": false
    },
    "engine_connected": false,
    "created_at": "2026-10-18T09:18:04.125Z",
    "updated_at": "2026-10-18T09:18:07.257Z",
    "stopped_at": null
  },
  "error": null
}

A deployment's journey #

GET /v2/deployments/{deployment_id}/journey scope read

Every step on every account, newest first: when, which account and cycle, what happened, what we did, what you should do (empty when nothing), and the broker's own words when a broker answered.

More about this

Paginated with cursor.

Parameters

  • deployment_id path · string required

    Deployment id.

  • cursor query · string

    next_cursor of the previous page.

  • limit query · integer

    1 to 200 (default 50).

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

404deployment_not_found

No deployment with this id for the caller.

422invalid_request

The request is well-formed but not valid; field names the input.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

503service_unavailable

A dependency is temporarily unavailable, or the feature is off on this server; retry later.

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/journey" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "entries": [],
    "next_cursor": null
  },
  "error": null
}

Stop a deployment #

POST /v2/deployments/{deployment_id}/stop scope strategies

No new cycles ever (terminal).

More about this

The open trade continues to its own exit, or with exit_now closes now, mains first and hedges last (live deployments then need strategies_live).

Parameters

  • deployment_id path · string required

    Deployment id.

Body fields

  • exit_now boolean

    Also close the open trades now, mains first and hedges last.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

403live_not_enabled

Live deployments need the strategies_live scope and a broker open for live automated strategies.

404deployment_not_found

No deployment with this id for the caller.

409deployment_finished

The deployment is stopped; deploy the strategy again to run it.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

POST
curl -X POST "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/stop" \
  -H "Authorization: token $CIRRUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "exit_now": false
  }'
Response · 200
{
  "status": "success",
  "data": {
    "id": "01M574VNTJ98VMM7TRKT5JCC0T",
    "strategy_id": "01M574VNQJB3KC6HMDBG6QDEHV",
    "strategy_name": "Timed",
    "version": 1,
    "mode": "paper",
    "status": "stopped",
    "status_reason": "stopped_by_user",
    "strategy_tag": "auto.01M574VNTJ98",
    "accounts": [
      {
        "account": "P1",
        "multiplier": 1
      }
    ],
    "units": [
      {
        "account": "P1",
        "unit_id": "01M574VNTJF2Z0CBAWNB2BBX14",
        "status": "stopped",
        "status_reason": null
      }
    ],
    "start_on": null,
    "end_on": null,
    "acknowledged": [],
    "compiled_hash": "sha256:c030cdecce518bdf50067237a17de0b5508d3e962e743a87dd41e7df3ef01ff9",
    "last_intent": {
      "action": "stop",
      "exit_now": false,
      "at": "2026-10-18T09:18:08.708Z",
      "delivered": false
    },
    "engine_connected": false,
    "created_at": "2026-10-18T09:18:06.674Z",
    "updated_at": "2026-10-18T09:18:08.708Z",
    "stopped_at": "2026-10-18T09:18:08.708Z"
  },
  "error": null
}

Exit open trades now #

POST /v2/deployments/{deployment_id}/exit-now scope strategies

Closes the open cycle on every account now, mains first and hedges last (the user's own instruction).

More about this

The deployment keeps running. Live deployments need strategies_live.

Parameters

  • deployment_id path · string required

    Deployment id.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

403live_not_enabled

Live deployments need the strategies_live scope and a broker open for live automated strategies.

404deployment_not_found

No deployment with this id for the caller.

409deployment_finished

The deployment is stopped; deploy the strategy again to run it.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

POST
curl -X POST "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/exit-now" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "id": "01M574VKAX6MG5BY1HWXCDNNDJ",
    "strategy_id": "01M574VKA1TTA2BFREM70ZEB9D",
    "strategy_name": "NIFTY manual straddle",
    "version": 1,
    "mode": "paper",
    "status": "active",
    "status_reason": null,
    "strategy_tag": "auto.01M574VKAX6M",
    "accounts": [
      {
        "account": "P1",
        "multiplier": 1
      },
      {
        "account": "P2",
        "multiplier": 2
      }
    ],
    "units": [
      {
        "account": "P1",
        "unit_id": "01M574VKAXNYV06E6HEBZ5VV48",
        "status": "active",
        "status_reason": null
      },
      {
        "account": "P2",
        "unit_id": "01M574VKAXHVS1Y56YFHHSRT9D",
        "status": "active",
        "status_reason": null
      }
    ],
    "start_on": null,
    "end_on": null,
    "acknowledged": [],
    "compiled_hash": "sha256:93332f0feac143d79d9430ca8c247082ad8af7ca2820ba1492bc4af7a3c61937",
    "last_intent": {
      "action": "exit_now",
      "exit_now": true,
      "at": "2026-10-18T09:18:07.334Z",
      "delivered": false
    },
    "engine_connected": false,
    "created_at": "2026-10-18T09:18:04.125Z",
    "updated_at": "2026-10-18T09:18:07.257Z",
    "stopped_at": null
  },
  "error": null
}

Take a forward test live #

POST /v2/deployments/{deployment_id}/go-live scope strategies

Creates a live deployment of the same version on the chosen live accounts (strategies_live scope; brokers open for live deployments).

More about this

The forward test keeps running alongside unless keep_paper is false. There is no go-live gate: the user decides.

Parameters

  • deployment_id path · string required

    The paper deployment.

Body fields

  • accounts object[] required
  • acknowledge string[]
  • keep_paper boolean | null

    Keep the forward test running alongside (default true).

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

403live_not_enabled

Live deployments need the strategies_live scope and a broker open for live automated strategies.

404deployment_not_found

No deployment with this id for the caller.

404account_not_found

No linked broker account with this id for the caller.

409deployment_finished

The deployment is stopped; deploy the strategy again to run it.

409deployment_limit_reached

The most deployments that may run at once are running; stop one first.

422invalid_request

The request is well-formed but not valid; field names the input.

422not_deployable

The strategy version cannot be deployed yet (a component or option not released, or an underlying not open); message says why.

422acknowledgement_required

A warning must be acknowledged to deploy (e.g. unlimited_loss): add its code to acknowledge.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

POST
curl -X POST "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/go-live" \
  -H "Authorization: token $CIRRUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accounts": [
      {
        "account": "Z1"
      }
    ],
    "keep_paper": false
  }'
Response · 201
{
  "status": "success",
  "data": {
    "id": "01M574VPR4P8457ZBFGSHJ4CRP",
    "strategy_id": "01M574VKA1TTA2BFREM70ZEB9D",
    "strategy_name": "NIFTY manual straddle",
    "version": 1,
    "mode": "live",
    "status": "active",
    "status_reason": null,
    "strategy_tag": "auto.01M574VPR4P8",
    "accounts": [
      {
        "account": "Z1",
        "multiplier": 1
      }
    ],
    "units": [
      {
        "account": "Z1",
        "unit_id": "01M574VPR4YP5XCWSC2X6YPR5R",
        "status": "active",
        "status_reason": null
      }
    ],
    "start_on": null,
    "end_on": null,
    "acknowledged": [],
    "compiled_hash": "sha256:93332f0feac143d79d9430ca8c247082ad8af7ca2820ba1492bc4af7a3c61937",
    "last_intent": {
      "action": "deploy",
      "exit_now": false,
      "at": "2026-10-18T09:18:07.623Z",
      "delivered": false
    },
    "engine_connected": false,
    "created_at": "2026-10-18T09:18:07.620Z",
    "updated_at": "2026-10-18T09:18:07.620Z",
    "stopped_at": null
  },
  "error": null
}

Live values of a deployment #

GET /v2/deployments/{deployment_id}/live scope read

Per account: the cycle phase, what it is doing now in plain words, and the values the engine reports (indicators, legs, greeks, P&L).

Parameters

  • deployment_id path · string required

    Deployment id.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

404deployment_not_found

No deployment with this id for the caller.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/live" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "deployment_id": "01M574VKAX6MG5BY1HWXCDNNDJ",
    "engine_connected": false,
    "units": [
      {
        "account": "P1",
        "phase": "unknown",
        "now": "The strategy engine isn't connected yet: this was saved and will run once it is.",
        "values": {}
      },
      {
        "account": "P2",
        "phase": "unknown",
        "now": "The strategy engine isn't connected yet: this was saved and will run once it is.",
        "values": {}
      }
    ]
  },
  "error": null
}

List a deployment's cycles #

GET /v2/deployments/{deployment_id}/cycles scope read

Every cycle (entry → manage → exit) on every account, newest first (at most 200), with its legs and P&L.

Parameters

  • deployment_id path · string required

    Deployment id.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

404deployment_not_found

No deployment with this id for the caller.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/cycles" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": [],
  "error": null
}

Get a cycle with its journey #

GET /v2/deployments/{deployment_id}/cycles/{day}/{n} scope read

Cycle n of trading day day (YYYY-MM-DD) on every account, each with its journey: what happened, why, and what it did.

Parameters

  • deployment_id path · string required

    Deployment id.

  • day path · string required

    Trading day, YYYY-MM-DD.

  • n path · integer (int32) required

    Cycle number on that day, from 1.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

404deployment_not_found

No deployment with this id for the caller.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/cycles/<day>/<n>" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": [],
  "error": null
}

Send a signal to a deployment #

POST /v2/deployments/{deployment_id}/signals scope strategies_signal

Asks a deployment to enter or exit (manual and API sources; the Idempotency-Key header is required).

More about this

A signal can only ask: every safety check still applies, and the engine answers per account (entries only when the strategy is waiting for one; exits whenever a trade is open). enter needs a strategy whose entry source is manual@1 or api@1; an api@1 signal older than its max_signal_age_s is refused. API keys need the strategies_signal scope. 202 when the engine has not answered (queued).

Parameters

  • deployment_id path · string required

    Deployment id.

Body fields

  • action string required

    One of: enter, exit, exit_legs

  • hints object | null

    Leg or quantity hints the strategy allows.

  • at string | null

    When the signal was made (RFC 3339); too old is refused.

Errors

HTTPCodeWhen
400idempotency_key_required

The Idempotency-Key header is missing (use a new UUID per order request).

400invalid_idempotency_key

The Idempotency-Key header is not 1-128 printable characters.

400malformed_json

The body is not JSON, or does not fit the request shape (unknown or missing fields, wrong types).

401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

404deployment_not_found

No deployment with this id for the caller.

409deployment_finished

The deployment is stopped; deploy the strategy again to run it.

422invalid_request

The request is well-formed but not valid; field names the input.

422idempotency_key_reused

This Idempotency-Key was already used with a different request.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

POST
curl -X POST "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/signals" \
  -H "Authorization: token $CIRRUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "enter"
  }'
Response · 202
{
  "status": "success",
  "data": {
    "signal_id": "01M574VNDXZP199NRGS1X65WK4",
    "delivered": false,
    "units": [
      {
        "account": "P1",
        "accepted": null,
        "reason": "The strategy engine isn't connected yet: this was saved and will run once it is."
      },
      {
        "account": "P2",
        "accepted": null,
        "reason": "The strategy engine isn't connected yet: this was saved and will run once it is."
      }
    ]
  },
  "error": null
}

Stop every strategy #

POST /v2/strategies/stop-all scope strategies

The kill switch: stops every deployment of the caller (no new cycles).

More about this

With exit_now, also closes every strategy trade now (positions of automated strategies only, never manual or signal positions), mains first and hedges last; closing live trades needs strategies_live. Takes an optional Idempotency-Key.

Body fields

  • exit_now boolean

    Also close every strategy trade now (positions of auto.* strategies only), mains first, hedges last.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

403live_not_enabled

Live deployments need the strategies_live scope and a broker open for live automated strategies.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

All fields (request and response schema)

Loading fields…

POST
curl -X POST "https://cirrus.pocketful.in/v2/strategies/stop-all" \
  -H "Authorization: token $CIRRUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "exit_now": true
  }'
Response · 200
{
  "status": "success",
  "data": {
    "stopped": [
      "01M574VPR4P8457ZBFGSHJ4CRP",
      "01M574VP34646M936XME8K18QZ"
    ],
    "exit_now": true,
    "delivered": false
  },
  "error": null
}