Positions
Positions gets the positions for a trader. V2 removed some redundant fields and had performance improvements
Query parameters
subaccountIdstring · min: 66 · max: 66OptionalExample:
SubaccountId of the trader we want to get the positions from
0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002
Pattern: ^0x[0-9a-fA-F]{64}$
skipintegerOptionalDefault:
Skip will skip the first n item from the result
0
Example: 0
limitinteger · min: 1 · max: 100OptionalDefault:
Limit is used to specify the maximum number of items to be returned
100
Example: 100
startTimeinteger · int64OptionalExample:
The starting timestamp in UNIX milliseconds that the trades must be equal or older than
1645579770
endTimeinteger · int64OptionalExample:
The ending timestamp in UNIX milliseconds that the trades must be equal or younger than
1645579787
marketIdstring · min: 66 · max: 66OptionalExample:
MarketId of the position we want to fetch. Use this field for fetching from single market
0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb
Pattern: ^0x[0-9a-fA-F]{64}$
marketIdsstring[] · max: 100OptionalExample:
MarketIds of the markets we want to filter. Use this field for fetching from multiple markets
["0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce","0x1f73e21972972c69c03fb105a5864592ac2b47996ffea3c500d1ea2d20138717"]
directionstring · enumOptionalExample:
filter by direction of the position
short
Possible values: subaccountTotalPositionsbooleanOptionalDefault:
set to True to return subaccount total positions
false
Example: true
accountAddressstring · min: 42 · max: 42OptionalExample:
filter by account address
inj1jrut76j8nueqatg8gsg6fv88j3823jwp5thf77
Pattern: ^inj1[0-9a-zA-Z]{38}$
Responses
200
OK response.
application/json
400
Bad Request response.
application/vnd.goa.error
404
Not Found response.
application/vnd.goa.error
500
Internal Server Error response.
application/vnd.goa.error
get
GET /api/exchange/derivative/v2/positions HTTP/1.1
Host: inj-indexer.nownodes.io
Accept: */*
{
"paging": {
"countBySubaccount": 3144167030999342600,
"from": 1916499695,
"next": [
"Ea rerum.",
"Aut dolorem cum voluptas quae.",
"Voluptas repellendus qui ipsam est."
],
"to": 391437627,
"total": 7364854934794692000
},
"positions": [
{
"denom": "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7",
"direction": "long",
"entryPrice": "15333333.333333333333333333",
"liquidationPrice": "23420479",
"margin": "77000000",
"markPrice": "14000000",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"quantity": "9",
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"ticker": "INJ/USDT-PERP",
"updatedAt": 1544614248000
},
{
"denom": "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7",
"direction": "long",
"entryPrice": "15333333.333333333333333333",
"liquidationPrice": "23420479",
"margin": "77000000",
"markPrice": "14000000",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"quantity": "9",
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"ticker": "INJ/USDT-PERP",
"updatedAt": 1544614248000
},
{
"denom": "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7",
"direction": "long",
"entryPrice": "15333333.333333333333333333",
"liquidationPrice": "23420479",
"margin": "77000000",
"markPrice": "14000000",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"quantity": "9",
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"ticker": "INJ/USDT-PERP",
"updatedAt": 1544614248000
},
{
"denom": "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7",
"direction": "long",
"entryPrice": "15333333.333333333333333333",
"liquidationPrice": "23420479",
"margin": "77000000",
"markPrice": "14000000",
"marketId": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
"quantity": "9",
"subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
"ticker": "INJ/USDT-PERP",
"updatedAt": 1544614248000
}
]
}