Get last trade
GEThttps://api.n00.testnet.vega.rocks/api/v2/market/:marketId/trade/latest
Get the last trade made for a given market.
Request
Path Parameters
marketId stringrequired
Market ID to retrieve the last trade for.
Responses
- 200
- 500
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
trade object
{
"trade": {
"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"
}
}
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/:marketId/trade/latest' \
-H 'Accept: application/json'
ResponseClear