Get Orders

get
All Orders

https://api.liquid.com/orders?funding_currency={funding_currency}&product_id={product_id}
Get all orders with optional parameters as filters.
Request
Response
Request
Query Parameters
funding_currency
optional
string
Filter by funding currency e.g. USD.
product_id
optional
string
Filter by a pair's ID e.g. 1.
status
optional
string
Filter by live, filled, cancelled.
trading_type
optional
string
Filter by spot, margin, cfd, perpetual.
with_details
optional
string
Set to 1 to get a breakdown of executions.
limit
optional
string
Set to 10 to return 10 results, default results is 20 and maximum is 100.
page
optional
string
Use together with the limit filter, limit=10 and page=2 returns result from 11th to 20th.
Response
200: OK
- Request with with_details=1 returns a breakdown of executions, this example shows how an order of "quantity": "5000" is broken down into multiple executions.
{
"models": [
{
"id": 2367307057,
"order_type": "market",
"quantity": "5000.0",
"disc_quantity": "0.0",
"iceberg_total_quantity": "0.0",
"side": "sell",
"filled_quantity": "5000.0",
"price": "0.00023688",
"created_at": 1586157202,
"updated_at": 1586157202,
"status": "filled",
"leverage_level": 1,
"source_exchange": null,
"product_id": 51,
"margin_type": null,
"take_profit": null,
"stop_loss": null,
"trading_type": "spot",
"product_code": "CASH",
"funding_currency": "ETH",
"crypto_account_id": null,
"currency_pair_code": "QASHETH",
"average_price": "0.00023688",
"target": "spot",
"order_fee": "0.0",
"source_action": "manual",
"unwound_trade_id": null,
"trade_id": null,
"client_order_id": "19529290-77d6-11ea-98f3-233854138485",
"settings": null,
"trailing_stop_type": null,
"trailing_stop_value": null,
"executions": [
{
"id": 291883299,
"quantity": "14.86338044",
"price": "0.00024436",
"taker_side": "sell",
"created_at": 1586157202,
"my_side": "sell"
},
{
"id": 291883300,
"quantity": "20.0",
"price": "0.00024101",
"taker_side": "sell",
"created_at": 1586157202,
"my_side": "sell"
},
{
"id": 291883301,
"quantity": "133.7353",
"price": "0.000241",
"taker_side": "sell",
"created_at": 1586157202,
"my_side": "sell"
},
{
"id": 291883302,
"quantity": "100.0",
"price": "0.000241",
"taker_side": "sell",
"created_at": 1586157202,
"my_side": "sell"
},
{
"id": 291883303,
"quantity": "3005.0",
"price": "0.00023796",
"taker_side": "sell",
"created_at": 1586157202,
"my_side": "sell"
},
{
"id": 291883304,
"quantity": "370.47347172",
"price": "0.00023795",
"taker_side": "sell",
"created_at": 1586157202,
"my_side": "sell"
},
{
"id": 291883305,
"quantity": "412.36556812",
"price": "0.000234",
"taker_side": "sell",
"created_at": 1586157202,
"my_side": "sell"
},
{
"id": 291883306,
"quantity": "628.32604286",
"price": "0.0002331",
"taker_side": "sell",
"created_at": 1586157202,
"my_side": "sell"
},
{
"id": 291883307,
"quantity": "315.23623686",
"price": "0.00023302",
"taker_side": "sell",
"created_at": 1586157202,
"my_side": "sell"
}
],
"stop_triggered_time": null,
"margin_used": "0.0",
"margin_interest": "0.0",
"unwound_trade_leverage_level": null
}
],
"total_pages": 1,
"current_page": 1
}

get
Single Order

https://api.liquid.com/orders/{order_id}
Get a single order by providing the order ID.
Request
Response
Request
Path Parameters
order_id
required
string
An example order ID is 2367307057.
Response
200: OK
{
"id": 2367307057,
"order_type": "market",
"quantity": "5000.0",
"disc_quantity": "0.0",
"iceberg_total_quantity": "0.0",
"side": "sell",
"filled_quantity": "5000.0",
"price": 0.00023688,
"created_at": 1586157202,
"updated_at": 1586157202,
"status": "filled",
"leverage_level": 1,
"source_exchange": null,
"product_id": 51,
"margin_type": null,
"take_profit": null,
"stop_loss": null,
"trading_type": "spot",
"product_code": "CASH",
"funding_currency": "ETH",
"crypto_account_id": null,
"currency_pair_code": "QASHETH",
"average_price": 0.00023688,
"target": "spot",
"order_fee": "0.0",
"source_action": "manual",
"unwound_trade_id": null,
"trade_id": null,
"client_order_id": null,
"settings": null,
"trailing_stop_type": null,
"trailing_stop_value": null,
"stop_triggered_time": null,
"margin_used": "0.0",
"margin_interest": "0.0",
"unwound_trade_leverage_level": null
}

get
An Order's Trade

https://api.liquid.com/orders/{order_id}/trades
An order consist of one or multiple trades, get trades that are tied to an orders.
Request
Response
Request
Path Parameters
order_id
required
string
Example order ID 2367000000.
Response
200: OK
- "id": 57896 is the trade ID.
[
{
"id": 57896,
"currency_pair_code": "BTCUSD",
"status": "closed",
"side": "short",
"margin_type": "cross",
"margin_used": "0.83588",
"liquidation_price": null,
"maintenance_margin": null,
"open_quantity": "0.01",
"close_quantity": "0.0",
"quantity": "0.01",
"leverage_level": 5,
"product_code": "CASH",
"product_id": 1,
"open_price": "417.65",
"close_price": "417.0",
"trader_id": 3020,
"open_pnl": "0.0",
"close_pnl": "0.0065",
"pnl": "0.0065",
"stop_loss": "0.0",
"take_profit": "0.0",
"funding_currency": "USD",
"created_at": 1456250726,
"updated_at": 1456251837,
"close_fee": "0.0",
"total_interest": "0.02",
"daily_interest": "0.02"
}
]