Positions gets the positions for a trader.
OK response.
Paging defines the structure for required params for handling pagination
const response = await fetch('https://inj-indexer.nownodes.io/api/exchange/derivative/v1/positions', {
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
},
"positions": [
{
"aggregateReduceOnlyQuantity": "0",
"createdAt": 1544614248000,
"direction": "long",
"entryPrice": "15333333.333333333333333333",
"liquidationPrice": "23420479",
"margin": "77000000",
"markPrice": "14000000",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"quantity": "9",
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"ticker": "INJ/USDT-PERP",
"updatedAt": 1544614248000
},
{
"aggregateReduceOnlyQuantity": "0",
"createdAt": 1544614248000,
"direction": "long",
"entryPrice": "15333333.333333333333333333",
"liquidationPrice": "23420479",
"margin": "77000000",
"markPrice": "14000000",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"quantity": "9",
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"ticker": "INJ/USDT-PERP",
"updatedAt": 1544614248000
},
{
"aggregateReduceOnlyQuantity": "0",
"createdAt": 1544614248000,
"direction": "long",
"entryPrice": "15333333.333333333333333333",
"liquidationPrice": "23420479",
"margin": "77000000",
"markPrice": "14000000",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"quantity": "9",
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"ticker": "INJ/USDT-PERP",
"updatedAt": 1544614248000
},
{
"aggregateReduceOnlyQuantity": "0",
"createdAt": 1544614248000,
"direction": "long",
"entryPrice": "15333333.333333333333333333",
"liquidationPrice": "23420479",
"margin": "77000000",
"markPrice": "14000000",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"quantity": "9",
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"ticker": "INJ/USDT-PERP",
"updatedAt": 1544614248000
}
]
}