Average Entry Price is calculated as:
Total value of an instrument in USDT / Total quantity of an instrument
Example
Trader A placed 2 long orders as follows:
1. 0.1 BTCUSDT perpetual swap contracts at 30,000 USDT.
2. 0.15 BTCUSDT perpetual swap contracts at 32,000 USDT.
The Average Entry Price is calculated as:
Average Entry Price = (0.1 BTC * 30,000 USDT + 0.15 BTC * 32,000 USDT) / (0.1 BTC + 0.15 BTC) = 31,200 USDT