On Monday, June 15 2020 we released V2 of our Exchange REST API and introduced a new V2 Exchange WebSocket API to better serve your trading needs (API Documentation here).
Here’s a summary of the key things you need to know:
- V2 API and WebSocket Server offers faster settlement, trading transaction speeds and increased rate limits.
- We will continue to support V1 REST API for now, but V1 REST API users should note some of the changes listed below.
- The V1 WebSocket is now deprecated. You will not be able to continue using the Exchange WebSocket unless you upgrade to V2 WebSocket.
What’s new in V2?
- Endpoints on both the V2 REST and V2 WebSocket APIs now expect the same request structures and payloads, making it easy to transition between the two platforms with no learning curve.
- Digital signatures now require HMAC-SHA256 keyed hashing instead of plain SHA256 hashing.
- V2 WebSocket APIs allow authenticated requests to place orders, cancel orders, etc. within one persistent connection. New authenticated subscriptions (user.order) allow users to receive updates on their own orders and trades.
- The new V2 REST API requests fall into two categories:
-Authenticated requests, such as placing orders or fetching account balance
-Public requests, such as information on pairs or fetching the order book - The V2 WebSocket is available across two servers:
-WebSocket User API – for authenticated requests and subscriptions
-WebSocket Market Data API – for public subscriptions (order book, trades, tickers, etc.)
What has changed in V1 REST as of June 15?
As part of our revamped infrastructure, V1 REST is still supported, but you should note the following important changes if you continue to use it:
- /v1/depth: the type parameter is no longer unsupported, which controls the number of decimals the order book returned. Instead, the token’s maximum number of decimals will be returned
- order_id has changed from a number to a string
- symbols: the response output shows the V2 symbols used (e.g. “BTC_USDT”), but you can still use the V1 symbols (e.g. “btcusdt”) when calling V1 APIs
We are excited to provide you with an enhanced trading experience and looking forward to seeing you use our new trading APIs. Happy trading!