TriggersService
Get Trigger
Retrieve a single trigger by trigger ID, including lifecycle state and strategy-specific fields.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/triggers/59VD7Lar?subaccountId=45LUmqjT' \ --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'
Responses
{
"trigger": {
"armedAt": "2025-01-01T00:00:00Z",
"cancelReason": "USER_REQUEST",
"clientTriggerId": "9155001234567",
"completedAt": "2025-01-01T00:00:00Z",
"createdAt": "2025-01-01T00:00:00Z",
"feeAsset": "QUOTE",
"parentOrderId": "5USXJZmk",
"qty": "0.001",
"selfTradePreventionMode": "EXPIRE_MAKER",
"status": "CREATED",
"stop": {
"triggerDirection": "ABOVE",
"triggerPrice": "61000.25",
"triggerPriceSource": "LAST_PRICE"
},
"stopLoss": {
"child": {
"marketIoc": {
"maxSlippageTicks": 1
}
},
"side": "BUY",
"triggerPrice": "61000.25",
"triggerPriceSource": "LAST_PRICE"
},
"subaccountId": "45LUmqjT",
"symbol": "BTC-USDT",
"triggerId": "59VD7Lar",
"updatedAt": "2025-01-01T00:00:00Z",
"version": 1
}
}Trigger ID (base58 public ID)
Timestamp when the trigger became armed.
2025-01-01T00:00:00ZWhy an admitted trigger was canceled.
USER_REQUESTClient-provided trigger ID for idempotency and correlation.
9155001234567Instant the trigger became terminal, matching its terminal event timestamp. Set for completed, canceled (for any reason), or failed triggers, including terminal expiry or rejection. Absent while the trigger is live.
2025-01-01T00:00:00ZCreation timestamp.
2025-01-01T00:00:00ZWhy an admitted trigger failed.
Fee asset for BUY child orders.
QUOTENumber of linearly distributed levels.
Reject each level instead of taking liquidity.
Maximum generated level price as a decimal string in quote asset units per base asset unit, for example '63000'.
Minimum generated level price as a decimal string in quote asset units per base asset unit, for example '59000'.
Child side.
Number of distinct ladder levels with at least one fill. A partially filled level counts once, including across replacement child orders. This is not the number of fully filled levels.
Cumulative filled child-order base quantity as a decimal string in base asset units, for example '0.002'. '0' means no quantity executed. The total is kept when the ladder ends, whether it is completed, canceled or failed.
Quantity distribution across ladder levels.
Number of price levels in the ladder.
Maximum price of the ladder range as a decimal string in quote asset units per base asset unit, for example '63000'.
Minimum price of the ladder range as a decimal string in quote asset units per base asset unit, for example '59000'.
Parent order ID for attached-risk triggers; empty for standalone triggers.
5USXJZmkChild quantity as a decimal string in base asset units, for example '0.01'.
0.001Self-trade prevention mode for child orders.
EXPIRE_MAKERCurrent trigger lifecycle status.
CREATEDDirection the price must cross to fire the trigger.
ABOVETrigger threshold price as a decimal string in quote asset units per base asset unit, for example '60000'.
61000.25Price source used for trigger evaluation.
LAST_PRICELimit price as a decimal string in quote asset units per base asset unit, for example '61000.25'.
Reject instead of taking liquidity.
Limit price as a decimal string in quote asset units per base asset unit, for example '61000.25'.
Limit price as a decimal string in quote asset units per base asset unit, for example '61000.25'.
Maximum allowed slippage in basis points (1 bp = 0.01%). A sell child accepts values below 10000; a 100% cap would leave it no positive price to sell at.
Positive maximum absolute price delta in Q9 execution-price ticks (1 tick = 1e-9 quote units).
1Child order side.
BUYTrigger threshold as a decimal string in quote asset units per base asset unit, for example '60000'.
61000.25Price the trigger watches. Unspecified or LAST_PRICE watches the last traded price. INDEX_PRICE watches the market's index price; a market without an index price fails the trigger with TRIGGER_FAILURE_REASON_INDEX_PRICE_UNAVAILABLE. MARK_PRICE is not supported. Fixed at create: to change it, cancel the trigger and create a new one.
LAST_PRICEPublic account or sub-account ID associated with the trigger.
45LUmqjTTrading pair symbol, e.g. BTC-USDT.
BTC-USDTLimit price as a decimal string in quote asset units per base asset unit, for example '61000.25'.
Reject instead of taking liquidity.
Limit price as a decimal string in quote asset units per base asset unit, for example '61000.25'.
Limit price as a decimal string in quote asset units per base asset unit, for example '61000.25'.
Maximum allowed slippage in basis points (1 bp = 0.01%). A sell child accepts values below 10000; a 100% cap would leave it no positive price to sell at.
Positive maximum absolute price delta in Q9 execution-price ticks (1 tick = 1e-9 quote units).
Child order side.
Trigger threshold as a decimal string in quote asset units per base asset unit, for example '60000'.
Price the trigger watches. Unspecified or LAST_PRICE watches the last traded price. INDEX_PRICE watches the market's index price; a market without an index price fails the trigger with TRIGGER_FAILURE_REASON_INDEX_PRICE_UNAVAILABLE. MARK_PRICE is not supported. Fixed at create: to change it, cancel the trigger and create a new one.
Optional activation price as a decimal string in quote asset units per base asset unit, for example '62000': trailing only starts after this price is reached.
Optional maximum allowed slippage in basis points (1 bp = 0.01%).
Non-negative maximum absolute price delta in Q9 execution-price ticks (1 tick = 1e-9 quote units). Zero means no absolute cap is configured.
Current peak price for sell trailing stops, as a decimal string in quote asset units per base asset unit, for example '61500'.
Trailing distance as a decimal price delta in quote asset units, for example '0.5'.
Trailing distance in basis points (1 bp = 0.01%).
Direction the price must cross to fire the trigger. Fixed for the lifetime of the trigger and exposed for completeness.
Current trailing trigger threshold as a decimal string in quote asset units per base asset unit, for example '60500'. It moves when the peak or trough changes, and is absent until the trailing trigger is armed and a positive threshold exists.
Price source used for trigger evaluation. Fixed for the lifetime of the trigger and exposed for completeness.
Current trough price for buy trailing stops, as a decimal string in quote asset units per base asset unit, for example '59500'.
Optional activation price as a decimal string in quote asset units per base asset unit, for example '62000'.
Maximum price of a trailing stop that buys, as a decimal string in quote asset units per base asset unit, for example '63000': the most its child pays per unit. Required when `side` is BUY and set aside for it with the child's fee; at least the activation price, or at least the price it watches (triggerPriceSource) when no activation price is set. A rise that fires above it still fires, and the child fills only at or below it. Must be unset when `side` is SELL. Fixed at create.
Maximum slippage in basis points (1 bp = 0.01%). Values below 10000 are accepted; a 100% cap would leave a trailing stop that sells no positive price to sell at.
Positive maximum absolute price delta in Q9 execution-price ticks (1 tick = 1e-9 quote units).
Child order side.
Trailing distance as a decimal price delta in quote asset units, for example '0.5'.
Distance in basis points (1 bp = 0.01%).
Price the trailing stop watches: its activation, its peak or trough and its fire all follow this price. Unspecified or LAST_PRICE watches the last traded price. INDEX_PRICE watches the market's index price; a market without an index price fails the trigger with TRIGGER_FAILURE_REASON_INDEX_PRICE_UNAVAILABLE. MARK_PRICE is not supported. Fixed at create: to change it, cancel the trigger and create a new one.
Trigger ID.
59VD7LarTotal execution duration in milliseconds, at least 1000.
Slice limit price as a decimal string in quote asset units per base asset unit, for example '61000.25'.
Maximum adverse price movement per slice in basis points (1 bp = 0.01%).
Positive maximum absolute price delta per slice in Q9 execution-price ticks (1 tick = 1e-9 quote units).
Child side.
Interval between slices in milliseconds, at least 100 and at most duration_ms.
Total duration of TWAP execution in milliseconds.
Cumulative filled child-order base quantity as a decimal string in base asset units, for example '0.002'.
Total number of planned slices.
Current slice index, zero-based.
Interval between TWAP slices in milliseconds.
Last update timestamp.
2025-01-01T00:00:00ZPer-trigger state version: 1 for the trigger's first state, then higher for every later published state change, whether a request or the market caused it. A higher version is always newer, and two copies of a trigger with the same version show the same state. GetTrigger, ListTriggers and realtime trigger updates carry the same version for the same state. List results can briefly lag realtime updates, and after a reconnect or a service recovery a realtime update can repeat an earlier state, so keep the copy of each trigger with the highest version and ignore any copy whose version is not higher than the one you hold.
1| 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. |