TriggersService
Modify Trigger
Modify a trigger by trigger ID using a limited patch for trigger pricing and trailing/slippage parameters. Supported for stop-loss, take-profit and trailing-stop triggers; ladder and TWAP triggers support only cancel and answer TRIGGER_NOT_MODIFIABLE.
Request
curl --request PUT \ \
--url 'https://api.testnet.polyester.com/v1/triggers/59VD7Lar?symbol=BTC-USDT' \
--header 'Accept: */*' \
--header 'X-API-KEY-ID: YOUR_API_KEY_ID' \
--header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \
--header 'X-API-SIGNATURE: YOUR_API_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"activationPrice": "61000.25",
"limitPrice": "61000.25",
"maxSlippageTicks": 0,
"subaccountId": "45LUmqjT",
"symbol": "BTC-USDT",
"trailingDistance": "0.000000001",
"triggerId": "59VD7Lar",
"triggerPrice": "61000.25"
}'Responses
{
"status": "CREATED",
"triggerId": "59VD7Lar",
"tsNs": "1735689600000000000"
}Trigger ID (base58 public ID)
Optional trading pair symbol, e.g. BTC-USDT, as an alternative to symbol in the body. When both are given they must be the same.
Updated activation price as a decimal string in quote asset units per base asset unit, for example '62000'. Set to '0' to clear an existing activation price; omit to leave it unchanged.
Not modifiable: a trigger's child limit price is fixed at create. Setting this field rejects the whole request with ERROR_CODE_TRIGGER_CHILD_PRICE_NOT_MODIFIABLE (InvalidArgument, HTTP 400) and leaves the trigger unchanged; cancel the trigger and create a new one to change the child limit price.
Updated maximum allowed slippage in basis points (1 bp = 0.01%). Set to zero to clear the cap. A buy stop-loss or take-profit with a market child accepts 1 to 10000, as at creation. A trailing stop on either side, and a sell stop-loss or take-profit, accept 1 to 9999: 10000 is rejected with ERROR_CODE_MAX_SLIPPAGE_INVALID, because a 100% cap would leave a sell no positive price, and a trailing stop takes none on either side.
Non-negative maximum absolute price delta in Q9 execution-price ticks (1 tick = 1e-9 quote units). Set to zero to clear the cap.
Optional public subaccount ID for authorization. When omitted, subaccount-scoped API keys use their bound subaccount; other callers use their authenticated root account.
Optional trading pair symbol, e.g. BTC-USDT. Omit it to use the trigger's own pair; another listed pair is rejected with TRIGGER_SYMBOL_MISMATCH, and a pair that is not listed with UNKNOWN_SYMBOL.
Trailing distance as a decimal price delta in quote asset units, for example '0.5'.
Updated trailing distance in basis points (1 bp = 0.01%).
Trigger ID to modify.
Updated stop-loss or take-profit trigger price as a decimal string in quote asset units per base asset unit, for example '60000'.
Current trigger status after modification.
CREATEDModified trigger ID.
59VD7LarServer timestamp in nanoseconds since epoch (UTC).
1735689600000000000| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |