Giter Club home page Giter Club logo

Comments (16)

 avatar commented on July 18, 2024 1

@edeng23 no I have not, still waiting for binance.us to do advanced verification if that was needed.

this is the error i get with the latest repo

python ./crypto_trading.py
2021-02-22 17:39:08,232 - crypto_trader_logger - INFO - Started
Traceback (most recent call last):
File "./crypto_trading.py", line 477, in
main()
File "./crypto_trading.py", line 439, in main
client = Client(api_key, api_secret_key, tld=tld)
TypeError: init() got an unexpected keyword argument 'tld'

If i remove tld=tld from the crypto_trading.py i get

  • crypto_trader_logger - INFO - APIError(code=-2015): Invalid API-key, IP, or permissions for action.

my user.cfg

[binance_user_config]
api_key=xxxxxxxx
api_secret_key=xxxxxxxx
current_coin=ETH
bridge=USDT
botChatID=xxxxxxxx
botToken=xxxxxxxx
tld=us

from binance-trade-bot.

craigwheeler avatar craigwheeler commented on July 18, 2024

Whenever you initialize the Client try passing in the tld parameter.

client = Client(api_key, api_secret_key, tld='us')

from binance-trade-bot.

 avatar commented on July 18, 2024

Can you help me a little more and tell me how to do that?
I tried to add tld='us' to line 347 in the crypto_trading.py and get another error.
Thank you for your time.

from binance-trade-bot.

nrgapple avatar nrgapple commented on July 18, 2024

Currently the line is on 368 for me.

client = Client(api_key, api_secret_key, tld='us')

I get the same error as before...

I am also using a US key

from binance-trade-bot.

nrgapple avatar nrgapple commented on July 18, 2024

Does Advanced Verification and/or Cash Account Verification need to be completed in your binance.us account?

from binance-trade-bot.

ABTDoug avatar ABTDoug commented on July 18, 2024

Whenever you initialize the Client try passing in the tld parameter.

client = Client(api_key, api_secret_key, tld='us')

This worked for me, I'm a new Binance user in the US.

from binance-trade-bot.

nrgapple avatar nrgapple commented on July 18, 2024

So adding tld=us will work IF you have already initialized all the coins and the cache folder is created. If you start with the tld=us the coins initializing step at the beginning will fail

2021-02-17 19:15:42,614 - crypto_trader_logger - INFO - Initializing NEO vs TRX
Traceback (most recent call last):
  File "./crypto_trading.py", line 387, in <module>
    main()
  File "./crypto_trading.py", line 372, in main
    initialize_trade_thresholds(client)
  File "./crypto_trading.py", line 336, in initialize_trade_thresholds
    coin_price = float(get_market_ticker_price(client, coin + 'USDT'))
TypeError: float() argument must be a string or a number, not 'NoneType'

I think this is because the US version of the coin does not have the USDT on the end of it

from binance-trade-bot.

ABTDoug avatar ABTDoug commented on July 18, 2024

So adding tld=us will work IF you have already initialized all the coins and the cache folder is created. If you start with the tld=us the coins initializing step at the beginning will fail

2021-02-17 19:15:42,614 - crypto_trader_logger - INFO - Initializing NEO vs TRX
Traceback (most recent call last):
  File "./crypto_trading.py", line 387, in <module>
    main()
  File "./crypto_trading.py", line 372, in main
    initialize_trade_thresholds(client)
  File "./crypto_trading.py", line 336, in initialize_trade_thresholds
    coin_price = float(get_market_ticker_price(client, coin + 'USDT'))
TypeError: float() argument must be a string or a number, not 'NoneType'

I think this is because the US version of the coin does not have the USDT on the end of it

Sorry, I think I posted the wrong output.

I replaced all the USDTs in the file, I get the same result either way.

from binance-trade-bot.

ABTDoug avatar ABTDoug commented on July 18, 2024

Just to follow up, adding ", tld = 'us'" to the proper line fixed the initialization problem.

Since the US domain doesn't allow all the coins in the supported_coin_list to be traded to/from USDT, I was able to change the supported_coin_list to this list and it stopped throwing anymore errors.

Different error, but is caused by adding the domain snippit.

from binance-trade-bot.

 avatar commented on July 18, 2024

this is the error i get after adding ", tld = 'us'" to line 368 client = Client(api_key, api_secret_key)

2021-02-17 18:58:30,911 - crypto_trader_logger - INFO - Started
Traceback (most recent call last):
File "./crypto_trading.py", line 387, in
main()
File "./crypto_trading.py", line 368, in main
client = Client(api_key, api_secret_key, tld = 'us')
TypeError: init() got an unexpected keyword argument 'tld'

EDIT: Just saw my account does need advanced verification, have submitted details to have it verified. will update after.

from binance-trade-bot.

edeng23 avatar edeng23 commented on July 18, 2024

@inhaletime Did you solve this issue?

from binance-trade-bot.

rodrigogs avatar rodrigogs commented on July 18, 2024

Same problem here

from binance-trade-bot.

 avatar commented on July 18, 2024

have edited supported coin list to
#60 (comment)

same error, have deleted and remade api keys and files.

2021-02-22 18:30:59,169 - crypto_trader_logger - INFO - Started
2021-02-22 18:31:05,027 - crypto_trader_logger - INFO - Will be jumping from to
Failed to Buy/Sell. Trying Again.
2021-02-22 18:31:06,445 - crypto_trader_logger - INFO - APIError(code=-2015): Invalid API-key, IP, or permissions for action.
Failed to Buy/Sell. Trying Again.
Failed to Buy/Sell. Trying Again.

from binance-trade-bot.

rel-s avatar rel-s commented on July 18, 2024

Because of recent fixes, US support should now be configurable. Do you still have this problem @inhaletime? It might be because of your Binance API configuration, prohibiting certain actions...

from binance-trade-bot.

 avatar commented on July 18, 2024

Ok, it seems i may of had some outdated python packages, i have updated them and it is now running. I think the issue has been fixed!

from binance-trade-bot.

rel-s avatar rel-s commented on July 18, 2024

Cheers man

from binance-trade-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.