Product Data

Get public data on products. The word "product" and "pair" are used interchangeably here.

get
All Products

https://api.liquid.com/products
Get all pairs for Spot, Margin, Infinity, does not include Perpetuals.
Request
Response
Request
Response
200: OK
"margin_enabled": true Product is enabled for Margin trading when true. "cfd_enabled": true Product is enabled for Infinity trading when true.
{
"id": "659",
"product_type": "CurrencyPair",
"code": "CASH",
"name": null,
"market_ask": 12.5,
"market_bid": 12.04,
"indicator": null,
"currency": "USD",
"currency_pair_code": "EWTUSD",
"symbol": null,
"btc_minimum_withdraw": null,
"fiat_minimum_withdraw": null,
"pusher_channel": "product_cash_ewtusd_659",
"taker_fee": "0.0",
"maker_fee": "0.0",
"low_market_bid": "11.91",
"high_market_ask": "12.5",
"volume_24h": "2361.64741972",
"last_price_24h": "11.92",
"last_traded_price": "12.32",
"last_traded_quantity": "2.00340964",
"average_price": "12.33314",
"quoted_currency": "USD",
"base_currency": "EWT",
"tick_size": "0.01",
"disabled": false,
"margin_enabled": false,
"cfd_enabled": false,
"perpetual_enabled": false,
"last_event_timestamp": "1598864820.004941733",
"timestamp": "1598864820.004941733",
"multiplier_up": "1.4",
"multiplier_down": "0.6",
"average_time_interval": 300
},
{
"id": "1",
"product_type": "CurrencyPair",
"code": "CASH",
"name": " CASH Trading",
"market_ask": 11628.9,
"market_bid": 11619.42,
"indicator": 1,
"currency": "USD",
"currency_pair_code": "BTCUSD",
"symbol": "$",
"btc_minimum_withdraw": null,
"fiat_minimum_withdraw": null,
"pusher_channel": "product_cash_btcusd_1",
"taker_fee": "0.0",
"maker_fee": "0.0",
"low_market_bid": "11576.4",
"high_market_ask": "11751.04",
"volume_24h": "138.1747948",
"last_price_24h": "11577.59",
"last_traded_price": "11626.37",
"last_traded_quantity": "0.1201",
"average_price": "11628.69213",
"quoted_currency": "USD",
"base_currency": "BTC",
"tick_size": "0.01",
"disabled": false,
"margin_enabled": true,
"cfd_enabled": true,
"perpetual_enabled": false,
"last_event_timestamp": "1598865015.73273117",
"timestamp": "1598865015.73273117",
"multiplier_up": "1.4",
"multiplier_down": "0.6",
"average_time_interval": 300
}

get
One Product

https://api.liquid.com/products/{product_id}
Get one product by providing the product ID.
Request
Response
Request
Path Parameters
product_id
required
string
Get BTCUSD with product ID 1.
Response
200: OK
{
"id": "1",
"product_type": "CurrencyPair",
"code": "CASH",
"name": " CASH Trading",
"market_ask": 11628.9,
"market_bid": 11619.42,
"indicator": 1,
"currency": "USD",
"currency_pair_code": "BTCUSD",
"symbol": "$",
"btc_minimum_withdraw": null,
"fiat_minimum_withdraw": null,
"pusher_channel": "product_cash_btcusd_1",
"taker_fee": "0.0",
"maker_fee": "0.0",
"low_market_bid": "11576.4",
"high_market_ask": "11751.04",
"volume_24h": "138.1747948",
"last_price_24h": "11577.59",
"last_traded_price": "11626.37",
"last_traded_quantity": "0.1201",
"average_price": "11628.69213",
"quoted_currency": "USD",
"base_currency": "BTC",
"tick_size": "0.01",
"disabled": false,
"margin_enabled": true,
"cfd_enabled": true,
"perpetual_enabled": false,
"last_event_timestamp": "1598865015.73273117",
"timestamp": "1598865015.73273117",
"multiplier_up": "1.4",
"multiplier_down": "0.6",
"average_time_interval": 300
}

get
Perpetual Products

https://api.liquid.com/products?perpetual=1
Request
Response
Request
Query Parameters
perpetual
required
string
Get all perpetual pairs with perpetual=1.
Response
200: OK
Currently only P-BTCJPY and P-BTCUSD are enabled as a Perpetual product.
[
{
"id": "603",
"product_type": "Perpetual",
"code": "CASH",
"name": null,
"market_ask": 1229400,
"market_bid": 1228250,
"indicator": null,
"currency": "JPY",
"currency_pair_code": "P-BTCJPY",
"symbol": "¥",
"btc_minimum_withdraw": null,
"fiat_minimum_withdraw": null,
"pusher_channel": "product_cash_p-btcjpy_603",
"taker_fee": "0.0012",
"maker_fee": "0.0",
"low_market_bid": "1221600.0",
"high_market_ask": "1245100.0",
"volume_24h": "1.2127",
"last_price_24h": "1222050.0",
"last_traded_price": "1234300.0",
"last_traded_quantity": "0.01",
"average_price": "1234300.0",
"quoted_currency": "JPY",
"base_currency": "P-BTC",
"tick_size": "50.0",
"disabled": false,
"margin_enabled": false,
"cfd_enabled": false,
"perpetual_enabled": true,
"last_event_timestamp": "1598864510.205195529",
"timestamp": "1598864510.205195529",
"multiplier_up": "9.0",
"multiplier_down": "0.1",
"average_time_interval": 300,
"index_price": "1228856.79994",
"mark_price": "1228609.39718",
"funding_rate": "0.00005",
"fair_price": "1228579.955",
"average_funding_rate_8h": "0.00032625"
},
{
"id": "604",
"product_type": "Perpetual",
"code": "CASH",
"name": null,
"market_ask": 11594.5,
"market_bid": 11576,
"indicator": null,
"currency": "USD",
"currency_pair_code": "P-BTCUSD",
"symbol": "$",
"btc_minimum_withdraw": null,
"fiat_minimum_withdraw": null,
"pusher_channel": "product_cash_p-btcusd_604",
"taker_fee": "0.0012",
"maker_fee": "0.0",
"low_market_bid": "11558.0",
"high_market_ask": "11790.0",
"volume_24h": "1.0857",
"last_price_24h": "11559.0",
"last_traded_price": "11660.0",
"last_traded_quantity": "0.01",
"average_price": "11660.0",
"quoted_currency": "USD",
"base_currency": "P-BTC",
"tick_size": "0.5",
"disabled": false,
"margin_enabled": false,
"cfd_enabled": false,
"perpetual_enabled": true,
"last_event_timestamp": "1598864510.205195529",
"timestamp": "1598864510.205195529",
"multiplier_up": null,
"multiplier_down": "0.1",
"average_time_interval": 300,
"index_price": "11583.29162",
"mark_price": "11583.31446",
"funding_rate": "0.00005",
"fair_price": "11582.51918",
"average_funding_rate_8h": "0.001285"
}
]

get
Swap Rate for a Perpetual Product

https://api.liquid.com/products/{product_id}/funding_rate_history?limit={limit}
Get every second's funding rate, available only for Perpetual pairs with IDs 603 (P-BTCJPY) and 604 (P-BTCUSD).
Request
Response
Request
Path Parameters
product_id
required
string
603 for P-BTCJPY or 604for P-BTCUSD
Query Parameters
timestamp_gte
optional
string
1598500000 to get results greater than and equal to this timestamp
timestamp_lte
optional
string
1598500000 to get results lower than and equal to this timestamp
limit
optional
string
20 to return 20 results.
Response
200: OK
{
"models": [
{
"timestamp": "1598500000.0",
"index_price": "11401.53407",
"funding_rate": "0.00138",
"mark_price": "11422.34608"
},
{
"timestamp": "1598499999.0",
"index_price": "11401.66683",
"funding_rate": "0.00136",
"mark_price": "11422.34971"
},
{
"timestamp": "1598499998.0",
"index_price": "11401.66338",
"funding_rate": "0.00135",
"mark_price": "11422.21766"
},
{
"timestamp": "1598499997.0",
"index_price": "11402.67537",
"funding_rate": "0.00134",
"mark_price": "11423.08219"
},
{
"timestamp": "1598499996.0",
"index_price": "11402.66031",
"funding_rate": "0.00134",
"mark_price": "11423.04317"
}
]
}

get
Order Book

https://api.liquid.com/products/{product_id}/price_levels?full=1
Get the bids and asks.
Request
Response
Request
Path Parameters
product_id
required
string
Product ID 1 for BTCUSD.
Query Parameters
full
optional
string
Specify ?full=1 to get the full order book.
Response
200: OK
List stars from best bid and best ask.
{
"buy_price_levels": [
[
"11645.37000",
"0.02087471"
],
[
"11645.00000",
"0.49666554"
],
[
"11644.67000",
"0.05381931"
],
[
"11644.20000",
"0.00398339"
],
[
"11644.19000",
"0.16191157"
],
[
"11644.14000",
"0.08154580"
],
[
"11644.07000",
"0.09000000"
],
[
"11643.88000",
"0.05638751"
],
[
"11643.87000",
"0.05539142"
],
[
"11643.86000",
"0.05539107"
],
[
"11643.83000",
"0.00100000"
],
[
"11643.82000",
"0.05539143"
],
[
"11643.78000",
"0.05809000"
],
[
"11643.55000",
"0.05539389"
],
[
"11643.42000",
"0.09970000"
],
[
"11643.41000",
"0.00300000"
],
[
"11643.38000",
"0.10000000"
],
[
"11643.18000",
"0.00400000"
],
[
"11643.13000",
"0.06000000"
],
[
"11643.11000",
"0.00100000"
],
[
"11643.03000",
"0.05539682"
]
],
"sell_price_levels": [
[
"11648.74000",
"0.25779263"
],
[
"11648.75000",
"0.04030000"
],
[
"11649.36000",
"0.15010000"
],
[
"11653.50000",
"0.07491424"
],
[
"11653.52000",
"0.03000000"
],
[
"11653.64000",
"0.03430000"
],
[
"11654.43000",
"1.00000000"
],
[
"11654.44000",
"0.30140000"
],
[
"11654.93000",
"0.03160000"
],
[
"11654.97000",
"0.00100000"
],
[
"11654.98000",
"0.05539142"
],
[
"11655.04000",
"0.06039682"
],
[
"11655.06000",
"0.05539389"
],
[
"11655.12000",
"0.00900000"
],
[
"11655.13000",
"0.05603000"
],
[
"11655.21000",
"0.00520000"
],
[
"11655.22000",
"0.05539143"
],
[
"11655.26000",
"0.17820000"
],
[
"11655.33000",
"0.00100000"
],
[
"11655.52000",
"0.00100000"
],
[
"11655.64000",
"0.14000000"
]
],
"timestamp": "1598871499.214378108"
}

get
Trade Feed

https://api.liquid.com/executions?product_id={product_id}&limit={limit}&page={page}
Get historical orders that were executed a.k.a. trade feed.
Request
Response
Request
Query Parameters
product_id
required
string
Specify ?product_id=1 for BTCUSD.
timestamp
optional
string
Request for result starting from timestamp=160000000
limit
optional
string
10 results to return when limit=10
page
optional
string
Use together with limit, a limit of 10 and page=2 will return results from 11th - 20th.
Response
200: OK
{
"current_page": 1,
"total_pages": 2,
"models": [
{
"id": 357103334,
"quantity": 0.05489874,
"price": 11672.15,
"taker_side": "sell",
"created_at": 1598872276
},
{
"id": 357103252,
"quantity": 0.002756,
"price": 11672.15,
"taker_side": "sell",
"created_at": 1598872274
},
{
"id": 357101860,
"quantity": 0.01793154,
"price": 11661.93,
"taker_side": "buy",
"created_at": 1598872174
},
{
"id": 357101855,
"quantity": 0.06,
"price": 11661.93,
"taker_side": "buy",
"created_at": 1598872174
},
{
"id": 357101644,
"quantity": 0.02206846,
"price": 11661.93,
"taker_side": "buy",
"created_at": 1598872151
},
{
"id": 357101531,
"quantity": 0.14398658,
"price": 11660,
"taker_side": "buy",
"created_at": 1598872143
},
{
"id": 357101530,
"quantity": 0.002,
"price": 11660,
"taker_side": "buy",
"created_at": 1598872143
},
{
"id": 357101528,
"quantity": 0.002,
"price": 11660,
"taker_side": "buy",
"created_at": 1598872143
},
{
"id": 357101526,
"quantity": 0.01,
"price": 11660,
"taker_side": "buy",
"created_at": 1598872143
},
{
"id": 357101316,
"quantity": 0.02,
"price": 11660,
"taker_side": "buy",
"created_at": 1598872120
},
{
"id": 357100802,
"quantity": 0.02201342,
"price": 11660,
"taker_side": "buy",
"created_at": 1598871991
},
{
"id": 357100581,
"quantity": 0.008,
"price": 11655.12,
"taker_side": "buy",
"created_at": 1598871957
},
{
"id": 357100574,
"quantity": 0.01,
"price": 11655.12,
"taker_side": "buy",
"created_at": 1598871950
},
{
"id": 357099383,
"quantity": 0.02214758,
"price": 11645.93,
"taker_side": "buy",
"created_at": 1598871551
},
{
"id": 357099113,
"quantity": 0.02207552,
"price": 11646.85,
"taker_side": "buy",
"created_at": 1598871411
},
{
"id": 357099098,
"quantity": 0.02202092,
"price": 11646.85,
"taker_side": "buy",
"created_at": 1598871391
},
{
"id": 357099058,
"quantity": 0.02201154,
"price": 11646.72,
"taker_side": "buy",
"created_at": 1598871371
},
{
"id": 357098843,
"quantity": 0.02197002,
"price": 11646.52,
"taker_side": "buy",
"created_at": 1598871271
},
{
"id": 357098745,
"quantity": 0.02200092,
"price": 11646.43,
"taker_side": "buy",
"created_at": 1598871211
},
{
"id": 357098698,
"quantity": 0.02196642,
"price": 11645.19,
"taker_side": "buy",
"created_at": 1598871191
}
]
}

get
Chart Data (K-Line)

https://api.liquid.com/products/{product_id}/ohlc?resolution={resolution}
Get candle sticks data, ohlc stands for open, high, low, close.
Request
Response
Request
Path Parameters
product_id
required
string
Product ID 1 for BTCUSD.
Query Parameters
resolution
required
string
Specify resolution=60 to get minute candles, resolution=3600 to get hourly candles, multiply 3600 by 24 to get daily candles.
Response
200: OK
Sorted from oldest to latest i.e. the first on the list is the oldest data. Data returned are: - timestamp - open - high - low - close - volume
{
"data":
[
[
1593842400,
9109.56,
9118.4,
9099.99,
9109.2,
5.39553224
],
[
1593846000,
9109.62,
9118.16,
9094.71,
9100.32,
0.1837079
],
[
1593849600,
9100.0,
9100.0,
9090.63,
9094.65,
0.33478034
],
[
1593853200,
9099.24,
9102.95,
9097.5,
9097.62,
0.3819536
],
[
1593856800,
9096.77,
9099.2,
9088.16,
9093.7,
0.18550804
],
[
1593860400,
9087.04,
9087.26,
9082.22,
9083.29,
1.43537128
],
[
1593864000,
9080.46,
9089.27,
9080.46,
9089.27,
0.32677048
],
[ ... ]
]
}

get
Perpetual Index Chart

https://api.liquid.com/products/{product_id}/perpetual_index_chart?resolution={resolution}
Index price is derived from 5 exchanges and price is the average of 3 out of 5.
Request
Response
Request
Path Parameters
product_id
required
string
For P-BTCJPY specify 603 and for P-BTCUSD specify 604
Query Parameters
resolution
required
string
Specify resolution=60 to get minute to minute index price. To get hourly index price specify resolution=3600
Response
200: OK
Sorted from oldest to latest, first on the list is oldest. Notice that the time interval is 60 seconds for this example. Data returned are: - timestamp - open - high - low - close
{
"data": [
[
1611631260,
"32058.50421",
"32132.38741",
"32058.50421",
"32127.48918"
],
[
1611631320,
"32120.80204",
"32231.41607",
"32118.99101",
"32201.52692"
],
[
1611631380,
"32203.13786",
"32203.20849",
"32092.15407",
"32092.15407"
],
[
1611631440,
"32095.64657",
"32110.50237",
"32051.30275",
"32051.30275"
],
[
1611631500,
"32040.44221",
"32117.95886",
"32029.20491",
"32039.96204"
],
...
]
}