We are making some important changes to our WebSocket and REST APIs, of which you will find detailed below. All changes will be available in Testnet from 15 December 2022 at 04:00 UTC and in Production from 16 January 2023 at 04:00 UTC.
- The Separation of Trading vs. Non-trading Related Data
- Depreciation of Fields
- Removal of JSON Nulls
Further detail on all these changes has been supplied, however, if you have any questions before these changes come into effect, please contact Support.
A) The Separation of Trading vs. Non-trading Related Data
We are introducing separate endpoints for trading vs non-trading related data. The new endpoint will be /realtimePlatform and will support the following topics:
- announcement
- chat
- publicNotifications
The existing websocket will continue to support these topics for a grace period of eight weeks. Any integrations relying on these topics need to be migrated before then; after which attempting to subscribe to these topics on the primary /realtime
B) Depreciation of Fields
REST API | Websocket Topic | Removing Fields |
GET /user/wallet |
wallet |
|
GET /user/margin |
margin |
|
GET /position |
position |
|
GET /order |
order |
|
|
execution |
|
GET /instrument |
instrument |
|
n.a. |
account |
|
On the WebSocket feed, for partial messages or topics using full width messages, we will no longer send JSON null or null equivalent values.
Existing format: | New Format: |
|
|
Examples of JSON null equivalents:
JSON Data Type | Null Equivalent |
string | “” |
timestamp | “2000-01-01T00:00:00.000Z” |
duration | “2000-01-01T00:00:00.000Z” |
uuid | “00000000-0000-0000-0000-000000000000” |
Implementations should ensure that appropriate defaults are used, if presence of a null field in the JSON message is required.
If you have any questions about these upcoming changes, please contact Support.