guanquann / Stocksera

Finance application that provides more than 60 different alternative data to retail investors
MIT License
660 stars 107 forks source link

Crypto error @ Luna USD #27

Closed CodeInFilth closed 2 years ago

CodeInFilth commented 2 years ago

I cant figure this error out.... its popping up no matter what I try and do so I may not understand the json or query.

16 :  USDC
17 :  USDT
18 :  AVAX
19 :  MATIC
20 :  SUSHI
21 :  ATOM
22 :  XTZ
23 :  LTC
24 :  BCH
25 :  LRC
26 :  AAVE
27 :  ALGO
28 :  BNB
29 :  SHIB
30 :  SCRT
31 :  ENS
32 :  RLY
33 :  CAKE
34 :  MANA
35 :  COTI
36 :  TRAC
37 :  FTM
38 :  LINK
39 :  VET
40 :  LUNA

Traceback (most recent call last):
  File "tasks_to_run.py", line 142, in <module>
    scrape_reddit_crypto.main()
  File "/code/scheduled_tasks/reddit/crypto/scrape_trending_posts.py", line 238, in main
    stats_table = get_financial_data(stats_table, crypto_id, symbol)
  File "/code/scheduled_tasks/reddit/crypto/scrape_trending_posts.py", line 154, in get_financial_data
    current_price = market_data["current_price"]["usd"]
KeyError: 'usd'
CodeInFilth commented 2 years ago

update 2/12/2020

still getting error @guanquann :o(

scheduled_tasks_1  | Traceback (most recent call last):
scheduled_tasks_1  |   File "tasks_to_run.py", line 142, in <module>
scheduled_tasks_1  |     scrape_reddit_crypto.main()
scheduled_tasks_1  |   File "/code/scheduled_tasks/reddit/crypto/scrape_trending_posts.py", line 238, in main
scheduled_tasks_1  |     stats_table = get_financial_data(stats_table, crypto_id, symbol)
scheduled_tasks_1  |   File "/code/scheduled_tasks/reddit/crypto/scrape_trending_posts.py", line 154, in get_financial_data
scheduled_tasks_1  |     current_price = market_data["current_price"]["usd"]
scheduled_tasks_1  | KeyError: 'usd'
guanquann commented 2 years ago

Fixed in the latest commit ✅