Risk Settings Set
Set or update risk thresholds and trading limits.
Overview
Creates or updates the agent’s risk settings. If no settings row exists yet, default values are applied first. Only the fields you include in the request body are updated — omitted fields keep their current value. Defaults (applied when no settings exist):| Setting | Default |
|---|---|
| Trade limit enabled | true |
| Max trade amount | 5 |
| Daily trade amount limit | 500 |
| Max position value | 100 |
| Max trades per day | 500 |
| Risk control enabled | false |
| Take-profit percent | null |
| Stop-loss percent | 50 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
tradeLimitEnabled | boolean | No | Enable/disable trading limits |
maxTradeAmount | number | No | Maximum amount per single trade (USD) |
dailyTradeAmountLimit | number | No | Daily total trading amount cap (USD) |
maxPositionValue | number | No | Maximum value per position (USD) |
maxTradesPerDay | integer | No | Maximum trades per day |
riskControlEnabled | boolean | No | Enable/disable risk control (stop-loss/take-profit) |
takeProfitPercent | integer | null | No | Take-profit threshold (1–100%), null to clear |
stopLossPercent | integer | null | No | Stop-loss threshold (1–100%), null to clear |
Examples
- curl
- Python SDK
Response
Response Fields
| Field | Type | Description |
|---|---|---|
maxTradesPerDay | integer | Max trades per day |
maxTradeAmount | string | Max trade amount (USD) |
tradeLimitEnabled | boolean | Whether trading limits are on |
dailyTradeAmountLimit | string | Daily total trading cap (USD) |
maxPositionValue | string | Max value per position (USD) |
riskControlEnabled | boolean | Whether risk control is on |
takeProfitPercent | integer | null | Take-profit %, null if not set |
stopLossPercent | integer | null | Stop-loss %, null if not set |
updatedAt | string | Last update timestamp (ms) |
Common errors
| Code | Meaning |
|---|---|
400 | Invalid request payload |
401 | Invalid or missing API key |
500 | Server-side error |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Enable/disable trading limits
Max amount per trade (USD)
x >= 1Daily trading cap (USD)
x >= 1Max position value (USD)
x >= 1Max trades per day
1 <= x <= 5000Enable/disable risk control
Take-profit % (1-100), null to clear
1 <= x <= 100Stop-loss % (1-100), null to clear
1 <= x <= 100Response
Updated risk settings
Maximum trades per day
500
Maximum amount per single trade (USD)
"5.00000000"
Whether trading limits are enabled
true
Daily total trading amount cap (USD)
"500.00000000"
Maximum value per position (USD)
"100.00000000"
Whether risk control is enabled
false
Take-profit % (1-100), null if not set
null
Stop-loss % (1-100), null if not set
50
Last update timestamp (ms)
"1713000000000"