NIN API Docs
  • How to
    • 👨‍💻Getting Started
    • 🔐How to get API Keys?
    • Full API Documentation
    • 💻OpenAPI Reference (Trade)
      • Authentication
      • Instruments
      • Orders
      • Portfolio
      • Margin
      • WebSocket
      • Models
      • Error Handling
      • Limits on API Requests
  • Use Cases
  • Algo Developers
    • Implementing BTC Points
  • Coming Soon
    • Automations Protocol
    • 🧩Widget Integration
      • Widget (Onramp)
      • Widget (Offramp)
      • Request Token
      • Check Token
Powered by GitBook
On this page
  1. How to
  2. OpenAPI Reference (Trade)

WebSocket

PreviousMarginNextModels
💻

WebSocket connection for live quotes

get

Connect to wss://stream.nin.in/quotes using a WebSocket client.

Supported Messages:

  • subscribe: Subscribe to live ticks for instrument tokens

  • unsubscribe: Remove instruments from stream

Tick Format:

{
  "instrument_token": 738561,
  "last_price": 2500.0,
  "volume": 120000,
  "change": 15.5,
  "percent_change": 0.62,
  "timestamp": "2025-05-05T10:15:30Z"
}
Authorizations
Responses
101
Switching Protocols (WebSocket handshake)
401
Unauthorized access to private stream
get
GET /trade/v1/websocket/quotes HTTP/1.1
Host: api.nin.in
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content