Skip to content

Commit

Permalink
fix: change binance api because does not work on cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
adagora committed Nov 28, 2023
1 parent 41ff59e commit 888fa24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solarathon/pages/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def format_price(price):


def get_binance_ticket(symbol: str) -> TickerData:
binance_url = f"https://api.binance.com/api/v3/ticker/24hr?symbol={symbol}"
binance_url = f"https://api.binance.us/api/v3/ticker/24hr?symbol={symbol}"
return TickerData.model_validate_json(
json_data=requests.get(binance_url).content
)
Expand Down Expand Up @@ -151,7 +151,7 @@ def fetch_data(event: threading.Event):


def get_available_symbols():
symbols_url = "https://api.binance.com/api/v3/exchangeInfo"
symbols_url = "https://api.binance.us/api/v3/exchangeInfo"
try:
symbols_response = requests.get(symbols_url)
symbols_data = symbols_response.json()
Expand Down

0 comments on commit 888fa24

Please sign in to comment.