VolumeFi / paloma

The fast blockchain messenger protocol
Apache License 2.0
3 stars 2 forks source link

momentumbots api returns little results #221

Closed verabehr closed 1 year ago

verabehr commented 1 year ago

The momentumbots API that lists the search results of momentum tokens returns little results and at times none. Using this ticket to capture some searches. Note that this could either be expected due to market conditions or a bug somewhere in the code.

even searching for https://momentumbots.palomachain.com/?dex=uniswap_v2&lag_return=0&daily_volume=0&vol_30=0&market_cap=0 only returns one token and at times none

Separately or related

127.0.0.1 - - [18/May/2023 19:40:26] "POST /get_high_returns HTTP/1.0" 500 767
Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/trading-bots-Fx44JTns-py3.10/lib/python3.10/site-packages/bottle.py", line 876, in _handle
    return route.call(**args)
  File "/root/.cache/pypoetry/virtualenvs/trading-bots-Fx44JTns-py3.10/lib/python3.10/site-packages/sentry_sdk/integrations/bottle.py", line 140, in wrapped_callback
    raise exception
  File "/root/.cache/pypoetry/virtualenvs/trading-bots-Fx44JTns-py3.10/lib/python3.10/site-packages/sentry_sdk/integrations/bottle.py", line 130, in wrapped_callback
    res = prepared_callback(*args, **kwargs)
  File "/root/.cache/pypoetry/virtualenvs/trading-bots-Fx44JTns-py3.10/lib/python3.10/site-packages/bottle.py", line 1759, in wrapper
    rv = callback(*a, **ka)
  File "/root/app/momentum_cache_refresh/app.py", line 25, in get_high_returns
    df = momentum_scanner_intraday.get_high_returns(
  File "/root/app/momentum_cache_refresh/momentum_scanner_intraday.py", line 73, in get_high_returns
    vols = gecko.exchanges(dex)
  File "/root/app/momentum_cache_refresh/gecko.py", line 29, in exchanges
    for ticker in get("exchanges", dex)["tickers"]
KeyError: 'tickers'

That last bit means it's straight from coingecko's API.

taariq commented 1 year ago

@fieldtheory123 It's very telling that we can get a list here: https://discord.com/channels/987730379182051408/1065143614772084867/1108740919689224282 today at 6:00AM, but it's now 6 hours later we get NOTHING.

                      24H Return 7D Return 6H Return
Token name                                          
gamium                       18%       29%        9%
binance-peg-xrp               5%       10%        5%
media-licensing-token         1%      -10%        5%
marumarunft                   4%       40%        4%
ilcapo                       25%        9%        4%

Granted markets were DOWN today, I expect we'll see more than zero in the output of the query since we are seeing tokens in the output of the scanner.

fieldtheory123 commented 1 year ago

This is fixed by https://github.com/VolumeFi/trading-bots/pull/22