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.

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
Did you find this page useful?