Build order transaction
Build a new order transaction. This endpoint creates an unsigned transaction that must be signed and submitted via the Submit Order Transaction endpoint.
Build place order transaction
LimitSlippage bool json:"limit_slippage"
Quantity float64 json:"quantity" binding:"required"
OK
Bad Request
Not Acceptable
Unprocessable Entity
Internal Server Error
Request Parameters
symbol
string
Yes
Trading pair symbol (e.g., ADAUSDM)
side
string
Yes
Order side: buy or sell
type
string
Yes
Order type: limit or market
base_quantity
string
Conditional
Quantity in base asset (e.g., ADA). Use either base_quantity OR quote_quantity, not both.
quote_quantity
string
Conditional
Quantity in quote asset (e.g., USDM). Use either base_quantity OR quote_quantity, not both.
price
string
Conditional
Order price. Required for limit orders, ignored for market orders.
max_slippage_basis_point
string
No
Maximum slippage in basis points. Only applicable for market orders.
post_only
boolean
No
If true, order only posts if it doesn't match immediately. Only applicable for limit orders.
Order Types
Limit Order
A limit order is placed at a specific price. It will only execute at that price or better.
Required parameters:
symbol,side,type(set tolimit)price- The limit priceEither
base_quantityorquote_quantity
Optional parameters:
post_only- Set totrueto ensure the order only acts as a maker (adds liquidity). If it would match immediately, the order is rejected.
Market Order
A market order executes immediately at the best available price. No price is specified.
Required parameters:
symbol,side,type(set tomarket)Either
base_quantityorquote_quantity
Optional parameters:
max_slippage_basis_point- Maximum acceptable slippage (1 basis point = 0.01%). If not set, unlimited slippage is allowed.
Market Order Slippage: If max_slippage_basis_point is not set, the market order will fill at any price until the order is complete or your balance is exhausted. Set a slippage limit to protect against unfavorable fills.
Quantity Specification
You must specify either base_quantity or quote_quantity, but not both.
base_quantity
Amount of base asset (e.g., ADA)
"100" = 100 ADA
quote_quantity
Amount of quote asset (e.g., USDM)
"93" = 93 USDM
Example for ADAUSDM pair:
Buy 100 ADA:
{"base_quantity": "100", "side": "buy", ...}Buy $93 worth of ADA:
{"quote_quantity": "93", "side": "buy", ...}
Code Examples
Limit Order Example
Market Order Example
Post-Only Limit Order Example
Response
order_id
string
Unique order identifier. Use this when submitting the signed transaction.
Next Steps
After building the order:
Sign the transaction using your wallet - see How to sign a Cardano transaction
Submit the signed transaction via Submit Order Transaction
Error Codes
4050
Insufficient balance
Not enough free balance to place the order
4100
Order size too small
Order must be at least 5 ADA equivalent
4101
Invalid order price
Price must be greater than 0
4102
Invalid price decimal places
Price has too many decimal places
4103
Invalid quantity decimal places
Quantity has too many decimal places
4104
Post-only would match
Post-only order would match immediately (rejected)
4106
Invalid symbol
Trading pair not found
4109
Insufficient liquidity
Not enough liquidity for market order
4110
Max open orders exceeded
Too many open orders
Related
Last updated