sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
6.06k stars 2.21k forks source link

when calling client.order_market_buy(symbol=symbol, amount=round_step_size(quantity, step_size) api key error #1157

Closed AliSevkin closed 2 years ago

AliSevkin commented 2 years ago

open_trade_response = client.order_market_buy( symbol=f'{symbol}', quantity=f'{round_step_size(quantity, step_size)}' )

getting the invalid API -Key errors

when troubleshooting the problem the following debug logs i returned and the return value of the api

the api key and secrets are correct, i even recreated them, and i can use the client with those keys when calling the historical data for the candlesticks

symbol: TRXUSDT, rounded value: 7846.1, client: https://testnet.binance.vision/api, https://testnet.binance.vision/api error occurred: HTTPSConnectionPool(host='api.binance.', port=443): Max retries exceeded with url: /sapi/v1/asset/tradeFee?symbol=TRXUSDT&timestamp=1647444610257&signature=a9cd6513b2928c5d9bd549ccc23c3b815fa71226a6c9c1fd667182c84d48254e (Caused by Ne

it lookslike even though i set testnet=True it makes the call to the api.binance (the production and not the test api version).