Order routes automate trading activity for your Stabyl account. Order writes requireDocumentation Index
Fetch the complete documentation index at: https://stabyl.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
X-Api-Key and Idempotency-Key. Matching is asynchronous, so use order reads as the canonical source for status, filled quantity, remaining quantity, and rejection state.
Before You Place an Order
Perform these checks in your own system before sending the request:- Fetch
GET /partner/exchange/marketsand confirm the pair is enabled. - Validate
side,order_type,quantity, andpriceagainst the market rules. - Confirm available balance with
GET /partner/wallets/balances/overview. - Generate and store an
Idempotency-Keyfor this exact order intent. - Decide how your service will poll or reconcile the order after submission.
Create A Limit Order
Limit orders specify the maximum buy price or minimum sell price you are willing to accept.Create A Market Order
Market orders prioritize execution against available liquidity. Because the final price depends on available depth, read the current ticker or order book first and keep your own risk controls conservative.Create Response
The response confirms that Stabyl accepted the order request for processing. It does not mean the order is already filled.order_id. Use it for all later reads, cancels, replacements, and reconciliation.
List Orders By Status
Get Order Detail
Cancel Order
Replace Order
Status Handling
| Status | Your action |
|---|---|
pending | Continue polling or schedule a reconciliation read |
accepted | Treat as live unless a later read says otherwise |
partially_filled | Show executed and remaining amounts separately |
filled | Stop polling and reconcile fills |
cancelled | Stop polling and reconcile any partial fills |
rejected | Stop polling and surface the public error message |
Retry Rules
| Situation | What to do |
|---|---|
| Request timed out before a response | Retry with the same Idempotency-Key |
Response was 429 | Back off, then retry with the same Idempotency-Key |
Response was 409 | Read the existing order or correct the conflicting request |
| Order status is terminal | Do not retry the same action as a new order |