Risk limits
Your overall daily loss limit and exposure cap for automated strategies.
Your overall risk limits #
/v2/strategies/risk-limits scope readYour limits across every automated strategy and account: the daily loss at which no new trades start (realised plus open, across strategies), the open exposure at which no new trades start, and whether a breached daily loss also closes open trades.
More about this
today is today's P&L of every automated strategy (no charges). Off unless OMS_AUTO_PORTFOLIO_RISK is on.
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). |
| 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/strategies/risk-limits" \
-H "Authorization: token $CIRRUS_API_KEY"import os
import requests
response = requests.get(
"https://cirrus.pocketful.in/v2/strategies/risk-limits",
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/risk-limits', {
method: 'GET',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
},
});
const body = await response.json();
console.log(response.status, body);{
"status": "success",
"data": {
"max_daily_loss": 15000,
"max_open_exposure": null,
"close_on_breach": true,
"updated_at": "2026-10-22T15:22:21.171Z",
"today": {
"trading_day": "2026-10-22",
"pnl": 0,
"ltp_stale": false,
"daily_loss_reached": false
}
},
"error": null
}Set your overall risk limits #
/v2/strategies/risk-limits scope strategiesSets your limits across every automated strategy.
More about this
Fields left out keep their value; null removes a limit. Amounts are rupees, positive, at most ₹100 crore. close_on_breach (off by default) also closes every open trade when the daily loss limit is reached, and needs max_daily_loss. The engine applies a change within about 30 seconds; while it can't read your limits, or today's P&L isn't known, new trades wait (open trades keep every exit). Needs the strategies_live scope. Takes an optional Idempotency-Key.
Body fields
- max_daily_loss number (double) | null
Today's loss across every strategy (₹, realised plus open) at which no new trades start.
nullremoves it; left out keeps it. - max_open_exposure number (double) | null
Open exposure across every strategy (₹) at which no new trades start: per trade, the most it can lose where that is bounded (spreads, bought options), else the broker's margin, else the entry value.
nullremoves it; left out keeps it. - close_on_breach boolean | null
Also close every open trade of your strategies when the daily loss limit is reached (off by default; needs
max_daily_loss). Left out keeps it.
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 |
| 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 -X PUT "https://cirrus.pocketful.in/v2/strategies/risk-limits" \
-H "Authorization: token $CIRRUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"max_daily_loss": 15000,
"max_open_exposure": 300000,
"close_on_breach": true
}'import os
import requests
response = requests.put(
"https://cirrus.pocketful.in/v2/strategies/risk-limits",
headers={
"Authorization": f"token {os.environ['CIRRUS_API_KEY']}",
},
json={
"max_daily_loss": 15000,
"max_open_exposure": 300000,
"close_on_breach": True,
},
timeout=10,
)
print(response.status_code, response.json())const response = await fetch('https://cirrus.pocketful.in/v2/strategies/risk-limits', {
method: 'PUT',
headers: {
Authorization: `token ${process.env.CIRRUS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"max_daily_loss": 15000,
"max_open_exposure": 300000,
"close_on_breach": true
}),
});
const body = await response.json();
console.log(response.status, body);{
"status": "success",
"data": {
"max_daily_loss": 15000,
"max_open_exposure": 300000,
"close_on_breach": true,
"updated_at": "2026-10-22T15:22:21.147Z"
},
"error": null
}