General WebSocket API information
- The base URL: wss://api-adapter.dzengi.com/connect
- The base URL, demo account: wss://demo-api-adapter.dzengi.com/connect
- All endpoints return either a JSON object or array.
- All time and timestamp related fields are in milliseconds.
- Websocket API connection is closed in case API is not pinged for a 30-seconds time interval.
- All the tokenised assets except companies tokens, tokenized bonds and tokenised assets from Hong Kong markets are available in the first version (v1) of our API. In the second API version (v2) Hong Kong markets became also available.
- The list of assets available for leverage trading within API can be found here.
!Note. For the successful signature generation please sort parameters in the request payload according to the alphabetical order.
Please, refer to the WebSocket API part within the Swagger in order to get the information needed. More usage examples can be found here.
Troubleshooting
Subscribe method
Callbacks
Correlation ID
This ID is needed for mapping asynchronous response with request
request.correlationId = request.correlationId + 1;
Request model
‘Symbol’ parameter description
Both for the exchange and leverage trading modes 'symbol' parameter can be checked within exchangeInfo stream.
Exchange trading mode: use symbol from the exchangeInfo stream;
Leverage trading mode: look into the 'symbol' from the exchangeInfo stream. In case ‘symbol’ has currencies in its name then the following format should be used: ‘BTC%2FUSD_LEVERAGE’. In case ‘symbol’ has only an asset name then the following format is correct: ‘Oil%20-%20Brent.’
ENUM definitions
Order types (orderTypes, type):
- LIMIT
- MARKET
- STOP
Order side (side):
- BUY
- SELL
Time in force (timeInForce):
- GTC
- IOC
- FOK
Kline/Candlestick chart intervals:
m -> minutes; h -> hours; d -> days; w -> weeks
- 1m
- 5m
- 15m
- 30m
- 1h
- 4h
- 1d
- 1w
Please note that in case no value for the "intervals" parameter is mentioned when using the wss:OHLCMarketData.subscribe endpoint then '1m' value is set by default.