tradingview-webhooks-bot
tradingview-webhooks-bot copied to clipboard
Wondering if this can handle multiple requests at once?
If I were to send 5 webhooks at the same time (each for different strategies), would I be able to handle them properly?
Good question!
It will depend on if the action contains "blocking" functions. i.e. if the action takes a minute to complete, it would take 5 min to complete 5 times.
I could look into making "AsyncActions" which would not be blocking.
Btw, this is all assuming you get 5 actions at once. If you're just talking about 5 strategies that don't all fire at once (and your actions don't take minutes upon minutes to complete) you should be fine! It could theoretically handle unlimited strategies, only limited to how long the actions take to complete.
I'm mostly wondering if any webhook may get lost. Imagine a close short order comes (takes 5s to execute), but the next open long webhook comes 1s later. It's put in some queue?
afaik he's saying to adapt the action function to run asynchronously -- then this would not be issue, ever.