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.
Login to your NiceHash account.
Navigate to the API Keys section under the Settings Page.
Direct Link: https://www.nicehash.com/my/settings/keys
Click Create New API Key and fill out the the form with the following settings:
Wallet Permissions - View balances, wallet activities and deposit addresses - Turn this option on
Exchange Permissions - View exchange order - Turn this option on
All other options - Turn these off
Copy your API Key and API Secret as these values will be needed later.
Follow the on-screen steps to enter your verification code to fully activate the API key. Once activated, copy your Organization Id.
Navigate to Step 1. Import. Select Add Account then choose the Nice Hash tab on CoinLedger. Click on Auto-Import then enter your API Key, API Secret and Organization ID into the correct fields. Click Sync Transactions.
NiceHash does not export complete transaction data for fiat purchases or fiat sells made on exchange. The API import only includes the crypto amount received or sent does not include the fiat amount. As a result, CoinLedger imports these transactions as Deposits or Withdrawals (non-taxable self-transfers).
Refer to this guide for instructions for how to edit the Deposit transaction and change it to a Fiat Buy (and with using the same approach you can edit a Withdrawal and change it to a Fiat Sell.)