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

How to use Restful API (POST) to control the status of Feedhandler? #1026

Open
mauyin opened this issue Apr 11, 2024 · 2 comments
Open

How to use Restful API (POST) to control the status of Feedhandler? #1026

mauyin opened this issue Apr 11, 2024 · 2 comments
Labels

Comments

@mauyin
Copy link

mauyin commented Apr 11, 2024

Hi all, currently I am implement a Django API server to control the status of Feedhandler, I want to send POST request to and the request are like this {"action": "run"}, {"action":"close"}, to start / close the feedhandler, but when I try running the server together with the feedhandler, the error occur:

RuntimeError: There is no current event loop in thread 'Thread-1 (process_request_thread)'.

and I cannot close the feedhandler gracefully, and I cannot start again after closing the feedhandler.

Could I ask for some advise on how to construct a API client to trigger and stop the feedhandler? Thank you

@globophobe
Copy link
Contributor

Can you send curl requests to whatever api you’ve implemented with cryptofeed?

@bmoscon
Copy link
Owner

bmoscon commented Apr 11, 2024

what you are describing is not supported by the library

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

No branches or pull requests

3 participants