Get Orders

All Orders

GET https://api.liquid.com/orders?funding_currency={funding_currency}&product_id={product_id}

Get all orders with optional parameters as filters.

Query Parameters

NameTypeDescription

status

string

Filter by live, filled, cancelled.

side

string

Only for status live, specify buy or sell side.

funding_currency

string

Filter by funding currency e.g. USD.

product_id

string

Filter by a pair's ID e.g. 1.

trading_type

string

Filter by spot, margin, cfd, perpetual.

with_details

string

Set to 1 to get a breakdown of executions.

limit

string

Set to 10 to return 10 results, default results is 20 and maximum is 100.

page

string

Use together with the limit filter, limit=10 and page=2 returns result from 11th to 20th.

{
    "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
}

Single Order

GET https://api.liquid.com/orders/{order_id} OR /orders/client:{client_order_id}

Get order status by providing order ID or client order ID.

Path Parameters

NameTypeDescription

client_order_id

string

Client Order ID. /orders/client:{client_order_id}

order_id

string

System generated order ID.

{
    "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": "1z2bq",
    "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 a single order by providing the client order ID.

An Order's Trade

GET https://api.liquid.com/orders/{order_id}/trades

An order consist of one or multiple trades, get trades that are tied to an orders.

Path Parameters

NameTypeDescription

order_id

string

Example order ID 2367000000.

[
  {
    "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"
  }
]

Last updated