Product Data

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

Information of product pairs.

GET https://api.liquid.com/products

Get all pairs for Spot, Margin, Infinity, does not include Perpetuals.

Path Parameters

NameTypeDescription

Product ID

String

To receive details of a single product pair.

Example:

https://api.liquid.com/products/1

{
    "id": "1",
    "product_type": "CurrencyPair",
    "code": "CASH",
    "name": " CASH Trading",
    "market_ask": "41831.35",
    "market_bid": "41810.09",
    "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.003",
    "maker_fee": "0.0",
    "low_market_bid": "41153.44",
    "high_market_ask": "42805.42",
    "volume_24h": "37.82962566",
    "last_price_24h": "41537.45",
    "last_traded_price": "41796.69",
    "last_traded_quantity": "0.00011119",
    "average_price": "41790.82728",
    "quoted_currency": "USD",
    "base_currency": "BTC",
    "tick_size": "0.01",
    "disabled": false,
    "margin_enabled": true,
    "cfd_enabled": true,
    "perpetual_enabled": false,
    "last_event_timestamp": "1641809159.198985968",
    "timestamp": "1641809159.198985968",
    "multiplier_up": "1.4",
    "multiplier_down": "0.6",
    "average_time_interval": 300,
    "progressive_tier_eligible": true,
    "exchange_rate": 0
}

Perpetual Products

GET https://api.liquid.com/products?perpetual=1

Query Parameters

NameTypeDescription

perpetual

string

Get all perpetual pairs with perpetual=1.

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

Swap Rate for a Perpetual Product

GET 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).

Path Parameters

NameTypeDescription

product_id

string

603 for P-BTCJPY or 604for P-BTCUSD

Query Parameters

NameTypeDescription

timestamp_gte

string

1598500000 to get results greater than and equal to this timestamp

timestamp_lte

string

1598500000 to get results lower than and equal to this timestamp

limit

string

20 to return 20 results.

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

Order Book

GET https://api.liquid.com/products/{product_id}/price_levels?full=1

Get the bids and asks.

Path Parameters

NameTypeDescription

product_id

string

Product ID 1 for BTCUSD.

Query Parameters

NameTypeDescription

full

string

Specify ?full=1 to get the full order book.

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

Trade Feed

GET https://api.liquid.com/executions?product_id={product_id}&limit={limit}&page={page}

Get historical orders that were executed a.k.a. trade feed.

Query Parameters

NameTypeDescription

product_id

string

Specify ?product_id=1 for BTCUSD.

timestamp

string

Request for result starting from timestamp=160000000

limit

string

10 results to return when limit=10

page

string

Use together with limit, a limit of 10 and page=2 will return results from 11th - 20th.

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

Chart Data (K-Line)

GET https://api.liquid.com/products/{product_id}/ohlc?resolution={resolution}

Get candle sticks data, ohlc stands for open, high, low, close.

Path Parameters

NameTypeDescription

product_id

string

Product ID 1 for BTCUSD.

Query Parameters

NameTypeDescription

resolution

string

Specify resolution=60 to get minute candles, resolution=3600 to get hourly candles, multiply 3600 by 24 to get daily candles.

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

Perpetual Index Chart

GET 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.

Path Parameters

NameTypeDescription

product_id

string

For P-BTCJPY specify 603 and for P-BTCUSD specify 604

Query Parameters

NameTypeDescription

resolution

string

Specify resolution=60 to get minute to minute index price. To get hourly index price specify resolution=3600

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

Last updated