I’m trying to get open orders on my spot account and use https://api1.binance.com/api/v3/openOrders
for it. But always return an empty array. But I had an open position on Spot. I’m trying to request with the symbol in query params and without, but always got the same result is []
openOrders refers to orders that are partially filled or not filled. If you want to check how much asset you have, you can use this endpoint instead. (Binance API Documentation)
Yes, but GET /api/v3/account
has nothing to say about entry price, just assets amount. But I need to know the entry price too. In the futures API if get GET /fapi/v2/account
its return positions array and I can get entryPrice
:
"positions": [ // positions of all symbols in the market are returned
// only "BOTH" positions will be returned with One-way mode
// only "LONG" and "SHORT" positions will be returned with Hedge mode
{
"symbol": "BTCUSDT", // symbol name
"initialMargin": "0", // initial margin required with current mark price
"maintMargin": "0", // maintenance margin required
"unrealizedProfit": "0.00000000", // unrealized profit
"positionInitialMargin": "0", // initial margin required for positions with current mark price
"openOrderInitialMargin": "0", // initial margin required for open orders with current mark price
"leverage": "100", // current initial leverage
"isolated": true, // if the position is isolated
"entryPrice": "0.00000", // average entry price
"maxNotional": "250000", // maximum available notional with current leverage
"positionSide": "BOTH", // position side
"positionAmt": "0", // position amount
"updateTime": 0 // last update time
}
]
But in Spot API I have only assets. How I can get only active positions with entryPrice
for the spot?