Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a token cache so LimitSwap can be restarted if needed and resume checking prices after restart #105

Open
wibuf opened this issue Aug 23, 2022 · 1 comment

Comments

@wibuf
Copy link

wibuf commented Aug 23, 2022

I would like to be able to test some settings around, however LimitSwap is not able to resume checking prices for held tokens upon a restart. I believe setting up a token cache file, that updates during buys and sells, and read into LimitSwap on startup could alleviate this issue.

@wibuf
Copy link
Author

wibuf commented Aug 26, 2022

I believe all that would be needed to be stored would be token address(for lookup), token name, bought amount(so it knows what is has to sell), and the ATH price(so bot can calculate the trailing stop)

Basically, the bot should add to this cache during any buys, and remove from the cache any sells. Also, upon launch the bot should read each token into memory and do a check to get current prices for each and sell if any stoplosses are hit, or continue to monitor prices until a sell gets triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant