Vinter API

Websocket - Single Assets

The websocket endpoint returns a websocket connection that can be used to receive real-time updates on the index values.
The endpoint accepts all three frequencies of symbols: daily, hourly and real-time.
The symbol of the index that you want to receive updates on should be passed in the path.
The endpoint also requires an API key passed as a query parameter token for authentication.

URL Pattern:

Example URL for Symbol: ltc-usd-p-r
* The response will match the JSON format with the REST APIs mentioned above.
import websocket
def on_message(wsapp, message):
url = f"wss://{your_secret_token}"
wsapp = websocket.WebSocketApp(url, on_message=on_message)