How to get an API key for OKX

 

This page explains how to get an API key for OKX's transaction history.

If the transactions fetched via the API and the transactions in the downloaded file are different, we cannot determine which is more accurate. Please check the transaction details thoroughly after they are fetched via the API. If you find any missing transactions, please send us the downloaded file and the API details via the Support button at the bottom right. We will check the details.

 

According to the API specification, only distributions transactions for the last 1 month can be fetched via the API. (other transactions for the past 3 months). If you have distributions trade history older than 1 month(or other trade histroy older than 3 months), please upload them ascustom tradesbefore establishing the API connection. Also we don't support any transactions except spot trade, derivatives, swap, margin(*1), staking redemption by API. (We don't support "seagull" transaction histories)

(*1)Since the actual trading is done through spot transactions, the transaction history starts with the selling transactions and may result in invalid transactions. As for the borrowing/returning history, it is not currently delivered via API from the exchange. Please upload a custom file for it (refer to 2.12).

As of 31st Mar 2023, since API doesn't provide enogh data for "Shark Fin" feature, and therefore, we don't support the transaction from "Shark Fin". 

 

How to get API Key

1. Log into OKX, click the Profile icon, and then click the "API" menu.

__________20230113_140003.png

 

2. Click "Create V5 API key".

 

3.

①Select API trading.

②Fill in the API name field.

③Fill in the Passphrase field.

④Enter the below IP in IP address allowlist(option)

52.69.115.51,52.193.138.38,18.179.74.94

④Select "Read"in Permission.

⑤Click "Confirm".

4.Two-factor authentication

①~③Fill in Email code and Authentication app code fields and click "Confirm".

mceclip0.png

5. Take note of the API key and the Secret key displayed on the screen.

 

Add API Connectivity to OKX

Once you have the API key, you can connect it to Bitrue from here.

 

Disclaimer

Please note that we will not be held responsible for any damages caused by unauthorized use or other accidents due to API connections. When connecting, please be sure to use the API key specified by us.