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

post

Build place order transaction

Body
base_quantitystringOptional
max_slippage_basis_pointstringOptional
post_onlybooleanOptional

LimitSlippage bool json:"limit_slippage"

pricestringOptional
quote_quantitystringOptional

Quantity float64 json:"quantity" binding:"required"

sidestring · enumRequiredPossible values:
symbolstringRequired
typestring · enumRequiredPossible values:
Responses
chevron-right
200

OK

application/json
post
/orders/build

Request Parameters

Parameter
Type
Required
Description

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 to limit)

  • price - The limit price

  • Either base_quantity or quote_quantity

Optional parameters:

  • post_only - Set to true to 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 to market)

  • Either base_quantity or quote_quantity

Optional parameters:

  • max_slippage_basis_point - Maximum acceptable slippage (1 basis point = 0.01%). If not set, unlimited slippage is allowed.

circle-exclamation

Quantity Specification

You must specify either base_quantity or quote_quantity, but not both.

Field
Description
Example

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

Field
Type
Description

order_id

string

Unique order identifier. Use this when submitting the signed transaction.

tx_hex

string

Unsigned transaction hex. Sign this and submit via Submit Order Transaction.


Next Steps

After building the order:

  1. Sign the transaction using your wallet - see How to sign a Cardano transaction

  2. Submit the signed transaction via Submit Order Transaction


Error Codes

Code
Error
Description

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


Last updated