Deployments
Run a strategy on paper or live accounts, then pause, stop or take it live.
List a strategy's deployments #
/v2/strategies/{strategy_id}/deployments scope readThe strategy's deployments, newest first.
Parameters
- strategy_id path · string required
Strategy id.
Errors
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 404 | strategy_not_found | No automated strategy with this id for the caller. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
curl "https://cirrus.pocketful.in/v2/strategies/<strategy_id>/deployments" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.get(
"https://cirrus.pocketful.in/v2/strategies/<strategy_id>/deployments",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/strategies/<strategy_id>/deployments', {
method: 'GET',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/strategies/{strategy_id}/deployments scope strategiesRuns 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
| HTTP | Code | When |
|---|---|---|
| 400 | malformed_json | The body is not JSON, or does not fit the request shape (unknown or missing fields, wrong types). |
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 403 | live_not_enabled | Live deployments need the |
| 404 | strategy_not_found | No automated strategy with this id for the caller. |
| 404 | version_not_found | No such version of the strategy. |
| 404 | account_not_found | No linked broker account with this id for the caller. |
| 409 | deployment_limit_reached | The most deployments that may run at once are running; stop one first. |
| 422 | not_deployable | The strategy version cannot be deployed yet (a component or option not released, or an underlying not open); |
| 422 | acknowledgement_required | A warning must be acknowledged to deploy (e.g. |
| 422 | invalid_request | The request is well-formed but not valid; |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
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
}
]
}'import os
import requests
response = requests.post(
"https://cirrus.pocketful.in/v2/strategies/<strategy_id>/deployments",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
json={
"mode": "paper",
"accounts": [
{
"account": "P1",
},
{
"account": "P2",
"multiplier": 2,
},
],
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/strategies/<strategy_id>/deployments', {
method: 'POST',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"mode": "paper",
"accounts": [
{
"account": "P1"
},
{
"account": "P2",
"multiplier": 2
}
]
}),
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/deployments/{deployment_id} scope readOne deployment with its units (one per account).
Parameters
- deployment_id path · string required
Deployment id.
Errors
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.get(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>', {
method: 'GET',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/deployments/{deployment_id}/pause scope strategiesNo 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
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 403 | live_not_enabled | Live deployments need the |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 409 | deployment_finished | The deployment is stopped; deploy the strategy again to run it. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
curl -X POST "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/pause" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.post(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/pause",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/pause', {
method: 'POST',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/deployments/{deployment_id}/resume scope strategiesNew 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
| HTTP | Code | When |
|---|---|---|
| 400 | malformed_json | The body is not JSON, or does not fit the request shape (unknown or missing fields, wrong types). |
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 409 | deployment_finished | The deployment is stopped; deploy the strategy again to run it. |
| 422 | acknowledgement_required | A warning must be acknowledged to deploy (e.g. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
curl -X POST "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/resume" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.post(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/resume",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/resume', {
method: 'POST',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/deployments/{deployment_id}/journey scope readEvery 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_cursorof the previous page. - limit query · integer
1 to 200 (default 50).
Errors
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 422 | invalid_request | The request is well-formed but not valid; |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
| 503 | service_unavailable | A dependency is temporarily unavailable, or the feature is off on this server; retry later. |
All fields (request and response schema)
Loading fields…
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/journey" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.get(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/journey",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/journey', {
method: 'GET',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"status": "success",
"data": {
"entries": [],
"next_cursor": null
},
"error": null
}Stop a deployment #
/v2/deployments/{deployment_id}/stop scope strategiesNo 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
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 403 | live_not_enabled | Live deployments need the |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 409 | deployment_finished | The deployment is stopped; deploy the strategy again to run it. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
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
}'import os
import requests
response = requests.post(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/stop",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
json={
"exit_now": False,
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/stop', {
method: 'POST',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"exit_now": false
}),
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/deployments/{deployment_id}/exit-now scope strategiesCloses 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
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 403 | live_not_enabled | Live deployments need the |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 409 | deployment_finished | The deployment is stopped; deploy the strategy again to run it. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
curl -X POST "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/exit-now" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.post(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/exit-now",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/exit-now', {
method: 'POST',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/deployments/{deployment_id}/go-live scope strategiesCreates 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
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 403 | live_not_enabled | Live deployments need the |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 404 | account_not_found | No linked broker account with this id for the caller. |
| 409 | deployment_finished | The deployment is stopped; deploy the strategy again to run it. |
| 409 | deployment_limit_reached | The most deployments that may run at once are running; stop one first. |
| 422 | invalid_request | The request is well-formed but not valid; |
| 422 | not_deployable | The strategy version cannot be deployed yet (a component or option not released, or an underlying not open); |
| 422 | acknowledgement_required | A warning must be acknowledged to deploy (e.g. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
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
}'import os
import requests
response = requests.post(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/go-live",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
json={
"accounts": [
{
"account": "Z1",
},
],
"keep_paper": False,
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/go-live', {
method: 'POST',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"accounts": [
{
"account": "Z1"
}
],
"keep_paper": false
}),
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/deployments/{deployment_id}/live scope readPer 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
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/live" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.get(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/live",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/live', {
method: 'GET',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/deployments/{deployment_id}/cycles scope readEvery 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
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/cycles" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.get(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/cycles",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/cycles', {
method: 'GET',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"status": "success",
"data": [],
"error": null
}Get a cycle with its journey #
/v2/deployments/{deployment_id}/cycles/{day}/{n} scope readCycle 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
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
curl "https://cirrus.pocketful.in/v2/deployments/<deployment_id>/cycles/<day>/<n>" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.get(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/cycles/<day>/<n>",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/cycles/<day>/<n>', {
method: 'GET',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"status": "success",
"data": [],
"error": null
}Send a signal to a deployment #
/v2/deployments/{deployment_id}/signals scope strategies_signalAsks 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
| HTTP | Code | When |
|---|---|---|
| 400 | idempotency_key_required | The |
| 400 | invalid_idempotency_key | The |
| 400 | malformed_json | The body is not JSON, or does not fit the request shape (unknown or missing fields, wrong types). |
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 404 | deployment_not_found | No deployment with this id for the caller. |
| 409 | deployment_finished | The deployment is stopped; deploy the strategy again to run it. |
| 422 | invalid_request | The request is well-formed but not valid; |
| 422 | idempotency_key_reused | This |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
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"
}'import os
import requests
response = requests.post(
"https://cirrus.pocketful.in/v2/deployments/<deployment_id>/signals",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
json={
"action": "enter",
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/deployments/<deployment_id>/signals', {
method: 'POST',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"action": "enter"
}),
});
const body = await response.json();
console.log(response.status, body);{
"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 #
/v2/strategies/stop-all scope strategiesThe 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
| HTTP | Code | When |
|---|---|---|
| 401 | unauthorized | No credential, or the credential is invalid, expired or revoked. |
| 403 | forbidden | The credential may not use this route (missing scope, app-session-only route, IP not allowed). |
| 403 | live_not_enabled | Live deployments need the |
| 429 | rate_limited | Too many requests for this credential (or too many failed attempts); retry after the |
All fields (request and response schema)
Loading fields…
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
}'import os
import requests
response = requests.post(
"https://cirrus.pocketful.in/v2/strategies/stop-all",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
json={
"exit_now": True,
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/strategies/stop-all', {
method: 'POST',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"exit_now": true
}),
});
const body = await response.json();
console.log(response.status, body);{
"status": "success",
"data": {
"stopped": [
"01M574VPR4P8457ZBFGSHJ4CRP",
"01M574VP34646M936XME8K18QZ"
],
"exit_now": true,
"delivered": false
},
"error": null
}