Websocket Streams
Real-time updates for various market info streams including orderbook depth, OHLCV candles, and trades.
Introduction
Developers can easily connect to the GTE WebSocket API to stream available market data. We recommend using a single connection to subscribe to multiple topics. Each subscription requires the following fields:
- id
- An arbitrary identifier chosen by the developer to easily match WebSocket responses to their corresponding subscriptions.
- method
- Specifies the topic to subscribe or unsubscribe from.
- params
- Parameters specific to the subscription topic. When unsubscribing, the params must match the original subscription.
Trades
The trades channel provides real-time updates for trades of a specified market.
Request Format
Response Format
The response structure is as follows:
s
: Stream type (always “trade” for this endpoint)d
: Data objectsd
: Side of the trade (“buy” or “sell”)m
: Market addresspx
: Price of the tradesz
: Size of the tradeh
: Transaction hashid
: Trade IDt
: Trade time (timestamp in milliseconds)
Candes
The candles channel provide OHLCV
Request Format
The supported intervals are: 1s, 30s, 1m, 3m, 5m, 15m, 30m, 1h, 4h, 6h, 8h, 12h, 1d, 1w
Response Format
The response structure is as follows:
s
: Stream type (always “candle” for this endpoint)d
: Data objectm
: Market addresst
: Candle start time (timestamp in milliseconds)i
: Interval (e.g., “1m” for 1 minute)o
: Open pricec
: Close priceh
: High pricel
: Low pricev
: Volume (base unit)n
: Number of trades
L2 Orderbook [Coming Soon]
The orderbook channel provides real-time updates for the order book of a specified market.
Request Format
Response Format
The response structure is as follows:
Error Handling
In case of an error, the following structure will be returned:
id
: Unique identifier for the requeststatus
: Always 1 for error messageserror
: Description of the error