Get market data history
Get market data history for a market ID between given dates
Path Parameters
marketId string required
Market ID to request data history for, required field.
Query Parameters
startTimestamp int64
Optional Unix time in nanoseconds.
endTimestamp int64
Optional Unix time in nanoseconds.
pagination.first int32
Number of records to be returned that sort greater than row identified by cursor supplied in 'after'.
pagination.after string
If paging forwards, the cursor string for the last row of the previous page.
pagination.last int32
Number of records to be returned that sort less than row identified by cursor supplied in 'before'.
pagination.before string
If paging forwards, the cursor string for the first row of the previous page.
pagination.newestFirst boolean
Newest records first, older records last, default 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"
}
],
"markPrice": "string",
"market": "string",
"marketState": "STATE_UNSPECIFIED",
"marketTradingMode": "TRADING_MODE_UNSPECIFIED",
"marketValueProxy": "string",
"midPrice": "string",
"nextMarkToMarket": "string",
"openInterest": "string",
"priceMonitoringBounds": [
{
"maxValidPrice": "string",
"minValidPrice": "string",
"referencePrice": "string",
"trigger": {
"auctionExtension": "string",
"horizon": "string",
"probability": "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
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
application/json
Schema
Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
GET /api/v2/market/data/:marketId
Request
Request
curl / cURL
curl -L -X GET 'https://vega-mainnet-data.commodum.io/api/v2/market/data/:marketId' \
-H 'Accept: application/json'
python / requests
curl -L -X GET 'https://vega-mainnet-data.commodum.io/api/v2/market/data/:marketId' \
-H 'Accept: application/json'
go / native
curl -L -X GET 'https://vega-mainnet-data.commodum.io/api/v2/market/data/:marketId' \
-H 'Accept: application/json'
nodejs / axios
curl -L -X GET 'https://vega-mainnet-data.commodum.io/api/v2/market/data/:marketId' \
-H 'Accept: application/json'