Get latest market depth
GEThttps://api.n00.testnet.vega.rocks/api/v2/market/depth/:marketId/latest
Get the latest market depth for a given market
Request
Path Parameters
marketId stringrequired
Market ID to request market depth for, required field.
Query Parameters
maxDepth uint64
Maximum market depth.
Responses
- 200
- 500
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
buy object[]
lastTrade object
marketId string
Market ID of the depth levels returned.
sell object[]
sequenceNumber uint64
Sequence number incremented after each update.
{
"buy": [
{
"numberOfOrders": "string",
"price": "string",
"volume": "string"
}
],
"lastTrade": {
"aggressor": "SIDE_UNSPECIFIED",
"assetPrice": "string",
"buyOrder": "string",
"buyer": "string",
"buyerAuctionBatch": "string",
"buyerFee": {
"infrastructureFee": "string",
"infrastructureFeeReferrerDiscount": "string",
"infrastructureFeeVolumeDiscount": "string",
"liquidityFee": "string",
"liquidityFeeReferrerDiscount": "string",
"liquidityFeeVolumeDiscount": "string",
"makerFee": "string",
"makerFeeReferrerDiscount": "string",
"makerFeeVolumeDiscount": "string"
},
"id": "string",
"marketId": "string",
"price": "string",
"sellOrder": "string",
"seller": "string",
"sellerAuctionBatch": "string",
"sellerFee": {
"infrastructureFee": "string",
"infrastructureFeeReferrerDiscount": "string",
"infrastructureFeeVolumeDiscount": "string",
"liquidityFee": "string",
"liquidityFeeReferrerDiscount": "string",
"liquidityFeeVolumeDiscount": "string",
"makerFee": "string",
"makerFeeReferrerDiscount": "string",
"makerFeeVolumeDiscount": "string"
},
"size": "string",
"timestamp": "string",
"type": "TYPE_UNSPECIFIED"
},
"marketId": "string",
"sell": [
{
"numberOfOrders": "string",
"price": "string",
"volume": "string"
}
],
"sequenceNumber": "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"
}
- curl
- python
- go
- nodejs
- CURL
curl -L -X GET 'https://api.n00.testnet.vega.rocks/api/v2/market/depth/:marketId/latest' \
-H 'Accept: application/json'
ResponseClear