Skip to main content
POST
/
partner
/
exchange
/
orders
Create order
curl --request POST \
  --url https://api.stabyl.com/v1/partner/exchange/orders \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "order_type": "limit",
  "pair_id": "USD/NGN",
  "quantity": "100.00",
  "side": "buy",
  "client_order_id": "<string>",
  "idempotency_key": "<string>",
  "price": "1650.00",
  "time_in_force": "GTC"
}
'
{
  "data": {
    "created_at": "2026-05-24T12:00:00Z",
    "order_id": "0197f1f0-0000-7000-8000-000000000001",
    "status": "pending"
  },
  "status": "success"
}

Documentation Index

Fetch the complete documentation index at: https://stabyl.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Order writes are asynchronous. Store the Idempotency-Key before sending the request, reuse it for retries after uncertain responses, and read the order resource for the final state.

Authorizations

X-Api-Key
string
header
default:sb_test_your_key
required

API key. Send it in the X-Api-Key header.

Headers

Idempotency-Key
string
required

Unique key for this exact write intent. Store it before sending the request and reuse it for retries after timeouts or transient errors.

Body

application/json

Order intent to submit. Amounts are decimal strings; validate pair, precision, minimums, and balances before sending.

Order intent for creating a limit or market order. Amounts are decimal strings.

order_type
string
required

Order type: "limit" or "market"

Example:

"limit"

pair_id
string
required

Trading pair identifier

Example:

"USD/NGN"

quantity
string
required

Order quantity in base currency

Example:

"100.00"

side
string
required

Order side: "buy" or "sell"

Example:

"buy"

client_order_id
string | null

Client-provided order identifier

idempotency_key
string | null

Idempotency key to prevent duplicate orders

price
string | null

Price per unit. Required for limit orders; ignored for market orders.

Example:

"1650.00"

time_in_force
string | null

Time in force: "GTC", "IOC", "FOK", "POST_ONLY". Ignored for market orders, which always use IOC.

Example:

"GTC"

Response

Order created

data
object
required

Result returned after an order create request is accepted for processing.

status
enum<string>
required
Available options:
success