The get_position() function in APP(binance_interface/app/account/account_um.py) is incomplete. It can only return the "LONG" holding positions. "SHORT" positions are never listed.
Please check and modify line 144 by adding abs to positionAmt attribute as short positions hold your property by a negative amount.
143: for v in result['data']['positions']:
144: if 'positionAmt' in v.keys() and float(v['positionAmt']) > 0:
145: this_symbol = v['symbol']
143: for v in result['data']['positions']:
144: if 'positionAmt' in v.keys() and abs(float(v['positionAmt'])) > 0: # abs() value returns both Long and short positions
145: this_symbol = v['symbol']
The
get_position()function in APP(binance_interface/app/account/account_um.py) is incomplete. It can only return the "LONG" holding positions. "SHORT" positions are never listed.Please check and modify line 144 by adding abs to
positionAmtattribute as short positions hold your property by a negative amount.