We noticed some strange responses to the GET /fapi/v2/account
API call (documentation), in the returned positions list.
We understand that Binance returns one entry in positions
for each available symbol in the market.
For the futures we don’t have positions into, we expect (and usually get) a dictionary like this:
{
'symbol': 'RAYUSDT',
'initialMargin': '0',
'maintMargin': '0',
'unrealizedProfit': '0.00000000',
'positionInitialMargin': '0',
'openOrderInitialMargin': '0',
'leverage': '20',
'isolated': false,
'entryPrice': '0.0',
'maxNotional': '25000',
'positionSide': 'BOTH',
'positionAmt': '0.0',
'notional': '0',
'isolatedWallet': '0',
'updateTime': 0,
'crossMargin': '154.23907608',
'crossWalletBalance': '154.23907608'
}
However, for three times we received some responses with missing positionSide
, positionAmt
, notional
and other fields.
Here are examples of the position info we received:
Example 1 (happened 2 times):
{
entryPrice: '0.0',
initialMargin: '0',
isolated: False,
leverage: '20',
maintMargin: '0',
maxNotional: '25000',
openOrderInitialMargin: '0',
positionInitialMargin: '0',
symbol: 'MASKUSDT',
unrealizedProfit: '0.00000000'
}
Example 2 (happened 1 time):
{
entryPrice: '0.0',
initialMargin: '0',
isolated: False,
leverage: '20',
maintMargin: '0',
maxNotional: '25000',
openOrderInitialMargin: '0',
positionInitialMargin: '0',
symbol: 'ATAUSDT',
unrealizedProfit: '0.00000000'
}
We never traded those two futures in our account.
Is this behaviour expected, or it is a bug on Binance’s side?