Skip to main content
Version: 1.1.1

WebSocket Streams for YimmiT

For general WebSocket connection information, endpoints, and authentication details, see General WebSocket API Information.

WebSocket Limits​

  • WebSocket connections have a limit of 5 incoming messages per second. A message is considered:
    • A JSON controlled message (e.g., subscribe, unsubscribe)
  • A connection that goes beyond the limit will be disconnected; IPs that are repeatedly disconnected may be banned.
  • A single connection can listen to a maximum of 1024 streams.
  • There is a limit of 300 connections per attempt every 5 minutes per IP.

Available Streams​

Public Streams​

Public streams are available without authentication and provide market data:

Market Data Streams​

  • <symbol>.trades - Trade stream for a specific symbol (e.g., ethusdt.trades)
  • <symbol>.ticker - 24hr ticker statistics for a specific symbol (e.g., ethusdt.ticker)
  • <symbol>.update - Real-time updates for a specific symbol (e.g., ethusdt.update)
  • <symbol>.kline-<interval> - Kline/candlestick stream for a specific symbol and interval (e.g., ethusdt.kline-1m, ethusdt.kline-5m)
  • <symbol>.d-v - Depth/volume updates for a specific symbol (e.g., ethusdt.d-v)
  • global.tickers - All market tickers stream

Example Public Stream URLs​

wss://dev.yimmit.com/api/v3/ranger/public/?stream=ethusdt.trades&stream=ethusdt.ticker
wss://dev.yimmit.com/api/v3/ranger/public/?stream=btcusdt.trades&stream=btcusdt.kline-1m&stream=global.tickers

Private Streams​

Private streams require authentication and provide user-specific data:

User Data Streams​

  • trade - Trade execution updates for your account
  • order - Order status updates (new, filled, canceled, etc.)
  • balance - Account balance updates
  • withdraw - Withdrawal status updates

Example Private Stream URLs​

wss://dev.yimmit.com/api/v3/ranger/private/?stream=trade&stream=order&stream=balance
wss://dev.yimmit.com/api/v3/ranger/private/?stream=withdraw&stream=profile
tip

For full details on event trigger conditions, state tables, and complete response payloads for order, trade, and withdraw events, see Private Stream Events.

Stream Event Format​

Public Stream Events​

Public stream events are returned as JSON objects:

{
"stream": "ethusdt.trades",
"data": {
"id": "12345",
"price": "2500.00",
"qty": "0.1",
"time": 1672515782136,
"isBuyerMaker": true
}
}

Private Stream Events​

Private stream events include user-specific data:

{
"stream": "order",
"data": {
"id": 700001,
"side": "buy",
"ord_type": "limit",
"price": "42000.00",
"state": "done",
"market": "btcusdt",
"created_at": "2026-02-20T16:00:00Z"
}
}

Stream Details​

Trade Stream (<symbol>.trades)​

Real-time trade information for a specific symbol. Also available as a private trade event sent directly to the maker and taker of each match.

Stream Name: <symbol>.trades (e.g., ethusdt.trades)

Update Speed: Real-time

Public Payload (broadcast to all subscribers of {marketId}.trades):

{
"ethusdt.trades": {
"trades": [
{
"tid": 789,
"taker_type": "buy",
"date": 1741400000,
"price": "2500.00",
"amount": "0.1"
}
]
}
}

Private Payload (sent to the matched maker and taker only, via wss://.../private):

{
"trade": {
"id": 789,
"price": "2500.00",
"amount": "0.1",
"total": "250.00",
"market": "ethusdt",
"side": "buy",
"taker_type": "buy",
"created_at": 1741400000,
"order_id": 23515
}
}

See Private Stream Events for full field descriptions.

Ticker Stream (<symbol>.ticker)​

24hr ticker statistics for a specific symbol.

Stream Name: <symbol>.ticker (e.g., ethusdt.ticker)

Update Speed: 1000ms

Payload:

{
"stream": "ethusdt.ticker",
"data": {
"market": "ethusdt",
"last": "2500.00",
"open": "2450.00",
"high": "2550.00",
"low": "2440.00",
"volume": "1000.5",
"quote_volume": "2500000.00",
"time": 1672515782136
}
}

Global Tickers Stream (global.tickers)​

All market ticker statistics.

Stream Name: global.tickers

Update Speed: 1000ms

Payload:

{
"stream": "global.tickers",
"data": [
{
"market": "btcusdt",
"last": "50000.00",
"volume": "500.0"
},
{
"market": "ethusdt",
"last": "2500.00",
"volume": "1000.5"
}
]
}

Order Stream (order)​

Order status updates for your account. Triggered on order creation, update, cancellation, and completion.

Stream Name: order

Channel: Private (wss://.../private)

Update Speed: Real-time

Response Format:

{
"order": {
"id": 23515,
"market": "ethusdc",
"kind": "bid",
"side": "buy",
"bid": "usdc",
"ask": "eth",
"ord_type": "limit",
"price": "2021.97",
"avg_price": "0.0",
"state": "wait",
"origin_volume": "0.0029",
"remaining_volume": "0.0029",
"executed_volume": "0.0",
"at": 1773294648,
"created_at": 1773294648,
"updated_at": 1773294648,
"trades_count": 0,
"maker_fee": "0.0015",
"stop_price": "0.0",
"stop_loss_status": null,
"price_precision": 2,
"amount_precision": 4,
"total_fee": "0.0"
}
}

See Private Stream Events → Order for full trigger conditions, state reference, and field descriptions.

Withdraw Stream (withdraw)​

Withdrawal status updates for your account. Triggered on every AASM state transition of the withdrawal.

Stream Name: withdraw

Channel: Private (wss://.../private)

Update Speed: Real-time

Response Format:

{
"withdraw": {
"id": 55,
"currency": "usdt",
"amount": "3.0",
"fee": "1.2",
"blockchain_txid": "de9723b3-97e3-43fa-adab-5aa0ec5208d6",
"type": "Withdraws::Coin",
"state": "processing",
"protocol": "sepolia",
"blockchain_key": "eth-testnet",
"transaction_type": "external",
"tid": "TID731049B2E6",
"rid": "0x76dcd3dafb5f7229542f0580d9c5a1612486a42b",
"created_at": "2026-03-12 05:51:23 UTC",
"updated_at": "2026-03-12 05:51:25 UTC"
}
}

See Private Stream Events → Withdraw for full state transition table and field descriptions.

Subscribe Streams Response​

When a user subscribes to streams, the WebSocket connection will receive the following response:

{
"success": {
"message": "subscribed",
"streams": [
"trade",
"order",
"withdraw"
]
}
}

Balance Stream (balance)​

Account balance updates.

Stream Name: balance

Update Speed: Real-time

Payload:

{
"stream": "balance",
"data": {
"currency": "BTC",
"free": "1.00000000",
"locked": "0.50000000",
"total": "1.50000000"
}
}

Best Practices​

  1. Stream Selection:

    • Subscribe only to streams you need to reduce bandwidth
    • Use multiple stream parameters in a single connection when possible
    • Avoid exceeding the 1024 stream limit per connection
  2. Error Handling:

    • Implement exponential backoff for reconnection attempts
    • Monitor connection health and reconnect if no messages received
    • Handle JSON parsing errors gracefully
  3. Rate Limiting:

    • Stay within the 5 messages per second limit
    • Avoid rapid connection attempts (300 connections per 5 minutes per IP)

Notes​

  • Stream events are delivered in chronological order.
  • Events are sent asynchronously as they occur.
  • If you miss events due to disconnection, you may need to query the REST API to synchronize your state.
  • For order book management, consider using the depth streams and following the order book synchronization pattern.