I just wrote a few lines of code to get data from Binance (I'm just using the Testnet API).
My code runs fine on Jupyter Notebook.
But when I try to run the code in Command Prompt (or Anaconda Prompt), it doesn't work.
It seems like the code still runs without any errors but it is not getting data back from the API.
===
My code:
from binance.client import Client
import pandas as pd
import asyncio from binance import AsyncClient, BinanceSocketManager
from datetime import datetime, timedelta
client = Client(api_key = "...my Testnet api_key...", api_secret = "...my Testnet api_secret", tld = "com", testnet=True)
print("Hello..........")
client.get_account()
print("Hello......123....")
===
How can I fix this situation? Thank you so much! P/s: I'm using python-binance package 1.0.19
===
This is on Jupyter Notebook: enter image description here
This is my Testing.py file: enter image description here
This is the result when I run the code file (on Command Prompt or Anaconda Prompt): enter image description here
I tried running on Anaconda Prompt but couldn't get the data back so I connected Command Prompt to Anaconda Prompt via Activate. But still not working.
Terminals or Command Prompts usually don't behave like Jupyter Notebook and show data/logs unless you explicitly print it, however from what i see maybe try the following