Perpetual Trading
get_perp_trading_active_positions
get_perp_trading_active_positionsExample Request
Example Response
{
"clientAddress": "0xF4614C8C45beF5700e491E627aeecd4d5aabac61"
}{
"clientAddress": "0xF4614C8C45beF5700e491E627aeecd4d5aabac61",
"positions": [
{
"positionId": "pos_874201",
"symbol": "ETH-PERP",
"side": "long",
"tokenSize": 1.5,
"entryPrice": 3320.5,
"markPrice": 3395.2,
"usdNotionalValue": 5092.8,
"usdMarginValue": 1000.0,
"leverage": 5,
"usdFeePaid": 0.75,
"usdUnrealizedPnl": 112.05,
"liquidationPrice": 2875.4,
"takeProfitPrice": 3500.0,
"stopLossPrice": 3200.0,
"openedAt": "2025-01-14T16:42:00Z"
}
],
"lastUpdatedAt": "2025-01-15T10:40:00Z"
}get_perp_trading_historical_positions
get_perp_trading_historical_positionsExample Request
Example Response
{
"clientAddress": "0xF4614C8C45beF5700e491E627aeecd4d5aabac61"
}{
"clientAddress": "0xF4614C8C45beF5700e491E627aeecd4d5aabac61",
"positions": [
{
"positionId": "pos_861944",
"symbol": "ETH-PERP",
"side": "short",
"tokenSize": 1.0,
"entryPrice": 3450.0,
"exitPrice": 3360.25,
"takeProfitPrice": 3360.25,
"stopLossPrice": 3550.0,
"leverage": 5,
"usdFeePaid": 0.75,
"usdRealizedPnl": 89.75,
"closeReason": "take_profit",
"openedAt": "2025-01-13T11:05:44Z",
"closedAt": "2025-01-14T12:09:44Z"
}
]
}is_token_tradable
is_token_tradableExample Request
Example Response
{
"symbol": "ETH-PERP"
}# IF TRADABLE
{
"symbol": "ETH-PERP",
"isTradable": true,
"maxLeverage": 20,
"checkedAt": "2025-01-14T11:05:44Z"
}
# IF NOT TRADABLE
{
"symbol": "XYZ-PERP",
"isTradable": false,
"reasonCode": "MARKET_HALTED",
"checkedAt": "2025-01-14T11:05:44Z"
}Last updated