WebSocket API
Block Scholes API covering real-time digital asset data
Connection URL: wss://prod-websocket-api.blockscholes.com/
1. Subscription Feeds Overview
The Block Scholes WebSocket API streams real-time pricing, implied volatility, and derived analytics over a single persistent connection. It is designed for clients that need continuous, low-latency updates and want to consume many datapoints from one socket rather than polling a REST endpoint.
The interface follows the JSON-RPC 2.0 standard. After authenticating, clients send a subscribe request describing one or more batches — groups of related datapoints to receive together — and the server pushes updates back over the same connection whenever the underlying values change. Subscriptions can optionally be EIP-712 signed for on-chain verification, making the same feeds usable as a pull-based oracle source.
At a glance
One persistent WebSocket connection per client.
JSON-RPC 2.0 messaging —
authenticate,subscribe.Subscriptions are organised into batches, each with a configurable publishing rate, formatting options, and an optional
client_idfor in-place updates.Updates carry only changed values; clients should be event-driven, not poll-driven.
Optional EIP-712 signatures on every update for trustless on-chain consumption.
1.1 Instrument Pricing
Feed Type
Feed Name
Description
1.2 Implied Volatility Surface
Feed Type
Feed Name
Description
1.3 Market Data
Feed Type
Feed Name
Description
1.4 Realized Volatility
Feed Type
Feed Name
Description
2. Authentication
Connections must be authenticated before any subscriptions can be made. The API follows the JSON RPC 2.0 standard. Reach out for a free API key
2.1 Using API Key
Description: Authenticates the WebSocket connection using an API key.
Method: authenticate
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
The method name. Must be "authenticate".
params
Object
Parameters object containing authentication credentials.
params.api_key
String
Your API key for authentication.
Response (Success):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
String
Authentication result. "ok" indicates success.
3. Subscription Configuration
3.1 Batching
A batch is a group of related subscriptions sent in a single subscribe call and delivered together in a single update message. Each entry in batch[] is its own subscription — its own feed, instrument, and parameters — but they share a publishing cadence (frequency), formatting options, and (optionally) a client_id that lets you address and mutate the whole group as one unit.
Batching is the recommended way to consume multiple related datapoints. It cuts message overhead, keeps related values time-aligned in the same notification, and — via client_id — gives you a stable handle for swapping the batch's contents in place as your needs change (different strikes, new tenors, added or removed items) without tearing the subscription down and rebuilding it.
Batching Rules:
Updates are sent only if values change. This means different batches may contain different subsets of datapoints of the total subscribed for.
Batch frequency defines maximum publishing rate. Actual publish rate differs based on underlying datatype calculation frequency.
Default limit: 10 items per batch (adjustable).
Key Batch Parameters:
frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms etc
client_id
String
Optional batch identifier. Re-subscribing with the same client_id overwrites the previous batch in place — this is the canonical way to mutate an existing batch's contents (swap strikes, change tenors, add or remove items) without an explicit unsubscribe. Omit client_id to register an independent batch that cannot be overwritten by later subscriptions and must be torn down explicitly. The subscribe acknowledgement echoes the entire subscription back to you, and client_id is carried on every subsequent update notification's envelope.
batch
Array
Array of subscription entry parameters
batch[i].sid
String
Client-defined label for this batch item. Use it to attach your own context (currency, strike, tenor, internal row key, anything you need on the receiving side). The subscribe acknowledgement echoes the full subscription — so every sid comes back to you — and each subsequent update carries the matching sid under params.data.values[i].sid so you can map updates back to your own data structures
Identifying batches and items
The API exposes two identifier hooks that serve different purposes. The subscribe acknowledgement echoes your entire subscription back — including client_id and every sid — so you can confirm the server registered exactly what you sent. Both identifiers are then carried on every subsequent update for that subscription.
sid is per item. Whatever you put on batch[i].sid comes back unchanged on every update for that entry under params.data.values[i].sid. The intent is to let you stash whatever context the receiving side needs — the instrument symbol, a row index, a tag like "BTC-100000-C-26DEC26", a downstream destination key — so your handler can demultiplex incoming values without re-deriving them from the feed name and request parameters.
client_id is per batch. Every update notification for that batch carries it on the parent envelope. Its load-bearing property is that re-subscribing with the same client_id replaces the existing batch in place: the previous contents are dropped and the new batch array becomes active, with no need to send unsubscribe first. This is how clients should update a live subscription. Subscriptions sent without a client_id are independent — they cannot be overwritten by later subscriptions and must be torn down explicitly via unsubscribe.
In practice, a typical client keeps a stable client_id per logical subscription group and a meaningful sid per item; updates can then be dispatched purely from those two echoed identifiers, with no parsing of the feed payload required.
3.2 EIP-712 Signing
Signing with EIP-712 signatures is supported for update messages as an optional feature, allowing integrity & provenance verification on-chain.
To enable, include the signature configuration along with domain information in the subscription request.
For type definitions and detailed verification schema, refer to the Pull Oracle documentation section.
Example with EIP-712 Signature:
3.3 Formatting Options
The options.format object allows customization of data formatting in subscription responses.
timestamp
String
Timestamp precision. Valid values: s (seconds), ms (milliseconds), ns (nanoseconds)
hexify
Boolean
If enabled, all numeric values will be transmitted as hex strings.
decimals
Integer or Object
Number of decimals to support for numerical types in the data. When signing is requested, numerical values will be scaled by 10decimals. When no signing is requested, numerical values will be rounded to the specified number of decimals. Integer applies to entire batch. Object allows per-sid precision (e.g., {"0x1": 9, "0x2": 5})
3.4 Retries and rate limits
3.4 Retries and rate limits
Subscribe operations are rate-limited via a per-API-key token bucket: each item added by a subscribe request consumes tokens, and the bucket refills over time up to a maximum burst size. The bucket is shared across every connection on your API key, so opening additional connections does not give you a larger bucket, and multiple in-flight subscribes compete for the same pool of tokens. Burst size and refill rate vary per plan and are not exposed by the API — contact your Block Scholes representative if you need your specific limits.
When a subscribe is rejected with a rate-limit error, retry only the specific subscribe that was rejected. Do not replay other batches you have in flight, and do not open new connections to re-send the same items — they all spend from the same bucket, so reissuing them just extends the throttle.
Recommended retry policy:
On the first rate-limit rejection of a
subscribe, wait a few seconds before retrying that same subscribe.If it's rejected again, double the wait, with a small amount of random jitter to avoid synchronised retries from multiple clients sharing your key.
Cap the wait at a sensible upper bound (e.g. one minute) — waiting longer than a fully-refilled bucket buys you nothing.
Reset the wait once the subscribe succeeds.
Larger batches need proportionally longer waits than smaller ones because every item consumes its own tokens.
Non-rate-limit errors are not retried with backoff. Permission denials, invalid parameters, unsupported instruments and the like will not succeed on retry — they need the request fixed. Resend the corrected subscribe immediately. On a partial failure where the response surfaces per-sid errors, resend only the failed items, not the whole batch.
Sanity check for client implementations:
Treat rate-limit errors and validation errors as two distinct paths. Backoff applies to the first, never the second.
The token bucket is per API key, not per connection — extra connections share the same bucket.
On reconnect, re-issue your subscriptions in the same batches; previously-registered subscriptions do not survive a dropped connection. Stagger reconnect-time resubscribes if you have many, rather than firing them all at once.
If you consistently hit the rate limit under normal operation, the answer is a plan adjustment so please reach out or fewer items per second — not more aggressive retry logic.
4. Subscription Feeds
4.1 Mark Price
Description: Streams live mark prices for specified instruments. Futures and options support any expiry of choice, and options support any strike of choice as well, allowing user to price any instrument.
Feed Name: mark.px
Method: subscribe
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.client_id
String
Optional identifier for this subscription.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be mark.px.
params.batch.asset
String
Asset type. Valid values: option, future, perpetual, spot.
params.batch.base_asset
String
The currency to be added to the provided feed. Please check the table for the Supported base assets.
params.batch.quote_asset
String
Quote asset (e.g. USD, USDT, USDC). Default: USD.
params.batch.model
String
The mathematical model used to fit market quotes and interpolate or extrapolate values. Allowed values:
SVI
Spline
Default: SVI.
Required for "options".
params.batch.strike
Integer/Float
Strike price. Required if asset is option.
params.batch.moneyness
Array
List of moneyness (strike / forward) values. Range: greater than 0, up to 4. Supply either strike or moneyness for options
params.batch.type
String
Option type. Valid values: C (Call), P (Put). Required if asset is option.
params.batch.expiry
ISO 8601 string
Expiry date/time. Required if asset is option or future.
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
Array
Array containing subscription confirmation objects.
result.batch
Array
Echo of the subscribed batch items.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The mark price value.
params.data.timestamp
Integer
Timestamp when the data was recorded.
4.2 Option Greeks
Description: Streams option greeks — delta, gamma, vega, theta, volga, vanna — alongside the option's mark price. Greeks do not have a feed name of their own: they are an extension of the mark.px feed, requested by adding a greeks array to a mark.px batch item whose asset is option. Each requested greek is returned as its own field on the same value object as the mark price, on the same notification cadence.
Feed Name: mark.px (with greeks field set)
Method: subscribe
Applies to: options only — greeks are rejected for future, perpetual, or spot assets.
Request:
All fields match 4.1 Mark Price; the additional field is:
params.batch.asset
String
Valid values: option
params.batch.greeks
Array
Greeks to compute and return alongside the mark price. Valid values: delta, gamma, vega, theta, volga, vanna
params.batch.greeks
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The mark price value.
params.data.values.delta
Float
Returned if delta was requested.
params.data.values.gamma
Float
Returned if gamma was requested.
params.data.values.vega
Float
Returned if vega was requested.
params.data.values.theta
Float
Returned if theta was requested.
params.data.values.volga
Float
Returned if volga was requested.
params.data.values.vanna
Float
Returned if vanna was requested.
params.data.timestamp
Integer
Timestamp when the data was recorded.
Greeks fields are only present in the update for the greeks that were listed in the greeks array on the request — fields you didn't request are omitted, not null.
4.3 Index Price
Description: Streams real-time index prices for specified assets.
Feed Name: index.px
Method: subscribe
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.client_id
String
Optional identifier for this subscription.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be index.px.
params.batch.asset
String
Asset type. Valid values: spot, future, perpetual.
params.batch.base_asset
String
The base asset (ie. BTC)
params.batch.quote_asset
String
Quote asset (e.g. USD, USDT, USDC). Default: USD.
params.batch.expiry
ISO 8601 string
Expiry date/time. Required if asset is future.
params.batch.index_spread
bool
If true, includes the index bid/ask spread in the response. Default: false.
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
Array
Array containing subscription confirmation objects.
result.batch
Array
Echo of the subscribed batch items.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The index price value.
params.data.values.s
Float
Optional. The spread index value.
params.data.timestamp
Integer
Timestamp when the data was recorded.
4.4 Settlement Price
Description: Streams real-time time-weighted spot index price at or before the specified expiry. The time weighting of the price is performed on the 31m worth of data leading up to settlement.
Feed Name: settlement.px
Method: subscribe
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.client_id
String
Optional identifier for this subscription.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be settlement.px.
params.batch.expiry
ISO 8601 string
Settlement expiry date/time.
params.batch.base_asset
String
The base asset (ie. BTC)
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
id
Integer/String
The same identifier from the request.
result
Array
Array containing subscription confirmation objects.
result.batch
Object
Echo of the complete subscription configuration.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The time-weighted average settlement price value.
params.data.values.is_final
Boolean
Indicates whether the settlement price is final. False if the request is made before or in the seconds immediately after the settlement datetime (expiry).
params.data.timestamp
Integer
Timestamp when the data was recorded.
4.5 Implied Volatility by Strike
Description: Streams real-time implied volatility values at specific strike levels. The expiry and strike fields can take arbitrary values, enabling users to pick any point on the underlying volatility surface.
Feed Name: strike.iv
Method: subscribe
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.client_id
String
Optional identifier for this subscription.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be strike.iv.
params.batch.exchange
String
Exchange name (e.g., composite, deribit).
params.batch.base_asset
String
The base asset (ie. BTC)
params.batch.model
String
Model type. Valid values: SVI, Spline. Default: SVI.
params.batch.strike
String, Integer/Float, List[Float]
A list of strikes found on the given exchange (please refer to our catalog endpoint to obtain exchange-specific strikes), or "listed" to include all strikes currently listed on the exchange for the given expiry.
params.batch.expiry
ISO 8601 string
Expiry date/time.
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
Array
Array containing subscription confirmation objects.
result.batch
Array
Echo of the subscribed batch items.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The implied volatility value.
params.data.timestamp
Integer
Timestamp when the data was recorded.
4.6 Implied Volatility by Delta
Description: Streams real-time implied volatility values for specified delta levels. The expiry and delta fields can take arbitrary values, enabling users to pick any point on the underlying volatility surface.
Feed Name: delta.iv
Method: subscribe
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.client_id
String
Optional identifier for this subscription.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be delta.iv.
params.batch.exchange
String
Exchange name (e.g., composite, deribit).
params.batch.base_asset
String
The base asset (ie. BTC)
params.batch.model
String
Model type. Valid values: SVI, Spline. Default: SVI.
params.batch.delta
Float
Delta level. Valid values include: 0.5, 0.45, 0.40, 0.35, 0.30, 0.25, 0.20, 0.15, 0.10, 0.05, 0.04, 0.03, 0.02, 0.01 (both positive and negative).
params.batch.expiry
ISO 8601 string
Expiry date/time.
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
Array
Array containing subscription confirmation objects.
result.batch
Array
Echo of the subscribed batch items.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The implied volatility value.
params.data.timestamp
Integer
Timestamp when the data was recorded.
4.7 Implied Volatility by Moneyness
Description: Streams real-time implied volatility values at given moneyness ratios (strike/forward). The expiry and moneyness fields can take arbitrary values, enabling users to pick any point on the underlying volatility surface.
Feed Name: moneyness.iv
Method: subscribe
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.client_id
String
Optional identifier for this subscription.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be moneyness.iv.
params.batch.exchange
String
Exchange name (e.g., composite, deribit).
params.batch.base_asset
String
The base asset (ie. BTC)
params.batch.model
String
Model type. Valid values: SVI, Spline. Default: SVI.
params.batch.moneyness
Float
Moneyness level. Valid values range from 0.1 to 3.0.
params.batch.expiry
ISO 8601 string
Expiry date/time.
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
Array
Array containing subscription confirmation objects.
result.batch
Array
Echo of the subscribed batch items.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The implied volatility value.
params.data.timestamp
Integer
Timestamp when the data was recorded.
4.8 Implied Volatility Index (BSIV)
Description: Streams real-time Block Scholes Implied Volatility Index (BSIV) for constant tenors.
Feed Name: index.iv
Method: subscribe
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.client_id
String
Optional identifier for this subscription.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be index.iv.
params.batch.exchange
String
Exchange name (e.g., composite).
params.batch.base_asset
String
The base asset (ie. BTC)
params.batch.expiry
String
Constant tenor (e.g. 7, 14, 30, 90, 180, 365)
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
Array
Array containing subscription confirmation objects.
result.batch
Array
Echo of the subscribed batch items.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The IV index value.
params.data.timestamp
Integer
Timestamp when the data was recorded.
4.9 Model Parameters
Description: Streams real-time calibrated model parameters for the given exchange and expiry.
Feed Name: model.params
Method: subscribe
Important Notes:
Model Parameters cannot be mixed with other data types in the same batch.
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.client_id
String
Optional identifier for this subscription.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be model.params.
params.batch.exchange
String
Exchange name. Eg., "composite"
params.batch.base_asset
String
The base asset (ie. BTC)
params.batch.asset
String
Supports "option" asset
params.batch.model
String
Model type. Default: SVI.
params.batch.expiry
ISO 8601 string
Expiry date/time.
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
Array
Array containing subscription confirmation objects.
result.batch
Array
Echo of the subscribed batch items.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.alpha
Float
Controls the overall level of total variance.
params.data.values.beta
Float
Controls the skewness of the variance smile.
params.data.values.rho
Float
Controls the rotation of the smile.
params.data.values.m
Float
Controls the horizontal translation of the smile.
params.data.values.sigma
Float
Controls atm curvature of the smile.
params.data.timestamp
Integer
Timestamp when the data was recorded.
4.10 Interest Rates
Description: Streams real-time forward-implied interest rates for supported assets. Supports any expiry of choice, allowing user to pick any point on the forward curve.
Feed Name: interest.rate
Method: subscribe
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be interest.rate.
params.batch.base_asset
String
The base asset (ie. BTC)
params.batch.expiry
ISO 8601 string
Expiry date/time.
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
Array
Array containing subscription confirmation objects.
result.batch
Array
Echo of the subscribed batch items.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The interest rate value.
params.data.timestamp
Integer
Timestamp when the data was recorded.
4.11 Realized Volatility
Description: Streams real-time annualized realized volatility for supported assets and time windows.
Feed Name: realized.vol
Method: subscribe
Request:
Request Explanation:
jsonrpc
String
JSON-RPC protocol version. Must be "2.0".
method
String
Must be "subscribe".
params
Array
Array containing subscription configuration objects.
params.frequency
String
Max publishing rate. Eg., values: 1000ms, 20000ms.
params.batch
Array
Array of subscription parameter objects.
params.batch.sid
String
Unique identifier for this subscription item.
params.batch.feed
String
Feed type. Must be realized.vol.
params.batch.base_asset
String
The base asset (ie. EUR)
params.batch.asset
String
Asset type. Valid values: spot-fx.
params.batch.lookback
String
Time window of the retrieve realized vol. e.g. 7d
Response (Subscription Confirmation):
Response Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
result
Array
Array containing subscription confirmation objects.
result.batch
Array
Echo of the subscribed batch items.
Data Update Example:
Data Update Explanation:
jsonrpc
String
JSON-RPC protocol version. Always "2.0".
method
String
Always "subscription" for data updates.
params
Array
Array containing update data objects.
params.data
Object
Data object containing values and timestamp.
params.data.values
Array
Array of value objects, one per sid.
params.data.values.sid
String
Subscription identifier matching the request.
params.data.values.v
Float
The realized vol value.
params.data.timestamp
Integer
Timestamp when the data was recorded.
5. Error Handling
Error Messages
WebSocket API errors follow the standard JSON-RPC 2.0 error format.
Invalid API Key
-2610
Occurs when an invalid or missing API key is provided. Ensure that a valid api_key is included in the authentication request.
Invalid method
-2610
Triggered when an invalid method name is specified in the request.
Invalid Params
-2610
Occurs when required parameters are missing or invalid in the request.
Invalid Request
-32600
The JSON sent is not a valid Request object.
6. Usage Example
Below is a complete example demonstrating authentication, subscription, receiving updates, and unsubscribing.
Step 1: Authenticate
Step 2: Subscribe to Mark Price
Step 3: Receive Updates
Step 4: Unsubscribe
7. Supported Base Assets
mark.px / index.px
To fetch all the allowed currencies for pricing feeds, please use the catalog API with the following request body to call the Catalog API
*.iv / model.params
To fetch all the allowed currencies for IV feeds, please use the catalog API with the following request body to call the Catalog API
interest.rate
To fetch all the allowed currencies for interest rates, please use the catalog API with the following request body to call the Catalog API
Last updated
Was this helpful?