Skip to Content
HTTP APIMarket data

List instruments

Build your request

Change the values and the command follows. The token is never typed here: the command reads it from the SPECTRE_LOCAL_API_TOKEN environment variable. Run it in your own terminal.

Command
curl 'http://127.0.0.1:48180/v1/instruments?exchange=binance&market=futures&q=btc&limit=50' \
  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
/instruments

The instrument catalogue of one exchange and market, in pages ordered by symbol. Pass either connection_id or both exchange and market. Steps and minimums are null when the exchange did not report them.

Authorization

bearerToken market:read
headerAuthorizationBearer <token>

The Local API token: spt_ and 64 hex characters. Copy it from Settings App → General → Local API. It is accepted only in the Authorization header. The names listed with an operation are the scopes it requires. The token of the terminal carries all of them.

Scope: market:read

Query Parameters

connection_id?integer

The connection whose exchange and market to list.

Formatint64
exchange?string

Exchange name. Used together with market.

market?string

Market type. Used together with exchange.

q?string

Part of the symbol or of the base coin. Case does not matter.

limit?integer

Page size. A value outside the range is moved into it.

Range1 <= value <= 2000
Default500
cursor?string

next_cursor of the previous page.

Response Body

One page of the catalogue.

application/json
  1. response
exchange*string
market*string
data*array<>
next_cursor*|

Pass it as cursor for the next page. null on the last page.

Example Request
curl 'http://127.0.0.1:48180/v1/instruments?exchange=binance&market=futures&q=btc&limit=50' \  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
Example Response
{  "exchange": "binance",  "market": "futures",  "data": [    {      "instrument": "binance:futures:BTCUSDT",      "exchange": "binance",      "market": "futures",      "symbol": "BTCUSDT",      "base": "BTC",      "quote": "USDT",      "status": "active",      "tick_size": "0.1",      "lot_size": "0.001",      "min_size": "0.001",      "contract_value": "1"    }  ],  "next_cursor": null}