How to get an open position on Spot with an entry price?
I know about GET /api/v3/account this return is just assets without any info about time or price. We’re had GET /api/v3/myTrades and GET /api/v3/allOrders it get info about time and entry price but nothing about it’s already closed or open for now.
How I should map assets from v3/account balances to order detailed data? What is a foreign key for join that data?
This is correct, the v3/account endpoint does not support entryPrice.
You may map the results from v3/account and v3/myTrades, however calculating the entryPrice will require taking into account all trades for the given symbol, since a position is an aggregation of all trades.
I think about the map v3/account and v3/myTrades by a symbol. But it’s extremely unhandy because as I understand v3/myTrades return history with close and open trades together.
Ok, thank you for your explanation, it’s more clear after that. But one thing worries me.
When I call v3/myTrades without startTime and endTime it’s not limited by time? And limited only by
limit INT NO Default 500; max 1000.
Here no info about default values for startTime and endTime. startTime and endTime not limited by default or that values not described in swagger?
I’m asking because care about how to aggregate trades for the position which was opened a very long time ago.