Here are the details of how the position’s average entry price is calculated for the different Futures trading products.
Inverse Perpetual and Expiry Contracts
Inverse Perpetual and Expiry contracts are quoted in USD and settled in cryptocurrency, such as BTC. The average entry price is calculated as follows:
Formula
Average Entry Price = Total Quantity of Contracts / Total Contract Value
Total Contract Value= [(Quantity1/Price1) + (Quantity2/Price2) + (Quantity3/Price3)....]
Take BTCUSD as an example,
A trader bought 50 contracts of BTCUSD at $10,000 and another 50 contracts at $15,000.
Total contract value in BTC = (50/10,000) + (50/15,000) = 0.00833333
Average entry price = 100/0.00833333 = $12,000
USDT Perpetual and Expiry Contract
USDT Perpetual and Expiry contracts are quoted in USDT and settled in cryptocurrency, such as USDT.
Formula
Average Entry Price = Total Contract Value/Total Quantity of Contracts
Total Contract Value= [(Quantity1 × Price1) + (Quantity2 × Price2) + (Quantity3 × Price3)....]
Take BTCUSDT as an example,
A trader bought 1 BTC contract at 10,000 USDT and another 2 BTC contracts at 13,000 USDT.
Average Entry Price = (1 × 10,000 + 2 × 13,000) / (1+2) = 12,000 USDT
USDC Perpetual Contract
The average entry price of the USDC Perpetual contract is the weighted average price of your position during the current settlement cycle, which will be affected by the increase in position size. At the end of each settlement cycle, the Mark Price at the time of settlement will become the new average entry price.
Formula
Average Entry Price = Total Session Value/Total Trade Size
Total Session Value = [(Trade Price 1 × Trade Size 1) + (Trade Price 2 × Trade Size 2) …]
Take BTCUSDC as an example,
Trader A holds a long position of 0.5 BTC with an entry price of $50,000. Trader A decides to increase his long position by opening another 0.8 BTC at an entry price of $51,000.
Total Session Value = (50,000 × 0.5) + (51,000 × 0.8) = 65,800 USDC
Average Entry Price = 65,800/(0.5 + 0.8) = $50,615.38
Notes:
For the response parameter of USDC Contract V3 API, please refer to sessionAvgPrice for the average entry price of the USDC Perpetual Contract. Once the settlement timing is reached, the sessionAvgPrice (average entry price) will be updated to the Mark price at the time of settlement. You are advised to use the updated APi here

