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
int64
identifier chosen by the developer. The Websocket server will respond with the sameid
to confirm actions.
- An arbitrary
- 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
Trades Subscription Request
Trades Unsubscription Request
Response Format
The response structure is as follows:Trades Stream
Candles
The candles channel provide OHLCV. Supported candle intervals:1s, 30s, 1m, 3m, 5m, 15m, 30m, 1h, 4h, 6h, 8h, 12h, 1d, 1w
Request Format
Candles Subscription Request
Candles Unsubscription Request
Response Format
The response structure is as follows:L2 Orderbook
The orderbook channel provides real-time updates for the order book of a specified market.Request Format
Orderbook Subscription Request
Orderbook Unsubscription Request
Response Format
The response structure is as follows:Orderbook Stream
Order Events
The order events channel provides real-time order updates for users.Request Format
Order Events Subscription Request
Order Events Unsubscription Request
Response Format
The stream will return these order events:placed
, filled
, amended
, and canceled
.
The payload for each order event contains the following structure:
Order Placed
Order Placed Event
Order Filled
Order Filled Event
Order Amended
Order Amended Event
Order Canceled
Order Canceled Event
Error Handling
In case of an error, the following structure will be returned:Error Response
Code | Description |
---|---|
1 | Malformed Request |
2 | Unknown Method |