OrdersService
Preview Order
Check current order eligibility and available balance, and preview resolved quantity, price protection, quote debit, and fees. The result is advisory.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/v1/orders/preview' \
--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 '{
"order": {
"attachedRisk": {
"oco": false,
"stopLoss": {
"child": {
"marketIoc": {}
},
"triggerPrice": "0.005"
},
"takeProfit": {
"child": {
"marketIoc": {}
},
"triggerPrice": "0.005"
}
},
"baseQty": "100000",
"clientOrderId": "cli-ord-20250101-001",
"feeAsset": "QUOTE",
"marketIoc": {
"clientRefPrice": "0.005",
"maxSlippageTicks": 1
},
"selfTradePreventionMode": "EXPIRE_MAKER",
"side": "BUY",
"symbol": "BTC-USDT"
},
"subaccountId": "45LUmqjT"
}'Responses
{
"admissible": true,
"evaluatedAt": "2026-07-29T12:00:00Z",
"protectedPriceBound": "50500",
"resolvedBaseQty": "0.0198"
}If true, take-profit and the configured stop leg (stop-loss or trailing-stop) form an OCO pair: when one fires, the other is canceled. Default is false (no mutual cancellation).
Limit price in quote units scaled by 1e9.
Market child with implicit IOC behavior.
Trigger price in quote units scaled by 1e9.
Limit price in quote units scaled by 1e9.
Market child with implicit IOC behavior.
Trigger price in quote units scaled by 1e9.
Optional activation price: trailing only starts after this price is reached. If omitted, trailing starts immediately after the parent order fills. Expressed in quote units scaled by 1e9.
Maximum allowed slippage in basis points (1 bp = 0.01%).
Positive maximum absolute price delta in Q9 execution-price ticks (1 tick = 1e-9 quote units).
Trailing distance in basis points (1 bp = 0.01%).
Trailing distance as a price delta in 1e-9 quote-unit ticks.
Exact gross base quantity as a human-readable decimal using the pair's base quantity scale.
Optional account-scoped identifier for correlation, lookup, and cancellation. While this identifier is retained, reuse returns CONFLICT_DUPLICATE_CLIENT_ORDER_ID for every new submission, even with the same payload. This identifier enables GetOrder reconciliation after a timeout; it does not provide exact replay.
Asset charged for fees. Defaults to QUOTE. BASE is available only for BUY orders; SELL orders must use QUOTE.
Limit price in quote units scaled by 1e9.
Reject the order instead of taking liquidity. Post-only is available only on this resting limit-order variant.
Limit price in quote units scaled by 1e9.
Exact expiry time in UTC. It must be at least 1 second and at most 30 days after validation time. The order cannot execute when the current time equals this value.
Reject the order instead of taking liquidity.
Limit price in quote units scaled by 1e9.
Limit price in quote units scaled by 1e9.
Optional client reference price in quote units scaled by 1e9. When omitted, admission uses server-side reference pricing.
Maximum allowed slippage in basis points (1 bp = 0.01%).
Positive maximum absolute price delta in Q9 execution-price ticks (1 tick = 1e-9 quote units).
Hard all-in quote debit limit scaled by the pair's quote_quantity_scale from GetSpotConfig. Valid only for BUY market IOC and BUY limit IOC.
Self-trade prevention mode. Defaults to EXPIRE_MAKER if unspecified.
Order side.
Trading pair symbol, e.g. BTC-USDT.
Target sub-account numeric ID. When omitted, uses caller's root account.
Whether the order passed the current validation, policy, risk, and available-balance checks.
Time at which this admission evaluation completed.
Protective execution boundary in quote units scaled by 1e9. This is not an expected fill price. Present when price protection was resolved.
Stable error code matching the REST problem+json "code" field.
Active weighted quota. Present for quota-exhaustion responses.
Stable operation identifier shared by all aliases of the same action.
Mutable quota family used for the decision.
Policy version used for the decision, when available.
Machine-readable failure reason.
Refill behavior used by the active limiter.
Weighted capacity remaining when the request was rejected.
Minimum relative delay before retrying, in milliseconds.
Caller dimension that owns the exhausted capacity.
Protobuf field path relative to the request, using canonical field names.
Human-readable explanation of the violation.
Stable validation rule identifier suitable for programmatic matching.
Gross base quantity resolved for execution, scaled by the pair's base_quantity_scale from GetSpotConfig. Present when sizing was resolved.
| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |