VolumeFi / paloma

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

BUG: some tokens from telegram have no data #597

Open verabehr opened 1 year ago

verabehr commented 1 year ago

https://www.palomabot.ai/momentum/bot/?dex=pancakeswap_new&lag_return=6&daily_volume=0&vol_30=100000&market_cap=1000000&token=wombat-exchange and (https://www.palomabot.ai/momentum/bot/?dex=pancakeswap_new&lag_return=6&daily_volume=0&vol_30=100000&market_cap=1000000&token=decubate)

result in an error "no data found"

Image

jamie088 commented 1 year ago

@verabehr https://discord.com/channels/987730379182051408/1065140873811218532/1136664327068340265

verabehr commented 1 year ago

@fieldtheory123 it seems that we can't guarantee that a token that users click on from the daily momentum telegram alert will still be in the momentum token list at the time of clicking. In that case we have no more data on that token and are sending users back to the search page.

Can we keep that token in the DB? What data on the token page is calculated during the get_high_returns call?

fieldtheory123 commented 1 year ago

I think we have the data in the DB. It is just that the middleware is only loading the tokens with most recent timestamps. We should look into how to change that in the middleware.

taariq commented 1 year ago

@fieldtheory123 what's the next steps here? I don't like the word should. It leaves us hanging

fieldtheory123 commented 1 year ago

@fieldtheory123 what's the next steps here? I don't like the word should. It leaves us hanging

I'm taking a further look and see how/if it's possible to solve this issues without messing the table shown on the FE. If it's infeasible I will take it to the FE team and see how they can query historic tokens from the DB.

fieldtheory123 commented 1 year ago

@rootedbox I added a new function get_high_returns_cold() which returns all momentum tokens. https://github.com/VolumeFi/trading-bots/compare/main...add-cold-query

Could you check how we can start a new API endpoint for the FE so they can query a token that's no longer in the current momentum token list?