<aside> ⚠️ Perpetual futures are currently in limited access. Please contact [email protected] for more information.
</aside>
The perpetual futures exchange currently only accepts USDC for collateral and settlement. These funds are held in a different internal wallet from the spot and cross exchanges: you must transfer funds internally to your margin wallet before trading, and any funds left in the main exchange are not at risk from perps trades. Currently, all trading is cross-margin, so funds held in the margin wallet are used as collateral for all positions. The exchange provides the following numbers to determine an account’s balance:
max(long used margin, short used margin)
(position base size * mark price / market max leverage)
to the used margin in its direction. For example, a position of 1 BTC-USD.P with a mark price of $60,000 in a market with 10x max leverage would use $6,000 of margin.(order remaining size * limit price / market max leverage)
to the used margin in its direction.max($6,000, $0,000) = $6,000
. After placing the short limit order, used margin will equal max($6,000, $6,000) = $6,000
.In addition, the exchange provides several measures of risk for accounts:
Endpoints are available to create margin transfers, list margin transfers, and view account balance.
When placing an order, there are two checks that must pass.
Each market has a **Maximum Position Size.** When placing a new order, we simulate execution of the order. The base size of the resulting position, plus the sum of the remaining sizes of all resting orders in the same direction as the position, must be less than or equal to the maximum position size.
For example, assume the position limit for BTC-USD.P is 3 contracts. Consider an account with…
A market order to buy 1 BTC-USD.P would succeed, as that would result in: 2 (long position size) + 1 (long resting orders total) = 3 BTC-USD.P
But a market order to buy 2 BTC-USD.P would fail: 3 (long position size) + 1 (long resting orders total) = 4 BTC-USD.P
In the other direction, an order to sell 2 BTC-USD.P would succeed: 2 (short position size) + 1 (short resting orders total) = 3 BTC-USD.P
But a short order to sell 3 BTC-USD.P would fail: 3 (short position size) + 1 (short resting orders total) = 3 BTC-USD.P
When placing a new order, we simulate execution of the order. The resulting **used margin** must be less than the resulting margin balance.
When a bid and ask order match, they create an opposite positions on each account: the account on the bid side will enter a long position and the account on the ask side will enter a short position in the same size. Additional matches will update these positions to the new net values, so buying 2 BTC worth of perpetual futures and then selling 1 BTC worth will result in a net position of 1 BTC long.