binance / binance-connector-python

Simple connector to Binance Public API
MIT License
1.89k stars 490 forks source link

isolated_margin_account #142

Closed jhonnybegood closed 2 years ago

jhonnybegood commented 2 years ago

Before submitting a new issue, please check if a similar issue has already been filed.

Issue subject

The isolated_margin_account() endpoint returns the same value every time, even though the symbol has been changed.

Expected behaviour

I expect to get data that is related to the symbol i inserted. but this is not the case

Actual behaviour

For example when I insert symbol='SOLBTC', it returns the below records. I have tried symbol='BTCUSDT', symbol='ADABTC'. But the result is still the same.

{'assets': [{'baseAsset': {'asset': 'ETH', 'borrowEnabled': True, 'borrowed': '0', 'free': '0.00027211', 'interest': '0', 'locked': '0', 'netAsset': '0.00027211', 'netAssetOfBtc': '0.00001829', 'repayEnabled': True, 'totalAsset': '0.00027211'}, 'quoteAsset': {'asset': 'BTC', 'borrowEnabled': True, 'borrowed': '0', 'free': '0', 'interest': '0', 'locked': '0', 'netAsset': '0', 'netAssetOfBtc': '0', 'repayEnabled': True, 'totalAsset': '0'}, 'symbol': 'ETHBTC', 'isolatedCreated': True, 'marginLevel': '999', 'marginLevelStatus': 'EXCESSIVE', 'marginRatio': '10', 'indexPrice': '0.06720756', 'liquidatePrice': '0', 'liquidateRate': '0', 'tradeEnabled': True, 'enabled': True}, {'baseAsset': {'asset': 'SOL', 'borrowEnabled': True, 'borrowed': '0', 'free': '0', 'interest': '0', 'locked': '0', 'netAsset': '0', 'netAssetOfBtc': '0', 'repayEnabled': True, 'totalAsset': '0'}, 'quoteAsset': {'asset': 'BTC', 'borrowEnabled': True, 'borrowed': '0', 'free': '0', 'interest': '0', 'locked': '0', 'netAsset': '0', 'netAssetOfBtc': '0', 'repayEnabled': True, 'totalAsset': '0'}, 'symbol': 'SOLBTC', 'isolatedCreated': True, 'marginLevel': '999', 'marginLevelStatus': 'EXCESSIVE', 'marginRatio': '5', 'indexPrice': '0.00170602', 'liquidatePrice': '0', 'liquidateRate': '0', 'tradeEnabled': True, 'enabled': True}], 'totalAssetOfBtc': '0.00001829', 'totalLiabilityOfBtc': '0', 'totalNetAssetOfBtc': '0.00001829'}

Steps to reproduce

Provide steps to let us know how we can reproduce this issue. client.isolated_margin_account(symbol='SOLBTC')

Environment

Provide any relevant information about your setup, such as:

jhonnybegood commented 2 years ago

Sorry, my bad. Just found out why I was getting the same result. I realized i wrote symbol = 'SOLBTC' when it should be symbols='SOLBTC' in the endpoint parameter.