Skip to main content
Order routes automate trading activity for your Stabyl account. Order writes require X-Api-Key and Idempotency-Key. Matching is asynchronous. Consume exchange webhooks or private WebSocket topics for timely changes, and use order reads for recovery, operator lookups, and periodic reconciliation.

Before You Place an Order

Perform these checks in your own system before sending the request:
  1. Fetch GET /partner/exchange/markets and confirm the pair is enabled.
  2. Validate side, order_type, quantity, and price against the market rules.
  3. Confirm available balance with GET /partner/wallets/balances/overview.
  4. Generate and store an Idempotency-Key for this exact order intent.
  5. Configure exchange webhooks or private WebSocket topics before 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.
Store the returned order_id. Use it for all later reads, cancels, replacements, and reconciliation.

List Orders By Status

Use list filters for dashboards and background reconciliation. For a single order, prefer the detail endpoint.

Get Order Detail

Cancel Order

Cancel is best effort for open quantity. If part of the order has already executed, the filled portion remains final and only remaining quantity can be cancelled.

Replace Order

Replace creates a new order intent for the remaining quantity according to the API response. Always read the returned order and do not assume the original order is still active.

Status Handling

Retry Rules

Common failures include invalid pair, insufficient available balance, stale order status, or idempotency conflicts.