Skip to content

Commit

Permalink
Fix Gemini ticker API error with GUSD symbol (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlydv authored Apr 14, 2022
1 parent 9cc278c commit 496404f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion finance_dl/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ def get_balances_and_prices(requester, api_key, api_secret, data_dir):
logger.info(f"Got balances. Found {len(balances)} currencies.")

# Prices
tickers = [b['currency'] + "USD" for b in balances if b['currency'] != 'USD']
tickers = [b['currency'] + "USD" for b in balances if b['currency'] != 'USD' and b['currency'] != 'GUSD']
prices = {}
prices['GUSD'] = 1
for t in tickers:
obj = requester.make_request(TICKERS_URL+"/"+t.lower(), None, get = True)
price = (float(obj['ask']) + float(obj['bid']))/2
Expand Down

0 comments on commit 496404f

Please sign in to comment.