LogoLogo
  • Kaiko Knowledge Hub
  • Kaiko and Vinter
  • General
  • API
    • Overview
    • Multi Assets Indexes
      • Active Multi Assets
      • Multi Assets Parameters
      • Multi Assets Daily
      • Multi Assets Hourly
      • Multi Assets Real Time
      • Websocket - Multi Assets
    • Single Assets Reference Rates
      • Active Single Assets
      • Single Assets Daily
      • Single Assets Hourly
      • Single Assets Real Time
      • Websocket - Single Assets
      • Timeseries ID
    • Leveraged Indexes
      • Leveraged Single Assets
        • Leveraged Active Single Assets
        • Leveraged Single Assets Daily
      • Leveraged Multi Assets
        • Leveraged Active Multi Assets
        • Leveraged Multi Assets Daily
    • Vinter Taxonomy (VTAXO)
      • Active VTAXO
      • VTAXO
    • Net Asset Value (NAV)
      • Active Net Asset Value
      • Net Asset Value Daily
      • Net Asset Value Hourly
      • Net Asset Value Real Time
      • WebSocket - NAV
    • Staking Yield Reference Rates
      • Staking Tiers
        • On-Chain Tier
        • Staking Provider Tier
        • Exchange Tier
      • Active Staking Yields
      • Staking Yields Daily
    • API Requests Parameters
    • API Error Messages
  • FAQ
    • Onboarding
    • Product-related
    • Tech-related
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. API
  2. Single Assets Reference Rates

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:

wss://www.vinterapi.com/ws/singleassets/{symbol}/?token={your_secret_token}

Example URL for Symbol: ltc-usd-p-r

wss://www.vinterapi.com/ws/singleassets/ltc-usd-p-r/?token={your_secret_token}

* The response will match the JSON format with the REST APIs mentioned above.

# https://websocket-client.readthedocs.io/en/latest/examples.html

import websocket 
def on_message(wsapp, message):
    print(message)

url = f"wss://www.vinterapi.com/ws/singleassets/ltc-usd-p-r/?token={your_secret_token}"
wsapp = websocket.WebSocketApp(url, on_message=on_message)
wsapp.run_forever()
PreviousSingle Assets Real TimeNextTimeseries ID

Last updated 23 days ago

Was this helpful?