This page explains how to get an API key for Bybit's transaction history.
Contents:
1. Important Notes
1.1 Historical transactions
Please be sure to check this article for more details about our support for Bybit.
1.2 API key validity
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 this link.
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 this link.
1.3 Regarding sync time
For UTA, due to the exchange API, the initial sync may take time to retrieve futures and perpetual history.
2. How to get API key
After logging in, click on the Person icon and select "API".
Click on "API Management" tab. In the "API Key" section, click "Create New Key".
Please select "System-generated API Keys".
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 Open API" and enter the below IP.
52.69.115.51,52.193.138.38,18.179.74.94
5. Click on "Standard Account" or "Unified Trading" based on your own account. Please also choose "Convert, Exchange History."
6. Click "Submit".
▼Standard Account
▼Unified Trading Account
Fill out your 2FA code and click "Submit".
Generated API key and API secret will be displayed on the screen.
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.
3. 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.
3.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.
3.2 Create a new API key
For details on how to do this, please refer to this link.
3.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".
4. 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.