Trades of a Spot Market
OK response.
Paging defines the structure for required params for handling pagination
Trades of a Spot Market
const response = await fetch('https://inj-indexer.nownodes.io/api/exchange/spot/v2/trades', {
method: 'GET',
headers: {},
});
const data = await response.json();
{
"paging": {
"countBySubaccount": 3144167030999342600,
"from": 1916499695,
"next": [
"Ea rerum.",
"Aut dolorem cum voluptas quae.",
"Voluptas repellendus qui ipsam est."
],
"to": 391437627,
"total": 7364854934794692000
},
"trades": [
{
"cid": "custom_cid",
"executedAt": 1544614248000,
"executionSide": "Enim voluptatem temporibus eveniet fuga voluptatibus.",
"fee": "1960000000000000",
"feeRecipient": "inj15gnk95hvqrsr343ecqjuv7yf2af9rkdqeax52d",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"orderHash": "0x482ce078117d4835fe005b643056d2d3f439e3010db40f68449d9e5b77e911bc",
"price": {
"price": "1960000000000000000",
"quantity": "40",
"timestamp": 1544614248000
},
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"tradeDirection": "buy",
"tradeExecutionType": "market",
"tradeId": "Quidem aut officia ad soluta eveniet saepe."
},
{
"cid": "custom_cid",
"executedAt": 1544614248000,
"executionSide": "Enim voluptatem temporibus eveniet fuga voluptatibus.",
"fee": "1960000000000000",
"feeRecipient": "inj15gnk95hvqrsr343ecqjuv7yf2af9rkdqeax52d",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"orderHash": "0x482ce078117d4835fe005b643056d2d3f439e3010db40f68449d9e5b77e911bc",
"price": {
"price": "1960000000000000000",
"quantity": "40",
"timestamp": 1544614248000
},
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"tradeDirection": "buy",
"tradeExecutionType": "market",
"tradeId": "Quidem aut officia ad soluta eveniet saepe."
},
{
"cid": "custom_cid",
"executedAt": 1544614248000,
"executionSide": "Enim voluptatem temporibus eveniet fuga voluptatibus.",
"fee": "1960000000000000",
"feeRecipient": "inj15gnk95hvqrsr343ecqjuv7yf2af9rkdqeax52d",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"orderHash": "0x482ce078117d4835fe005b643056d2d3f439e3010db40f68449d9e5b77e911bc",
"price": {
"price": "1960000000000000000",
"quantity": "40",
"timestamp": 1544614248000
},
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"tradeDirection": "buy",
"tradeExecutionType": "market",
"tradeId": "Quidem aut officia ad soluta eveniet saepe."
}
]
}