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?

Join our Discord