Open m0h6m9d opened 1 year ago
import binance.client from binance.client import Client
Pkey = '' Skey = ''
client = Client(api_key = Pkey, api_secret = Skey)
balance = client.get_asset_balance(asset="BTC") print(balance)
balance = client.get_asset_balance(asset="BTC") AttributeError: 'Client' object has no attribute 'get_asset_balance' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x0000021C51625908>
Check your code, the screenshot and code posted don't match. Use the instance, not the class.
import binance.client from binance.client import Client
Pkey = '' Skey = ''
client = Client(api_key = Pkey, api_secret = Skey)
balance = client.get_asset_balance(asset="BTC") print(balance)
balance = client.get_asset_balance(asset="BTC") AttributeError: 'Client' object has no attribute 'get_asset_balance' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x0000021C51625908>