Developers

Get filtered instruments

List instruments filtered by kind, base or quote currency.

On this page

URLs and generated code samples on this page: Testnet (chain ID 326). Other code on this page doesn't change: it stays on testnet until you switch it in your code. Tutorials, signing cases and live tools always use testnet.

SDKclient.get_filtered_instruments(...)
HTTPPOST https://market-data.testnet.grvt.io/full/v1/instruments, or /lite/v1/instruments for lite names (the SDKs' default)
WebSocketmethod v1/instruments on wss://market-data.testnet.grvt.io/ws/full, or /ws/lite for lite names
AuthNone (public)
RetriesRead: the SDKs retry retryable errors (rules)
Contract idinstrument.get_filtered_instruments (RPCGetFilteredInstrumentsV1)

Request

Body type ApiGetFilteredInstrumentsRequest. Fields the server fills are left out.

  • kindlite name karray<enum Kind>optionaldefault all#
    The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned
    6 values
    PERPETUAL, FUTURE, CALL, PUT, SPOT_SWAP, STABLE_PERP (details).
  • baselite name barray<string>optionaldefault all#
    The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned
  • quotelite name qarray<string>optionaldefault all#
    The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned
  • is_activelite name iabooloptionaldefault false#
    Request for active instruments only
  • limitlite name linteger (uint32)optionaldefault 500#
    The limit to query for. Defaults to 500; Max 100000

Response

Body type ApiGetFilteredInstrumentsResponse (the same object is the JSON-RPC result over WebSocket).

resultlite name rarray<InstrumentDisplay>required#
The instruments matching the request filter
  • instrumentlite name istring (instrument name)required#
    The instrument name, e.g. BTC_USDT_Perp (perpetual), BTC_USDT_SFP (stable funding perp) or BTC_USDT_SpotSwap (spot swap).
  • instrument_hashlite name ihstring (uint256)required#
    The asset ID used for instrument signing.
  • baselite name bstringrequired#
    The base currency
  • quotelite name qstringrequired#
    The quote currency
  • kindlite name kenum Kindrequired#
    The kind of instrument
    6 values
    PERPETUAL, FUTURE, CALL, PUT, SPOT_SWAP, STABLE_PERP (details).
  • venueslite name varray<enum Venue>required#
    Venues that this instrument can be traded at
    2 values
    ORDERBOOK, RFQ (details).
  • settlement_periodlite name sp1enum InstrumentSettlementPeriodoptional#
    The settlement period of the instrument
    5 values
    PERPETUAL, DAILY, WEEKLY, MONTHLY, QUARTERLY (details).
  • base_decimalslite name bdinteger (int8)required#
    The smallest denomination of the base asset supported by Grvt (+3 represents 0.001, -3 represents 1000, 0 represents 1)
  • quote_decimalslite name qdinteger (int8)required#
    The smallest denomination of the quote asset supported by Grvt (+3 represents 0.001, -3 represents 1000, 0 represents 1)
  • tick_sizelite name tsstringrequired#
    The size of a single tick. Decimal string, e.g. "0.1"; up to 9 decimals.
  • min_sizelite name msstringrequired#
    The minimum contract size. Decimal string, e.g. "0.01"; up to the instrument's base_decimals.
  • create_timelite name ctstring (int64 unix ns)required#
    Creation time in unix nanoseconds
  • max_position_sizelite name mpstringoptional#
    The maximum position size. Decimal string, e.g. "0.01"; up to the instrument's base_decimals.
  • funding_interval_hourslite name fiinteger (uint8)optional#
    Defines the funding interval to be applied.
  • adjusted_funding_rate_caplite name afstringoptional#
    Funding rate cap over the defined intervalHours.
  • adjusted_funding_rate_floorlite name af1stringoptional#
    Funding rate floor over the defined intervalHours.
  • min_notionallite name mnstringrequired#
    The minimum order notional value, in the quote asset. Decimal string, e.g. "12.5".
  • asset_classlite name acenum AssetClassoptional#
    The asset class of the underlying the instrument tracks
    10 values
    CRYPTO, EQUITY, COMMODITY, FX, INDEX, EQUITY_NASDAQ, EQUITY_NYSE, EQUITY_KRX, COMMODITY_CME, PRE_IPO (details).
  • statuslite name senum InstrumentStatusoptional#
    The current lifecycle/trading status of the instrument
    7 values
    ACTIVE, REDUCE_ONLY, MAINTENANCE, HALTED, CLOSED, PENDING, DELISTED (details).
  • guaranteed_exit_bandlite name gestringoptional#
    The guaranteed exit band, expressed in percentage points
  • spread_penalty_tolerancelite name sp2stringoptional#
    The spread penalty tolerance, expressed in percentage points
  • funding_cap_adjustment_timelite name fcstring (int64 unix ns)optional#
    Timestamp in unix nanoseconds at which the funding cap adjustment applies
  • funding_cap_adjustment_valuelite name fc1stringoptional#
    The funding cap adjustment value, expressed as a decimal daily rate
  • triple_swap_daylite name ts2enum DayOfWeekoptional#
    Stable perps only: the weekday whose daily funding charge covers 3 days (the weekend)
    7 values
    MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY (details).

Errors

Errors come back as {"code", "message", "status"} (lite {"c", "m", "s"}) with the HTTP status. Codes this call can return (all error codes):

3 errors any call can return; none specific to this one
1002InternalServer500
Internal Server Error
1003InvalidRequest400
Request could not be processed due to malformed syntax
1006RateLimit429retryable
You have surpassed the allocated rate limit for your tier

Example

Example code
from grvt import Grvt

with Grvt(env="testnet") as client:
    resp = client.get_filtered_instruments(
        limit=500,
    )
    print(resp)

Raw HTTP (set GRVT_DOMAIN, see Environments):

With full field names:

curl -sS "https://market-data.testnet.grvt.io/full/v1/instruments" \
  -H "Content-Type: application/json" \
  --data @- <<EOF
{
  "limit": 500
}
EOF

With lite field names:

curl -sS "https://market-data.testnet.grvt.io/lite/v1/instruments" \
  -H "Content-Type: application/json" \
  --data @- <<EOF
{
  "l": 500
}
EOF
Run on testnet
esc

↑ ↓ move↵ open⇧↵ open .mdTry an error code like 2002

Keyboard shortcuts

⌘ K
Search the docs
/
Search
l
Next code language (Python → TypeScript → Go → Rust → curl → WebSocket)
j / k
Next / previous page
t
Light / dark theme
?
This help
Esc
Close dialogs and drawers