Observe markets data
GET/api/v2/stream/markets/data
Subscribe to a stream of data about a given market
Request
Query Parameters
Restrict updates to market data by the given market IDs.
Responses
- 200
- 500
- default
A successful response.(streaming responses)
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
- Array [
- Array [
- ]
- Array [
- ]
- Array [
- ]
- Array [
- ]
- Array [
- ]
- ]
error object
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
result object
marketData object[]
List of market data.
Time in seconds until the end of the auction (zero if currently not in auction period).
Time until next auction, or start time of the current auction if market is in auction period.
Highest price level on an order book for buy orders, as an unsigned integer, for example 123456
is a correctly
formatted price of 1.23456
assuming market configured to 5 decimal places.
Aggregated volume being bid at the best bid price, as an integer, for example 123456
is a correctly
formatted price of 1.23456
assuming market is configured to 5 decimal places.
Lowest price level on an order book for offer orders. This field is an unsigned integer scaled to the market's decimal places.
Aggregated volume being offered at the best offer price, as an integer, for example 123456
is a correctly
formatted price of 1.23456
assuming market is configured to 5 decimal places.
Highest price on the order book for buy orders not including pegged orders. This field is an unsigned integer scaled to the market's decimal places.
Total volume at the best static bid price excluding pegged orders.
Lowest price on the order book for sell orders not including pegged orders. This field is an unsigned integer scaled to the market's decimal places.
Total volume at the best static offer price, excluding pegged orders.
Possible values: [AUCTION_TRIGGER_UNSPECIFIED
, AUCTION_TRIGGER_BATCH
, AUCTION_TRIGGER_OPENING
, AUCTION_TRIGGER_PRICE
, AUCTION_TRIGGER_LIQUIDITY
, AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET
, AUCTION_TRIGGER_UNABLE_TO_DEPLOY_LP_ORDERS
, AUCTION_TRIGGER_GOVERNANCE_SUSPENSION
, AUCTION_TRIGGER_LONG_BLOCK
]
Default value: AUCTION_TRIGGER_UNSPECIFIED
When a market auction is extended, this field indicates what caused the extension.
Indicative price (zero if not in auction). This field is an unsigned scaled to the market's decimal places.
Indicative volume (zero if not in auction).
Last traded price of the market. This field is an unsigned integer scaled to the market's decimal places.
liquidityProviderFeeShare object[]
Equity-like share of liquidity fee for each liquidity provider.
Average entry valuation of the liquidity provider for the market.
Average liquidity score.
Share own by this liquidity provider.
Liquidity provider party ID.
The virtual stake of this liquidity provider.
liquidityProviderSla object[]
SLA performance for each liquidity provider.
Indicates how often LP meets the commitment during the current epoch.
Determines how the fee penalties from past epochs affect future fee revenue.
Shows the bond penalties from past epochs.
Indicates the fee penalty amount applied in the previous epoch.
Indicates how often LP met the commitment in the previous epoch.
Notional volume of orders within the range provided on the buy side of the book.
Notional volume of orders within the range provided on the sell side of the book.
Liquidity provider party ID.
Represents the total amount of funds LP must supply. The amount to be supplied is in the market’s settlement currency, spread on both buy and sell sides of the order book within a defined range.
Mark price, as an unsigned integer, for example 123456
is a correctly
formatted price of 1.23456
assuming market configured to 5 decimal places.
markPriceState object
State of the internal composite price.
priceSources object[]
Timestamp in Unix nanoseconds when the price source was last updated.
Current value of the composite source price.
Source of the price.
Possible values: [COMPOSITE_PRICE_TYPE_UNSPECIFIED
, COMPOSITE_PRICE_TYPE_WEIGHTED
, COMPOSITE_PRICE_TYPE_MEDIAN
, COMPOSITE_PRICE_TYPE_LAST_TRADE
]
Default value: COMPOSITE_PRICE_TYPE_UNSPECIFIED
The method used for calculating the mark price.
Market growth at the last market time window.
Possible values: [STATE_UNSPECIFIED
, STATE_PROPOSED
, STATE_REJECTED
, STATE_PENDING
, STATE_CANCELLED
, STATE_ACTIVE
, STATE_SUSPENDED
, STATE_CLOSED
, STATE_TRADING_TERMINATED
, STATE_SETTLED
, STATE_SUSPENDED_VIA_GOVERNANCE
]
Default value: STATE_UNSPECIFIED
Current state of the market.
Possible values: [TRADING_MODE_UNSPECIFIED
, TRADING_MODE_CONTINUOUS
, TRADING_MODE_BATCH_AUCTION
, TRADING_MODE_OPENING_AUCTION
, TRADING_MODE_MONITORING_AUCTION
, TRADING_MODE_NO_TRADING
, TRADING_MODE_SUSPENDED_VIA_GOVERNANCE
, TRADING_MODE_LONG_BLOCK_AUCTION
]
Default value: TRADING_MODE_UNSPECIFIED
Current trading mode for the market.
Market value proxy.
Arithmetic average of the best bid price and best offer price, as an integer, for example 123456
is a correctly
formatted price of 1.23456
assuming market configured to 5 decimal places.
Time in Unix nanoseconds when the next mark-to-market calculation will occur.
Time in Unix nanoseconds when the market will next submit a trade to reduce its position.
Sum of the size of all positions greater than zero on the market.
priceMonitoringBounds object[]
One or more price monitoring bounds for the current timestamp.
Has this bound been triggered yet or is it still active.
Maximum price that isn't currently breaching the specified price monitoring trigger. This field is an unsigned integer scaled to the market's decimal places.
Minimum price that isn't currently breaching the specified price monitoring trigger. This field is an unsigned integer scaled to the market's decimal places.
Reference price used to calculate the valid price range. This field is an unsigned integer scaled to the market's decimal places.
trigger object
Price monitoring trigger associated with the bounds.
Price monitoring auction extension duration in seconds should the price breach its theoretical level over the specified horizon at the specified probability level.
Price monitoring projection horizon τ in seconds.
Price monitoring probability level p.
productData object
Data related to the particular product type of the market.
perpetualData object
Represents market data specific to a perpetual market.
Time-weighted-average the external data points for the in-progress funding period.
Current funding payment for the in-progress funding period.
Current funding rate for the in-progress funding period.
The internal composite price used for perpetual markets.
internalCompositePriceState object
State of the internal composite price.
priceSources object[]
Timestamp in Unix nanoseconds when the price source was last updated.
Current value of the composite source price.
Source of the price.
Possible values: [COMPOSITE_PRICE_TYPE_UNSPECIFIED
, COMPOSITE_PRICE_TYPE_WEIGHTED
, COMPOSITE_PRICE_TYPE_MEDIAN
, COMPOSITE_PRICE_TYPE_LAST_TRADE
]
Default value: COMPOSITE_PRICE_TYPE_UNSPECIFIED
The method used for calculating the internal composite price, for perpetual markets only.
Time-weighted-average the internal data-points for the in-progress funding period.
The next time the internal composite price is calculated for the perpetual market, in Unix nanoseconds.
Last seen value of the settlement oracle.
Arithmetic average of the best static bid price and best static offer price. This field is an unsigned integer scaled to the market's decimal places.
Available stake for the given market. This field is an unsigned integer scaled to the settlement asset's decimal places.
Targeted stake for the given market. This field is an unsigned integer scaled to the settlement asset's decimal places.
Timestamp in Unix nanoseconds at which this mark price was relevant.
Possible values: [AUCTION_TRIGGER_UNSPECIFIED
, AUCTION_TRIGGER_BATCH
, AUCTION_TRIGGER_OPENING
, AUCTION_TRIGGER_PRICE
, AUCTION_TRIGGER_LIQUIDITY
, AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET
, AUCTION_TRIGGER_UNABLE_TO_DEPLOY_LP_ORDERS
, AUCTION_TRIGGER_GOVERNANCE_SUSPENSION
, AUCTION_TRIGGER_LONG_BLOCK
]
Default value: AUCTION_TRIGGER_UNSPECIFIED
When a market is in an auction trading mode, this field indicates what triggered the auction.
{
"error": {
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
},
"result": {
"marketData": [
{
"auctionEnd": "string",
"auctionStart": "string",
"bestBidPrice": "string",
"bestBidVolume": "string",
"bestOfferPrice": "string",
"bestOfferVolume": "string",
"bestStaticBidPrice": "string",
"bestStaticBidVolume": "string",
"bestStaticOfferPrice": "string",
"bestStaticOfferVolume": "string",
"extensionTrigger": "AUCTION_TRIGGER_UNSPECIFIED",
"indicativePrice": "string",
"indicativeVolume": "string",
"lastTradedPrice": "string",
"liquidityProviderFeeShare": [
{
"averageEntryValuation": "string",
"averageScore": "string",
"equityLikeShare": "string",
"party": "string",
"virtualStake": "string"
}
],
"liquidityProviderSla": [
{
"currentEpochFractionOfTimeOnBook": "string",
"hysteresisPeriodFeePenalties": [
"string"
],
"lastEpochBondPenalty": "string",
"lastEpochFeePenalty": "string",
"lastEpochFractionOfTimeOnBook": "string",
"notionalVolumeBuys": "string",
"notionalVolumeSells": "string",
"party": "string",
"requiredLiquidity": "string"
}
],
"markPrice": "string",
"markPriceState": {
"priceSources": [
{
"lastUpdated": "string",
"price": "string",
"priceSource": "string"
}
]
},
"markPriceType": "COMPOSITE_PRICE_TYPE_UNSPECIFIED",
"market": "string",
"marketGrowth": "string",
"marketState": "STATE_UNSPECIFIED",
"marketTradingMode": "TRADING_MODE_UNSPECIFIED",
"marketValueProxy": "string",
"midPrice": "string",
"nextMarkToMarket": "string",
"nextNetworkCloseout": "string",
"openInterest": "string",
"priceMonitoringBounds": [
{
"active": true,
"maxValidPrice": "string",
"minValidPrice": "string",
"referencePrice": "string",
"trigger": {
"auctionExtension": "string",
"horizon": "string",
"probability": "string"
}
}
],
"productData": {
"perpetualData": {
"externalTwap": "string",
"fundingPayment": "string",
"fundingRate": "string",
"internalCompositePrice": "string",
"internalCompositePriceState": {
"priceSources": [
{
"lastUpdated": "string",
"price": "string",
"priceSource": "string"
}
]
},
"internalCompositePriceType": "COMPOSITE_PRICE_TYPE_UNSPECIFIED",
"internalTwap": "string",
"nextInternalCompositePriceCalc": "string",
"seqNum": "string",
"startTime": "string",
"underlyingIndexPrice": "string"
}
},
"staticMidPrice": "string",
"suppliedStake": "string",
"targetStake": "string",
"timestamp": "string",
"trigger": "AUCTION_TRIGGER_UNSPECIFIED"
}
]
}
}
An internal server error
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}