How to get an API key for Bybit

This page explains how to get an API key for Bybit's transaction history (SPOT and Deriv).

Trade types that can be obtained by API and exchange file.

Please be sure to check here for more details about our support for Bybit.

Important Notes

1. API key is valid only for 3 months
Bybit/API expires in 3 months, therefore, you need to create a new API key and re-establish the connection every 3 months. For details on how to do this, please refer to here.
NEW: On January 19th, 2023, we have made our IP open to the public. You can now set up your API to have no expiry. For details on how to set this up, please refer to here.

2. Historical transactions
For Bybit/API, it is unknown how far back in history it can get the data from.  (Spot trades which is more than 6 months old are likely to be not retireved from the API).For file export, the specification is that you can export up to two years of data. For trade history that cannot be obtained via the API, you need to either download the exchange file and upload it, or upload as custom trades.

3. For transaction types not supported by API nor files, use custom trades
Please be sure to check here for more details about our support for Bybit.

4. Always do a final check
If the transactions fetched via the API and the transactions in the downloaded file are different, Cryptact cannot determine which is more accurate. Please check the transaction details by yourself 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.

 

■How to get API key

① After logging in, click on the Person icon and select "API". mceclip0.png

 

② Click on "API Management" tab. In the "API Key" section, click "Create New Key".

mceclip1.png

 

Please select "System-generated API Keys".

__________2023-03-03_110924.png

③ In the next screen, do the following.

1. Select "API transaction".

2. Set "Name for the API key" to whatever you want to call your API key.

3. Set API Key Permissions to "Read-Only".

4. Select "Only IPs with permissions granted are allowed to access the OpenAPI" and enter the below IP.

52.69.115.51,52.193.138.38,18.179.74.94

5. Set the Type to "Permission" to turn on the permission.

6. Click "Submit".

ByBit_API.png

 

④ Fill out your 2FA code and click "Submit". mceclip4.png

 

⑤ Generated API key and API secret will be displayed on the screen.

Make sure you note API key and API secret key down!

The API key and API secret are displayed only once upon creation. You will not be able to check them after this time. If you miss this opportunity, you will have to create another API key.

If you previously synced with an API that had a validity period of 3 months, and later removed that API integration, and now you want to sync with a new API without an expiration date through cryptact, please make sure to enter the same sub-account name as before. If it was not set previously, please leave it blank. Please be aware that if a different sub-account name is added, it will result in duplicated spot trading history.

mceclip5.png

 

 

■How to renew API every 3 months

NEW: On January 19th, 2023, we have made our IP open to the public. You can now set up your API to have no expiry. For details on how to set it up this way, please refer to the above.

1. Delete the existing API

   Delete the API listed on the Connect to your Bybit account screen.

Please remember the subaccount name you previously used for the API (in the below example, "test") before deleting it.If you added the API with an empty subaccount name, it would be displayed as blank. Please note that deleting the API will not delete the trade history from your ledger.

 

2. Create a new API key

For details on how to do this, please refer to here.

 

3. Add the newly created API key

Connect to Bybit using the API key you have created in the above step.

Please use the same subaccount name you have previously used. You can just leave it blank if you did not use any subaccount name previously. Please note that if you use a different subaccount name, you will end up with duplicate SPOT trade history.

▼If there is any trade history previously uploaded via files, the datetime will be displayed on the screen. Please tick the checkbox before clicking "Submit".

Connect via Bybit API

Add API connectivity to Bybit by entering the generated API key and secret via Connect to your exchanges

 

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.