Trading

The Trading section provides APIs to create, retrieve, and manage buy/sell orders for supported currency pairs. It also allows you to generate quotes, fetch current prices, and monitor market activity. These APIs are essential for integrating trading functionalities into your applications, enabling users to execute trades, track orders, and stay updated with live market prices.

Typical Flows

Market buy/sellPOST /api/trading/quotes to lock a rate, then POST /api/trading/orders with the returned quote_id before it expires.

DCA (recurring)POST /api/trading/scheduled-orders with a cadence (daily/weekly/monthly). Monitor progress via .../executions, pause/resume via PUT .../:id.

Limit-stylePOST /api/trading/target-orders with a target_price. The order sits in active state and fires once the market hits that price, or flips to expired if an expires_at is reached first.

Trading API Endpoints

Create Quote

The Quotes endpoint allows users to get a real-time price estimate for buying or selling a specific amount of a currency. Use this before placing an order to lock in a price.

Create Quote

Create Quote Request
1
base_currencystringRequired

The base currency of the trading pair, e.g., 'BTC'.

2
quote_currencystringRequired

The quote currency of the trading pair, e.g., 'USDT'.

3
sidestringRequired

The side of the order: 'buy' or 'sell'.

4
quantitystringRequired

The amount of the base currency to buy or sell.

Sample Quote Request

Create Quote Response
1
successboolean

Indicates whether the quote retrieval was successful. True means the quote was generated without errors.

2
messagestring

Message confirming the result of the quote request, useful for feedback or debugging.

3
idstring (UUID)

Unique identifier for the quote. Use this to reference or execute a trade with this quote.

4
base_currencystring

The base currency of the trading pair (e.g., BTC).

5
quote_currencystring

The quote currency of the trading pair (e.g., USDT).

6
sidestring

The side of the quote: BUY or SELL.

7
quantitystring

The amount of base currency for which the quote was generated.

8
pricestring

The quoted price per unit of the base currency in terms of the quote currency.

9
expires_atstring (ISO 8601)

Timestamp indicating when the quote will expire and can no longer be used. Quotes are valid for 30 seconds.

10
created_atstring (ISO 8601)

Timestamp when the quote was created.

11
original_quantitystring

The original quantity requested when the quote was created.

12
consumed_quantitystring

The amount of the quote that has already been used in executed trades.

13
remaining_quantitystring

The amount of the quote still available to trade. Equals original_quantity minus consumed_quantity.

14
is_exhaustedboolean

Whether the quote has been fully consumed. If true, no more trades can be executed against this quote.

15
exchangeobject

A summary of what will be sent and received if the quote is executed.

16
send_quantitystring

The amount you will send to execute the trade (e.g., 6.91 USDT).

17
send_currencystring

The currency you will send (e.g., USDT for a BUY order).

18
receive_quantitystring

The amount you will receive after the trade (e.g., 0.00010000 BTC).

19
receive_currencystring

The currency you will receive (e.g., BTC for a BUY order).

20
metadataobject

Contains additional request information including the unique request_id for tracking.

21
timestampstring (ISO 8601)

Timestamp when the API response was generated.

Sample Quote Response

Create Order

Submit a new order to buy or sell a specific amount of a trading pair. Use the quote_id from a previously generated quote to ensure the order is executed at the intended price.

Create Order

Create Order Request
1
base_currencystringRequired

The base currency of the trading pair, e.g., 'BTC'.

2
quote_currencystringRequired

The quote currency of the trading pair, e.g., 'USDT'.

3
sidestringRequired

The side of the order: 'buy' or 'sell'.

4
quantitystringRequired

The amount of the base currency to buy or sell.

5
pricestringRequired

The price per unit of the base currency in terms of the quote currency.

6
quote_idstring (UUID)Required

A unique identifier for the quote used to create this order. Ensures the order is executed at the intended price.

Sample Create Order Request

Create Order Response
1
successboolean

Indicates whether the order submission was successful.

2
messagestring

Message confirming the result of the order submission.

3
idstring (UUID)

Unique identifier for the order. Can be used to query or manage the order later.

4
base_currencystring

The base currency of the trading pair (e.g., 'BTC').

5
quote_currencystring

The quote currency of the trading pair (e.g., 'USDT').

6
sidestring

Indicates whether the order is 'BUY' or 'SELL'.

7
order_typestring

Type of the order, e.g., 'limit' or 'market'.

8
quantitystring

The amount of base currency specified in the order.

9
pricestring

The price per unit of base currency in terms of the quote currency.

10
statusstring

Current status of the order (e.g., 'pending', 'filled', 'rejected').

11
created_atstring (ISO 8601)

Timestamp when the order was created.

12
updated_atstring (ISO 8601)

Timestamp when the order was last updated.

13
filled_quantitystring

Amount of base currency that has been filled so far.

14
remaining_quantitystring

Amount of base currency remaining to be filled.

15
quote_idstring (UUID)

The identifier of the quote used to create this order.

16
fillsarray

An array of trade fills representing partial or full executions of the order. Each fill includes id, order_id, quantity, and created_at.

17
quote_consumptionobject

Details about the quote usage for this order. Includes quote_id, consumed_quantity (amount of the quote used), and remaining_quantity (amount still available on the quote).

18
metadataobject

Contains additional request information including the unique request_id for tracking.

19
timestampstring (ISO 8601)

Timestamp when the API response was generated.

Sample Create Order Response

Get Orders

Retrieves a list of all orders for the user. Each order includes its status, quantities, price, and exchange details, helping you track all trading activity quickly.

Get Orders

Get Orders Response
1
successboolean

Indicates whether the request was successful. True means orders were retrieved without errors.

2
messagestring

Message confirming the result of the request, useful for user feedback or debugging.

3
idstring (UUID)

Unique identifier of the order, used to reference or manage it later.

4
base_currencystring

The cryptocurrency being traded (e.g., 'BTC').

5
quote_currencystring

The currency used to price the base currency (e.g., 'USDT').

6
sidestring

Indicates whether the order is 'BUY' or 'SELL'.

7
order_typestring

Type of the order, e.g., 'limit' or 'market'.

8
statusstring

Current status of the order (e.g., 'pending', 'filled', 'rejected').

9
quantitystring

Total amount of base currency in the order.

10
pricestring

Price per unit of base currency in terms of the quote currency.

11
filled_quantitystring

Amount of base currency that has been executed so far.

12
remaining_quantitystring

Amount of base currency still pending execution.

13
exchangestring

Exchange where the order was submitted.

14
created_atstring (ISO 8601)

Timestamp when the order was created.

15
updated_atstring (ISO 8601)

Timestamp when the order was last updated.

16
metadataobject

Contains additional request information including the unique request_id for tracking.

17
timestampstring (ISO 8601)

Timestamp when the API response was generated.

Sample Get Orders Response

Get Order By ID

Retrieve detailed information about a specific order using its unique ID. This endpoint returns the order's current status, filled and remaining quantities, price, and timestamps.

Get Order By ID

Get Order By ID Response
1
successboolean

Indicates whether the request was successful.

2
messagestring

Message confirming the result of the request.

3
idstring (UUID)

Unique identifier for the order.

4
base_currencystring

The base currency of the trading pair (e.g., 'BTC', 'USDC').

5
quote_currencystring

The quote currency of the trading pair (e.g., 'USDT').

6
sidestring

Indicates whether the order is 'BUY' or 'SELL'.

7
order_typestring

Type of the order, e.g., 'limit' or 'market'.

8
quantitystring

Total amount of base currency in the order.

9
pricestring

Price per unit of base currency in terms of the quote currency.

10
statusstring

Current status of the order (e.g., 'pending', 'filled', 'rejected').

11
exchangestring

The exchange where the order was submitted.

12
created_atstring (ISO 8601)

Timestamp when the order was created.

13
updated_atstring (ISO 8601)

Timestamp when the order was last updated.

14
filled_quantitystring

Amount of base currency that has been filled.

15
remaining_quantitystring

Amount of base currency remaining to be filled.

16
metadataobject

Contains additional request information including the unique request_id for tracking.

17
timestampstring (ISO 8601)

Timestamp when the API response was generated.

Sample Get Order By ID Response

Get Prices

Use Case

Retrieve the latest prices for all supported trading pairs. Use this to display live market rates, power conversion previews, or check prices before creating a quote.

Get Prices

Response Body
1
successboolean

Indicates whether the request was successful.

2
messagestring

A message confirming the result of the request.

3
pricesarray

A list of price objects for each supported trading pair.

4
base_currencystring

The base currency of the pair (e.g., BTC, USDC).

5
quote_currencystring

The quote currency of the pair (e.g., USDT, USDC).

6
pricestring

The current price of one unit of the base currency in terms of the quote currency.

7
as_ofstring (ISO 8601)

Timestamp indicating when this price was last updated.

8
metadataobject

Contains the unique request_id for tracking.

9
timestampstring (ISO 8601)

Timestamp when the API response was generated.

Sample Get Prices Response

Get Quote by ID

Use Case

Check the consumption and expiry status of a quote you created. Returns how much of the quote's original quantity has been consumed, whether it's expired or exhausted, and how many orders have been submitted against it. Useful when a user hesitates on an order and you need to decide whether to re-quote before submitting.

Get Quote by ID

Path Parameters
1
idUUIDRequired

Quote identifier returned by POST /api/trading/quotes.

Response Fields
1
data.quote_idUUID

The quote being inspected (echo of the path param).

2
data.original_quantityString

Quantity the quote was created with.

3
data.consumed_quantityString

Sum of quantities across orders submitted against this quote.

4
data.remaining_quantityString

original_quantity minus consumed_quantity — how much of the quote can still be filled.

5
data.priceString

Locked price from the original quote.

6
data.expires_atDate

When the quote's TTL elapses and it can no longer be used.

7
data.is_expiredBoolean

True once expires_at has passed.

8
data.is_exhaustedBoolean

True when remaining_quantity is zero — all of the quote has been consumed.

9
data.consumption_countString

Number of orders submitted against this quote. Useful for detecting partial-fill retries.

Expired or Exhausted Quotes

Submitting an order against a quote that's is_expired: true or is_exhausted: true returns a QUOTE_EXPIRED / QUOTE_EXHAUSTED error. Create a fresh quote before retrying.

Sample Response

Create Scheduled Order (DCA)

Use Case

Create a recurring buy that fires on a fixed frequency — daily, weekly, or monthly — at a specific execution_time. Standard pattern for dollar-cost averaging (DCA): set a fixed amount in the smallest unit of the target currency, choose a cadence, and let the engine run the order at each tick.

Create Scheduled Order

Request Body
1
currencystringRequired

Asset being bought on each execution (e.g. 'BTC').

2
quote_currencystringRequired

Currency paying for each tick (e.g. 'USDT', 'USDC').

3
amountstringRequired

Amount to spend per execution, expressed as an integer string in the smallest unit of quote_currency (e.g. '50000000' on a USDT pair = 50 USDT per tick for 6-decimal minor units).

4
frequencystringRequired

How often to execute. One of 'daily', 'weekly', or 'monthly'.

5
execution_timestringRequired

Time of day (UTC) when each execution fires, in 'HH:MM' 24-hour format (e.g. '09:00').

6
day_of_weeknumberConditional

Required for 'weekly' frequency. 0 = Sunday … 6 = Saturday. Ignored for daily/monthly — pass 0.

7
day_of_monthnumberConditional

Required for 'monthly' frequency. 1–28 recommended (values 29–31 skip months without that day). Ignored for daily/weekly — pass 0.

8
referencestringOptional

Client-generated identifier for idempotency and internal tracking.

Unused `day_of_*` Fields

The API requires both day_of_week and day_of_month on every request, but ignores the one that doesn't apply to your chosen frequency. Pass 0 for the unused field.

Sample Request
Sample Response

List Scheduled Orders

Use Case

Return all scheduled orders for your company. Filter by status (active, paused, cancelled, completed) to show only the ones that matter on your dashboard.

List Scheduled Orders

Query Parameters
1
statusstringOptional

Filter by lifecycle state: 'active', 'paused', 'cancelled', 'completed'.

Response Fields
1
data.schedulesArray<Schedule>

Every scheduled order for your company. Each entry uses the same shape returned by Create Scheduled Order — refer to that section for per-field docs.

2
data.schedules[].total_executionsNumber

Count of ticks that have fired so far.

3
data.schedules[].total_amount_spentString

Cumulative quote-currency amount deducted across all executions (smallest unit).

4
data.schedules[].total_quantity_acquiredString

Cumulative base-asset quantity acquired across all executions.

5
data.schedules[].last_executed_atString

RFC 3339 / ISO 8601 timestamp of the most recent tick. Empty string on schedules that haven't fired yet.

Sample Response

Get Scheduled Order

Use Case

Retrieve a single scheduled order by ID. The response returns the schedule under data.schedule with its current state, cadence, next execution time, and cumulative execution stats (total_executions, total_amount_spent, total_quantity_acquired).

Get Scheduled Order

Path Parameters
1
idUUIDRequired

Scheduled order identifier from Create Scheduled Order.

Response Fields
1
successBoolean

Top-level flag indicating the schedule was retrieved.

2
messageString

Human-readable status message.

3
data.scheduleObject

The schedule record. Fields mirror Create Scheduled Order's response plus cumulative execution stats.

4
data.schedule.idUUID

Schedule identifier.

5
data.schedule.company_idUUID

Company that owns the schedule.

6
data.schedule.currencyString

Asset being acquired on each tick (e.g. 'BTC').

7
data.schedule.quote_currencyString

Currency used to fund each tick (e.g. 'USDT').

8
data.schedule.amountString

Per-tick spend in the smallest unit of quote_currency.

9
data.schedule.frequencyString

'daily', 'weekly', or 'monthly'.

10
data.schedule.day_of_weekInteger

0–6 (Sunday=0) when frequency is 'weekly'; 0 otherwise.

11
data.schedule.day_of_monthInteger

1–31 when frequency is 'monthly'; 0 otherwise.

12
data.schedule.execution_timeString

24-hour HH:MM firing time in UTC.

13
data.schedule.statusString

'active', 'paused', 'cancelled', or 'completed'.

14
data.schedule.next_execution_atDate

Next scheduled run. Null when status is terminal.

15
data.schedule.last_executed_atString

Timestamp of the most recent execution. Empty string when the schedule has never fired.

16
data.schedule.total_executionsInteger

Number of ticks that have fired.

17
data.schedule.total_amount_spentString

Cumulative quote_currency spent across all executions.

18
data.schedule.total_quantity_acquiredString

Cumulative currency acquired across all executions.

19
data.schedule.created_atDate

When the schedule was created.

20
data.schedule.updated_atDate

When the schedule was last modified.

21
data.schedule.referenceString

Client-supplied idempotency key.

22
metadata.request_idString

Unique request identifier for support and tracing.

23
timestampDate

Server time when the response was generated.

Sample Response

Update Scheduled Order

Use Case

Adjust a recurring order in place without cancelling and re-creating it. Common uses: pause/resume (status: "paused" / "active"), change the per-tick amount, or shift execution_time. Fields omitted from the request are left untouched; next_execution_at is only recomputed when you change the cadence anchors (frequency, day_of_week, day_of_month, execution_time).

Update Scheduled Order

Body Parameters
1
amountStringOptional

New per-tick spend in the smallest unit of quote_currency. Takes effect on the next execution.

2
frequencyStringOptional

New cadence: 'daily', 'weekly', or 'monthly'. Changing this resets next_execution_at.

3
day_of_weekIntegerOptional

0–6 (Sunday=0). Only meaningful when frequency is 'weekly'.

4
day_of_monthIntegerOptional

1–31. Only meaningful when frequency is 'monthly'.

5
execution_timeStringOptional

24-hour HH:MM firing time in UTC. Changing this reschedules next_execution_at.

6
statusStringOptional

'paused' to stop future executions without cancelling, or 'active' to resume a paused schedule.

Pausing a Schedule

Setting status: "paused" freezes future executions but keeps the schedule on record — resume it at any time by sending another update with status: "active". next_execution_at is preserved, so the schedule picks up from where it left off.

Response Fields
1
successBoolean

Flag indicating the update was applied.

2
messageString

Human-readable status message.

3
data.scheduleObject

The updated schedule record. Shape is identical to Get Scheduled Order.

4
metadata.request_idString

Unique request identifier for support and tracing.

5
timestampDate

Server time when the response was generated.

Sample Request
Sample Response

Get Scheduled Order Executions

Use Case

Return the execution history for a scheduled order — one entry per cadence tick, with the fill price, quantity, and link to the underlying order. Drives progress charts and reconciliation.

Get Scheduled Order Executions

Response Fields
1
data.executionsArray<Execution>

Per-tick execution records, ordered newest first.

2
data.executions[].idUUID

Execution identifier.

3
data.executions[].order_idUUID

ID of the underlying order created for this tick (usable with Get Order by ID).

4
data.executions[].statusString

'completed', 'failed', or 'skipped'.

5
data.executions[].quantityString

Base-asset amount purchased / sold on this tick.

6
data.executions[].priceString

Fill price for this tick.

7
data.executions[].quote_amountString

Quote-currency amount spent (for buys) or received (for sells).

8
data.executions[].executed_atDate

RFC 3339 / ISO 8601 timestamp of when this tick ran.

Sample Response

Create Target Order

Use Case

Create a price-triggered order that fires once the market hits your target_price — the limit-style primitive for the Trading API. side: "buy" fires when the market falls to or below target; side: "sell" fires when the market rises to or above target.

Create Target Order

Request Body
1
base_currencyStringRequired

Asset to buy or sell (e.g. 'BTC').

2
quote_currencyStringRequired

Currency the target_price is expressed in.

3
sideStringRequired

'buy' or 'sell'.

4
quantityStringRequired

Amount of base_currency to trade once triggered.

5
target_priceStringRequired

Trigger price in quote_currency units. Buy orders trigger at <= target; sell orders trigger at >= target.

6
expires_atDateOptional

When the order should auto-cancel if never triggered. Empty string when the order has no expiry.

7
referenceStringOptional

Client-generated identifier for idempotency and tracking.

Response Fields
1
successBoolean

Flag indicating the target order was created.

2
messageString

Human-readable status message.

3
data.orderObject

The created target order.

4
data.order.idUUID

Target order identifier.

5
data.order.company_idUUID

Company that owns the order.

6
data.order.base_currencyString

Asset to buy or sell.

7
data.order.quote_currencyString

Pricing currency for target_price.

8
data.order.sideString

'BUY' or 'SELL' (returned uppercase).

9
data.order.quantityString

Total base-asset amount requested.

10
data.order.filled_quantityString

Base-asset amount already filled.

11
data.order.remaining_quantityString

Base-asset amount still pending: quantity - filled_quantity.

12
data.order.target_priceString

Trigger price in quote_currency.

13
data.order.average_fill_priceString

Volume-weighted average price across fills. Empty string until the first fill.

14
data.order.locked_amountString

Quote-currency amount escrowed at creation (includes fees). Returned to the wallet on cancel/expiry.

15
data.order.remaining_lockedString

Portion of locked_amount still reserved and not yet consumed by fills.

16
data.order.locked_currencyString

Currency held in escrow — quote_currency for buys, base_currency for sells.

17
data.order.statusString

'active', 'triggered', 'filled', 'cancelled', or 'expired'.

18
data.order.expires_atString

Auto-cancel timestamp. Empty string when the order has no expiry.

19
data.order.first_triggered_atString

Timestamp of the first trigger. Empty until the target price is hit.

20
data.order.last_fill_atString

Timestamp of the most recent fill. Empty until the first fill.

21
data.order.fully_filled_atString

Timestamp when the order was completely filled. Empty while partial or active.

22
data.order.created_atDate

When the order was created.

23
data.order.updated_atDate

When the order was last modified.

24
data.order.referenceString

Client-supplied idempotency key echoed back. Empty string when not provided.

25
metadata.request_idString

Unique request identifier for support and tracing.

26
timestampDate

Server time when the response was generated.

Funds Locked at Creation

locked_amount is escrowed the moment the order is created — for buys this is quantity × target_price plus fees in quote_currency, and for sells it's quantity of base_currency. This reservation is released back to the wallet if the order is cancelled or expires without fully filling.

Sample Request
Sample Response

List Target Orders

Use Case

Return all target orders under data.orders[]. Each entry is the full target-order record — same shape as Create Target Order's data.order, including the escrow fields (locked_amount, remaining_locked, locked_currency) and state timestamps. Filter by status to surface only what you care about.

List Target Orders

Query Parameters
1
statusStringOptional

Filter by lifecycle state: 'active', 'triggered', 'filled', 'cancelled', or 'expired'.

Response Fields
1
successBoolean

Flag indicating the query succeeded.

2
messageString

Human-readable status message.

3
data.ordersArray<TargetOrder>

List of target orders. Each entry is the full Create Target Order shape — see that section for per-field documentation.

4
metadata.request_idString

Unique request identifier for support and tracing.

5
timestampDate

Server time when the response was generated.

Sample Response

Get Target Order

Use Case

Retrieve a single target order by ID under data.order. Use this to poll a specific order's lifecycle — it surfaces status, filled_quantity / remaining_quantity, average_fill_price, the escrow fields (locked_amount / remaining_locked / locked_currency), and state timestamps (first_triggered_at, last_fill_at, fully_filled_at).

Get Target Order

Path Parameters
1
idUUIDRequired

Target order identifier.

Response Fields
1
successBoolean

Flag indicating the order was retrieved.

2
messageString

Human-readable status message.

3
data.orderObject

The target order record. Shape is identical to Create Target Order's data.order — refer to that section for per-field docs.

4
metadata.request_idString

Unique request identifier for support and tracing.

5
timestampDate

Server time when the response was generated.

Following a Trigger

Once the market hits the target, first_triggered_at becomes populated and fills flow in — filled_quantity, average_fill_price, and last_fill_at update per fill. When the order is fully filled, status flips to filled and fully_filled_at is set. remaining_locked tracks unspent escrow and is released back to the wallet on cancel, expiry, or final fill.

Sample Response
Did you find this page useful?