Get market data history
GEThttps://api.testnet.vega.rocks/api/v2/market/data/:marketId
Get market data history for a market ID from between a given date range
Request
Path Parameters
Market ID to request data history for.
Query Parameters
Timestamp in Unix nanoseconds indicating the start of the date range.
Timestamp in Unix nanoseconds indicating the end of the date range.
Number of records to be returned that sort greater than row identified by cursor supplied in 'after'.
If paging forwards, the cursor string for the last row of the previous page.
Number of records to be returned that sort less than row identified by cursor supplied in 'before'.
If paging forwards, the cursor string for the first row of the previous page.
Whether to order the results with the newest records first. If not set, the default value is true.
Responses
- 200
- 500
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
marketData object
{
"marketData": {
"edges": [
{
"cursor": "string",
"node": {
"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"
}
}
],
"pageInfo": {
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "string"
}
}
}
An internal server error
- application/json
- Schema
- Example (from schema)
Schema
details object[]
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
details object[]
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
- curl
- python
- go
- nodejs
- CURL
curl -L 'https://api.testnet.vega.rocks/api/v2/market/data/:marketId' \
-H 'Accept: application/json'