curl --request QUERY \
--url https://api.plurex.io/api/v1/hosts/query/GetAccountMarketState \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-SECRET: <api-key>' \
--data '
{
"accountId": "acc_123",
"instrument": {
"type": "Perp",
"base": "BTC",
"quote": "USDT"
}
}
'{
"data": {
"type": "Derivative",
"instrument": {
"type": "Perp",
"base": "BTC",
"quote": "USDT"
},
"currentLeverageSetting": {
"type": "Leveraged",
"leverage": "10"
},
"collateral": {
"valueAsset": "USDT",
"total": "12500.48",
"available": "10811.92"
},
"position": {
"instrument": {
"type": "Perp",
"base": "BTC",
"quote": "USDT"
},
"long": {
"size": "0.250",
"entryPrice": "66420.7",
"markPrice": "67012.4",
"unrealizedPnl": {
"asset": "USDT",
"value": "147.925"
},
"liquidationPrice": "52340.5"
},
"short": {
"size": "0",
"entryPrice": null,
"markPrice": null,
"unrealizedPnl": null,
"liquidationPrice": null
},
"mode": "Netting"
}
}
}Balances and positions
Get market account state
Gets the account’s balances, position, collateral and leverage for one market. Where the market has more than one position, it returns their summed sides.
curl --request QUERY \
--url https://api.plurex.io/api/v1/hosts/query/GetAccountMarketState \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-SECRET: <api-key>' \
--data '
{
"accountId": "acc_123",
"instrument": {
"type": "Perp",
"base": "BTC",
"quote": "USDT"
}
}
'{
"data": {
"type": "Derivative",
"instrument": {
"type": "Perp",
"base": "BTC",
"quote": "USDT"
},
"currentLeverageSetting": {
"type": "Leveraged",
"leverage": "10"
},
"collateral": {
"valueAsset": "USDT",
"total": "12500.48",
"available": "10811.92"
},
"position": {
"instrument": {
"type": "Perp",
"base": "BTC",
"quote": "USDT"
},
"long": {
"size": "0.250",
"entryPrice": "66420.7",
"markPrice": "67012.4",
"unrealizedPnl": {
"asset": "USDT",
"value": "147.925"
},
"liquidationPrice": "52340.5"
},
"short": {
"size": "0",
"entryPrice": null,
"markPrice": null,
"unrealizedPnl": null,
"liquidationPrice": null
},
"mode": "Netting"
}
}
}Authorizations
Body
application/json