market:options:tickers

Subscribes/Unsubscribes to market options Tickers data.

Make sure you're connected. Either the instrument or exchange have to be specified - one needs to be specified, but both cannot be empty.

Note that there is a dedicated URL for this subscription: wss://ws.web3api.io/options.

Request

{
  "jsonrpc" : "2.0",
  "id"      : 1,
  "method"  : "subscribe",
  "params"  : [ "market:options:tickers", { "instrument": "ETH-30SEP22-9000-P", "exchange": "deribit" } ]
}
ParamTypeDescription
instrumentstringThe asset instrument.
exchangestringThe exchange for which to retrieve asset instruments.

Response

"result": {
  "exchange": "deribit",
  "instrument": "ETH-30SEP22-9000-P",
  "exchangeTimestamp": 1638117438407,
  "exchangeTimestampNanoseconds": 0,
  "timestamp": 1638117438407,
  "bid": 0.002,
  "ask": 0.003,
  "mid": 0.0025,
  "last": 0.0025,
  "baseVolume": null,
  "quoteVolume": null,
  "bidVolume": 5227.0,
  "askVolume": 737.0,
  "sequence": null,
  "metadata": null,
  "underlyingPrice": 4080.34,
  "underlyingIndex": "ETH-30SEP22",
  "stats": {
    "volume": 68.0,
    "price_change": 0.0,
    "low": 0.0025,
    "high": 0.003
  },
  "state": "open",
  "settlementPrice": 0.0,
  "openInterest": 48567.0,
  "minPrice": 0.0001,
  "maxPrice": 0.024,
  "markPrice": 0.0024600000000000004,
  "markIv": 132.26,
  "interestRate": 0.0,
  "indexPrice": 4059.06,
  "greeks": {
    "vega": 0.5728300000000001,
    "theta": -1.1605,
    "rho": 0.06139000000000001,
    "gamma": 3.0000000000000004e-05,
    "delta": 0.01929
  },
  "estimatedDeliveryPrice": 4059.06,
  "bidIv": 128.74,
  "askIv": 135.85,
}
FieldTypeDescription
exchangestringThe exchange.
instrumentstringThe instrument.
exchangeTimestampnumber | nullTimestamp that the exchange returned.
exchangeTimestampNanosecondsnumber | nullNanoseconds part of exchangeTimestamp.
timestampnumber | nullThe time at which the ticker took place.
bidnumber | nullThe bid of the market pair.
asknumber | nullThe ask of the market pair.
midnumber | nullThe mid of the market pair.
lastnumber | nullThe last of the market pair.
baseVolumenumber | null
quoteVolumenumber | null
bidVolumenumber | nullIt represents the requested order size of all best bids.
askVolumenumber | nullIt represents the requested order size of all best asks.
sequencenumber | null
metadatanumber | null
underlyingPricestring | nullUnderlying price for implied volatility calculations.
underlyingIndexstring | nullName of the underlying future, or indexPrice.
statsobject | null
stats.highnumber | nullHighest price during 24h.
stats.lownumber | nullLowest price during 24h.
stats.volumenumber | nullVolume during last 24h in base currency.
stats.price_changenumber | null24-hour price change expressed as a percentage, null if there weren't any trades.
statestring | nullThe state of the order book. Possible values are open and closed.
settlementPricenumber | nullThe settlement price for the instrument. Only when state = open.
openInterestnumber | nullThe total amount of outstanding contracts in the corresponding amount units. For perpetual and futures the amount is in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH.
minPricenumber | nullThe minimum price for the future. Any sell orders you submit lower than this price will be clamped to this minimum.
maxPricenumber | nullThe maximum price for the future. Any buy orders you submit higher than this price, will be clamped to this maximum.
markPricenumber | nullThe mark price for the instrument.
markIvnumber | nullImplied volatility for mark price.
interestRatenumber | nullInterest rate used in implied volatility calculations.
indexPricenumber | nullCurrent index price.
greeksobject | null
greeks.deltanumber | nullThe delta value for the option.
greeks.gammanumber | nullThe gamma value for the option.
greeks.rhonumber | nullThe rho value for the option.
greeks.thetanumber | nullThe theta value for the option.
greeks.veganumber | nullThe vega value for the option.
estimatedDeliveryPricenumber | nullEstimated delivery price for the market.
bidIvnumber | nullImplied volatility for best bid.
askIvnumber | nullImplied volatility for best ask.

Example

const WebSocket = require('ws');
const ws = new WebSocket('wss://ws.web3api.io/options', {headers: {x-api-key:'<api_key>'}});

ws.on('open', () => {
  ws.send(JSON.stringify({
      jsonrpc: '2.0',
      method: 'subscribe',
      params: ['market:options:tickers', {'instrument': 'ETH-30SEP22-9000-P', 'exchange': 'deribit'}],
      id: 1,
    }));
});

ws.on('message', data => {
  console.log(JSON.stringify(JSON.parse(data), null, 2));
});