cryptofeed icon indicating copy to clipboard operation
cryptofeed copied to clipboard

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

Open mauyin opened this issue 1 year ago • 2 comments

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

mauyin avatar Apr 11 '24 06:04 mauyin

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

globophobe avatar Apr 11 '24 07:04 globophobe

what you are describing is not supported by the library

bmoscon avatar Apr 11 '24 15:04 bmoscon