pip install python-binance
pip install python-dotenv
- https://docs.binance.us/
- https://binance-docs.github.io/apidocs/spot/en/
- https://github.com/sammchardy/python-binance
- https://python-binance.readthedocs.io/en/latest/
- https://www.binance.com/en/support/faq/how-to-test-my-functions-on-binance-testnet-ab78f9a1b8824cf0a106b4229c76496d
- Make an account on binance.us
- Once your account is set up, follow these steps to create your api keys
- In particular, make sure that you've enabled 2FA, you've made a deposit in your account, and that your account is verified
- After you have your api keys, make a file called .env at the same level as crypto_pairs_scratch.ipynb
- Your .env file should have 2 lines:
- binanceAPIKey=YourAPIKeyThatYouCopiedFromBinance
- binanceSecretKey=YourSecretKeyThatYouCopiedFromBinance
- Make sure to add the .env file to your gitignore
- You should now be able to run the code in crypto_pairs_scratch.ipynb (make sure that you have pip installed python-binance and python-dotenv)
- Enable testnet: https://www.binance.com/en/support/faq/how-to-test-my-functions-on-binance-testnet-ab78f9a1b8824cf0a106b4229c76496d
- Generate your testnet API keys and follow steps as above
- Set your .env file to have:
- binanceAPIKey_testnet=YourAPIKeyThatYouCopiedFromBinance
- binanceSecretKey_testnet=YourSecretKeyThatYouCopiedFromBinance
- Don't specify any
tld
in your Client initialization call- For production, you may specify
tld=us
if you are running the program from the US IP address
- For production, you may specify