0

Note: I am new to elixir and the forum, and hence my question might be missing some details. Do let me know if additional information is required from my end. I am trying to integrate the trading view’s /streaming endpoint.

A snippet of what it says is: Stream of prices. Server constantly keeps the connection alive. If the connection is broken - the server constantly tries to restore it. TradingView establishes up to 4 simultaneous connections to this endpoint and expects to get the same data to all of them. Transfer mode is chunked encoding . The data feed should set 'Transfer-Encoding: chunked' and make sure that all intermediate proxies are set to use this mode. All messages are to be ended with \n . Data stream should contain real-time data only. It shouldn’t contain snapshots of data.

Can anyone help me implement an endpoint that can keep the connection alive? I am using cowboy as the framework.

I have already used Plug’s send_response and send_chunked in conjunction with halt, but it did not work out.

2
  • Since you have to initiate the request, I think you need to use a HTTP client that supports async requests/streaming (like httpoison). Commented Sep 2, 2021 at 14:13
  • Please provide enough code so others can better understand or reproduce the problem. Commented Sep 6, 2021 at 4:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.