Skip to main content
This topic delivers notifications for 24 hour window statistics for a pair (BASE_QUOTE), and this will happen whenever an order is opened, canceled or a trade happens for the given pair. By default, the system notifies the topic every 30 seconds, even if a transaction has not taken place.

Subscription Request

method
string
required
Subscribe method. Must be subscribe
topics
array
required
Array of topics to subscribe to. Format: ticker@BASE_QUOTEExample: ["ticker@ETH_BRL"]

Stream Response

id
integer
Each WebSocket message includes a sequential numeric id. Each topic has its own unique sequence, and for private topics, the sequence is unique to each topic and user. It’s important to note that some topics will send a “welcome message”, which will have an id value of -1. Additionally, this sequence may be reset between connections, so be sure to update this value locally whenever you reconnect.
topic
string
Topic name (format: ticker@BASE_QUOTE)
timestamp
integer
Timestamp in milliseconds
body
object
Ticker details object

Subscription Example

{
  "method": "subscribe",
  "topics": [
    "ticker@ETH_BRL"
  ]
}

Stream Response Example

{
  "id": 6,
  "topic": "ticker@ETH_BRL",
  "timestamp": 1672856683447,
  "body": {
    "ask": 4.01,
    "base_code": "ETH",
    "base_id": "27698137-8178-4395-9841-C1B1505C9352",
    "bid": 5,
    "conversions": [
      {
        "currency_code": "BRL",
        "volume": 0
      },
      {
        "currency_code": "BTC",
        "volume": 0
      },
      {
        "currency_code": "ETH",
        "volume": 0
      },
      {
        "currency_code": "USD",
        "volume": 0
      }
    ],
    "date": "2022-09-28T19:13:40.887Z",
    "first": 10,
    "high": 20,
    "last": 20,
    "low": 20,
    "pair": "ETH_BRL",
    "price_change_percent_24h": "-16.66",
    "quote_code": "BRL",
    "quote_id": "48898138-8623-4555-9468-B1A1505A9352",
    "quote_volume": 600,
    "trades_quantity": 10,
    "volume": 124
  }
}

Multiple Pairs Example

{
  "method": "subscribe",
  "topics": [
    "ticker@ETH_BRL",
    "ticker@BTC_BRL",
    "ticker@BTC_USD"
  ]
}

Update Frequency

  • Default: Every 30 seconds
  • On Change: Immediately when a trade happens, order is opened/canceled
  • Time Window: All statistics are for the last 24 hours

Key Metrics

MetricDescription
Ask/BidCurrent market price levels
SpreadDifference between ask and bid
High/LowPrice extremes in 24h period
First/LastOpening and closing prices (24h)
VolumeTotal quantity traded in base currency
Quote VolumeTotal value traded in quote currency
Trades QtyNumber of individual trades
Price Change %Percentage change from first to last

Calculation Examples

// Bid-Ask Spread
const spread = ticker.ask - ticker.bid;

// Price Change Percentage
const percentChange = parseFloat(ticker.price_change_percent_24h);

// Average Trade Price
const averagePrice = ticker.quote_volume / ticker.volume;

// Price Range
const priceRange = ticker.high - ticker.low;

// Volatility (simple)
const volatility = priceRange / ticker.last;

Usage Notes

  • 24-hour Window: All metrics reset every 24 hours
  • Real-time Updates: Statistics update as new trades execute
  • Conversions: Multiple currency conversions included
  • Volume Metrics: Both base and quote currency volumes provided
  • Price Stability: Compare high/low to assess price stability

Use Cases

  • Real-time Ticker Display: Show current market prices and 24h stats
  • Technical Analysis: Use high/low/open/close for candlestick charts
  • Market Overview: Display key statistics for pair comparison
  • Alert Triggers: Alert when price change exceeds threshold
  • Trading Decisions: Use volume and volatility for entry/exit signals