Luxor PlatformAPI DocumentationDerivatives

Get order book

Returns the live order book for one of the four books: a payment type (type) crossed with a duration (duration), in the denomination given by currency_type. Each contract carries its price ladder, with the daily hashrate bid and offered at each level, plus the mid-market price and the current spot hashprice. contracts is optional and defaults to every contract the book is quoting today — the monthly set rolls with the calendar and the last day of a month has already dropped that month, so a client should let the API decide it rather than hardcoding MMYY codes. A contract must belong to the book it is requested under: MMYY for MONTHLY, a D-prefixed tenor (D030–D180) for DAYS.

GET
/v2/derivatives/orderbook/{currency_type}

Authorization

LuxorAPIKey
authorization<token>

Use your API key here.

In: header

Path Parameters

currency_type*string

Currency type for derivatives operations

Value in

  • "BTC"
  • "USD"

Query Parameters

type?string

Payment book: STANDARD settles at expiry, UPFRONT pays the notional at trade

Default"STANDARD"

Value in

  • "STANDARD"
  • "UPFRONT"
duration?string

Duration book: MONTHLY quotes MMYY contracts, DAYS quotes fixed forward tenors

Default"MONTHLY"

Value in

  • "MONTHLY"
  • "DAYS"
contracts?|array<string>

Comma-separated contracts to return. Defaults to every contract the book is currently quoting.

Response Body

application/json

application/json

curl -X GET "https://example.com/v2/derivatives/orderbook/BTC"
{  "currency_type": "BTC",  "type": "STANDARD",  "duration": "MONTHLY",  "spot_hashprice": 0.00048,  "spot_hashprice_1d": 0.00047,  "contracts": [    {      "contract": "1226",      "duration_days": 0,      "mid_market_price": 0.000495,      "levels": [        {          "unit_hashprice": 0.00049,          "bid_ph": 120,          "ask_ph": null        }      ]    }  ]}
{  "statusCode": 400,  "code": "FST_ERR_VALIDATION",  "error": "Bad Request",  "message": "body/end_date Required"}