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

Mock/fake api calls during development and test #18

Closed
gaugau3000 opened this issue Jun 5, 2020 · 1 comment
Closed

Mock/fake api calls during development and test #18

gaugau3000 opened this issue Jun 5, 2020 · 1 comment
Labels
enhancement New feature or request Low prio Issues with low priority

Comments

@gaugau3000
Copy link
Member

Hi,

We should develop on freqtrade ui with no connection to backed needed.

Maybe use a tool like https://github.com/typicode/json-server.

I don't have benchmark the different tooling we could use nor if freqtrade api use some openApi conventions that can help when using this kind of tool.

Have a nice day.

@gaugau3000 gaugau3000 added the enhancement New feature or request label Jun 5, 2020
@xmatthias
Copy link
Member

xmatthias commented Jun 5, 2020

Freqtrade cannot use openAPI specification since that does not allow calling methods in classes.

So in the end, you'd end up rebuilding the whole freqtrade API again via openAPI (which however can't be used by freqtrade) - which is currently heavily changing as i'm adapting and improving some parts to be used with the UI.

I've tried this when we added the API server to freqtrade in multiple ways - but it does not seem possible.

Without the class though, you won't have access to freqtrade internals - so it can only query the database, but execute no action.

A simple workaround is to start a dry-run bot with a mock database (or a strategy that buys every minute, sells every other minute).

Using json-server is a possibility - but i think keeping the data there uptodate with the current updates to the freqtrade api will be difficult ... so i would postpone this until the API there is stable.

@xmatthias xmatthias added the Low prio Issues with low priority label Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Low prio Issues with low priority
Projects
None yet
Development

No branches or pull requests

2 participants