CoinLedger only needs "Read" or "View" access to import your trade history. This permission protects your accounts. Learn more about API access in this article here.
Jump ahead with this table of contents:
API Import Walkthrough
Step 1:
Login to your BitMart account.
Step 2:
Select Account from the top-right dropdown.
Direct Link: https://www.bitmart.com/account/en
Step 3:
Next, navigate to the the API Management section.
Direct Link: https://www.bitmart.com/api-config/en-US
Step 4:
Fill out the form to create an API Key:
Memo - This can be any phrase you’d like, but make sure you write this memo down or save it to a safe place before proceeding to the next steps
Read-only - this will be toggled on by default and it is the only Authority you should set for your API key. Trade and Withdraw should not be toggled on
Once you've completed the steps above, press Submit.
You'll be prompted to complete some necessary verification steps, including an email and 2FA authentication code.
Step 5:
Now, your API Access Key and Secret Key have been created. Copy both of these keys to safe place before clicking Confirm, as you will not be able to access the Secret Key again. Once you have done so, press Confirm.
Step 6:
In your CoinLedger account, navigate to Step 1. Import. Select Add Account then choose the BitMart tab on CoinLedger. Click on Auto-Import.
Next, paste the Access Key into the API Key field, and paste the Secret Key into the Secret Key field. Finally, paste the Memo you created earlier into the Memo field.
After that, press Sync Transactions. Your data from BitMart will now be imported.
When importing your transaction history via API, you will have the option to specify a start date for your import. This feature is designed to prevent duplicate data from being imported. You can access this feature by hitting the Import Settings drop down menu, as shown below, and then specifying a date for your import to start from. All transactions after this date will be imported. You should not do this if you are importing all of your transactions into CoinLedger for the first time.
BitMart API Limitations
These transaction types are not returned by BitMart's API:
Staking rewards
These transaction types aren't currently supported by CoinLedger, and will cause your import to fail:
Margin trades
Please note BitMart has a date range limit on their API calls which means they only return data from the past 30 days. As a workaround, we recommend importing via our Universal CSV template instead.