Endpoints

Trading

The perps exchange has all of the endpoints of Spot REST API, except with the prefix /v1/perps/ instead of /v1/.
See the spot REST API docs here:

Spot REST API

Positions

For more detail on positions, see:

Positions, Balance, and Leverage

Get positions

Gets list of all positions for all markets

GET /v1/perps/positions

Request

Path parameters - None

Response

Name Type Description Example
market string Perps market “BTC-USD.P"
direction string Position direction. Either “long” or “short”. “short"
netQuantity
string decimal with the size of the position “1.5489"
averageEntryPrice
string average entry price “20566.84"
usedMargin
string margin used for the position “2566.84"
unrealizedPnl
string unrealized PNL with relation to the mark price - positive is profit, negative is loss “-900.54"
markPrice
string mark price “20000.54"
liquidationPrice string price at which the position will be liquidated “9000.87"
bankruptcyPrice string price at which the liquidation happens “6000.11"
maintenanceMargin string maintenance margin required for this position “1500.22"
stopLoss string (optional) triggering price for stop loss order “1600.20"
takeProfit string (optional) triggering price for take profit order “1600.20"

Margin Account

The margin account holds all funds used as collateral for perps positions. In order to make a trade, you’ll first need to fund this account. Endpoints are available to get your balance, create margin transfers, and list margin transfers. For more detail on the margin account, see: