Nicht alle genannten Produkte sind in allen Ländern verfügbar.

V3 Open API Supports USDT-margined Futures Trading

Veröffentlicht am 30. Okt. 2019Lesezeit: 3 Min.

Dear valued customers,

We will launch USDT-margined futures trading service soon. To support simulation and live trading, our upgraded futures trading API is expected to be released on 08:00 Oct 31, 2019 (UTC). API documentation will be also updated correspondingly. We will update the time of opening simulation and live trading in a further announcement.

Details as follows: (Note: This announcement only extends to API users, and V1 Open API does not support USDT-margined futures trading.)

1. Updates:

Current: Our API cannot differentiate “coin-margined futures trading mode” and “USDT-margined futures trading mode” through parameters.

Endpoint: GET /api/futures/v3/accounts/

Example: GET /api/futures/v3/accounts/BTC

Updates: “currency” will be replaced with “underlying” in parameters. The parameters of coin-margined futures trading mode and USDT-margined futures trading mode are “BTC-USD” and “BTC-USDT” respectively.

Endpoint: GET /api/futures/v3/accounts/

Example of USDT-margined futures trading mode: GET /api/futures/v3/accounts/BTC-USDT

Example of coin-margined futures trading mode: GET /api/futures/v3/accounts/BTC-USD

The existing request format remains compatible after the update. corresponds to (underlying index).

Example: GET /api/futures/v3/accounts/BTC = GET /api/futures/v3/accounts/BTC-USD

Note: “POST /api/futures/v3/accounts/margin_mode in setting account mode” in restAPI cannot be used interchangeably. Entering the corresponding underlying index is required while using this API.

2.Involved Endpoint: restAPI

a. Information on futures accounts of a single currency: GET /api/futures/v3/accounts/

b. Enquiry about account statements: GET /api/futures/v3/accounts//ledger

c. Set the leverage level for futures contracts (cross-margin mode): POST/api/futures/v3/accounts//leverage

d. Obtain the leverage level for futures contracts: GET /api/futures/v3/accounts//leverage

e. Publicly obtain contract information: GET /api/futures/v3/instruments - - - - returning necessary strings with the response

f. Set futures account mode: POST /api/futures/v3/accounts/margin_mode - - - - this API is incompatible

g. Obtain information on futures accounts of all currency: GET /api/futures/v3/accounts - - - - returning necessary strings with the response

3. Involved Endpoint: WebsocketAPI

a. Public – channels for full contract data: futures/instruments - - - - necessary strings added to the return parameter

b. Individual – subscribe to account data channels: futures/account

Example of coin-margined futures trading mode: {"op": "subscribe", "args": ["futures/account:BTC"]}

Example of USDT-margined futures trading mode: {"op": "subscribe", "args": ["futures/account:BTC-USDT"]}

If you do not trade USDT-margined futures contracts, your program will remain unaffected, but new parameter fields will be added to the existing API response. Thank you for your understanding.

The V3 API offers more stable, efficient experience and more comprehensive functionalities than the V1 API. As V1 Restful API will be terminated soon, we suggest you switch to V3 API for trading. (API documentation: https://www.OKX.com/docs/en/) If you have any questions on migration or suggestions on API, please reach out to us on Telegram at http://t.me/OKXAPI.

Thank you for your continued support and we assure you of our best services at all times.

Regards,

OKX

Oct 30, 2019 (UTC)