> ## Documentation Index
> Fetch the complete documentation index at: https://guides.koinx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Generate Your OKX Tax Report with KoinX

> Connect your OKX Exchange account to KoinX in a few steps to generate tax reports compliant with your local jurisdiction.

<Info>
  **File Upload**  ·  **\~10 min**  ·  Spot · Margin · Futures · Deposits · Withdrawals · Staking  ·  **100+ countries**
</Info>

## What's covered

<CardGroup cols={2}>
  <Card title="Spot, Margin and Futures" color="#0066CC" icon="arrow-right-arrow-left">
    Executed spot, margin, and futures orders.
  </Card>

  <Card title="Staking and Rewards" color="#0066CC" icon="piggy-bank">
    Staking income and reward distributions.
  </Card>

  <Card title="Deposits and Withdrawals" color="#0066CC" icon="building-columns">
    On-chain deposits and withdrawals.
  </Card>

  <Card title="Fund movements" color="#0066CC" icon="receipt">
    All other funding history and transfers.
  </Card>
</CardGroup>

## Before you start

<CardGroup cols={2}>
  <Card title="OKX account" icon="building-columns">
    Active account with transaction history.
  </Card>

  <Card title="KoinX account" icon="sparkles" href="https://app.koinx.com/get-started">
    Free account - no credit card needed.
  </Card>
</CardGroup>

***

## Connect OKX to KoinX

**OKX uses File Upload only - export Trading History and Funding History separately and upload both files together in one KoinX session.**

<Tabs>
  <Tab title="File Upload">
    Export both report types from your OKX account. Both files are required for a complete transaction history.

    <Tabs>
      <Tab title="Trading History">
        <Steps>
          <Step title="Log in to OKX">
            Go to [okx.com](https://www.okx.com) and sign in to your account.
          </Step>

          <Step title="Open Order Center">
            Hover over **Assets** in the top navigation bar and click **Order Center**.
          </Step>

          <Step title="Select Trading History">
            Click the **Trading history** tab.
          </Step>

          <Step title="Download the CSV">
            Click **Download** on the right. Set your date range to cover your full history and click **Export**. Download the file when ready. Do not open it.

            <Note>
              OKX screen views only show the last 90 days, but the full download export covers your complete history. Always use the Download button rather than copying from screen. Also download your Funding History - switch to the Funding History tab to continue.
            </Note>
          </Step>
        </Steps>
      </Tab>

      <Tab title="Funding History">
        <Steps>
          <Step title="Log in to OKX">
            Go to [okx.com](https://www.okx.com) and sign in to your account.
          </Step>

          <Step title="Open Order Center">
            Hover over **Assets** in the top navigation bar and click **Order Center**.
          </Step>

          <Step title="Select Funding History">
            Click the **Funding history** tab.
          </Step>

          <Step title="Download the CSV">
            Click **Download** on the right. Set your date range and click **Export**. Download the file when ready. Do not open it.
          </Step>
        </Steps>

        <Note>
          Both files downloaded - scroll down to the Upload to KoinX section to import everything at once.
        </Note>
      </Tab>
    </Tabs>

    ## Upload to KoinX

    <Steps>
      <Step title="Open KoinX Integrations">
        Log in to [app.koinx.com](https://app.koinx.com) -> **Integrations** -> **Add Integration**.
      </Step>

      <Step title="Select OKX">
        Search for **OKX** and select it.
      </Step>

      <Step title="Upload both files">
        Click **Upload** and select both your OKX CSV files - Trading History and Funding History. Multi-select works.
      </Step>

      <Step title="Submit">
        Click **Submit**. KoinX processes your files and imports your full transaction history.
      </Step>
    </Steps>

    <Check>
      **Done.** KoinX reads your transactions, classifies them, deduplicates overlapping records, and prepares everything for gains calculation and report generation.
    </Check>

    Now that your OKX files are in, head to [Tax Reports](https://app.koinx.com/tax-report) on KoinX - your capital gains across spot, futures, staking, and funding history are already calculated and your report is ready to download.

    <Warning>
      **Never open OKX CSV files before uploading.** This corrupts the file format. If you already did - re-download fresh copies from OKX and upload those instead.
    </Warning>
  </Tab>
</Tabs>

***

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Do I need to upload both OKX CSV files?">
    Yes. Trading History covers executed spot, margin, and futures trades. Funding History covers deposits, withdrawals, and staking rewards. Missing either file leaves gaps in your transaction history and results in inaccurate tax calculations. Upload both in the same KoinX session.
  </Accordion>

  <Accordion title="What is the difference between Trading History and Funding History?">
    Trading History covers your executed spot, margin, and futures orders. Funding History covers deposits, withdrawals, staking rewards, and other fund movements. Both are required for a complete and accurate tax report.
  </Accordion>

  <Accordion title="Can I use the OKX API instead of CSV?">
    The OKX API is available but limited - it only provides 3 months of trading history and 1 month of other transactions. For a complete tax history, CSV export is strongly recommended.
  </Accordion>

  <Accordion title="Does KoinX support my country's crypto tax rules?">
    Yes. KoinX supports 100+ countries with dedicated report formats for India, the US, UK, Australia, Canada, Germany, and more. After importing your OKX data, select your country to generate the correct report.
  </Accordion>

  <Accordion title="Why does the OKX screen only show 90 days of history?">
    OKX screen views are limited to the last 90 days for display purposes, but the full download export covers your complete history. Always use the Download button in Order Center rather than copying visible data from the screen.
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="CSV file won't upload to KoinX">
    Re-download fresh copies of both CSV files from OKX without opening or modifying them. Opening files in Excel or Google Sheets reformats the structure and breaks the upload. Upload both files together in a single KoinX session.
  </Accordion>

  <Accordion title="Deposits and withdrawals are missing from KoinX">
    Only the Trading History CSV was uploaded. Go back to **OKX** -> **Assets** -> **Order Center** -> **Funding history** -> **Download**, and upload the Funding History CSV to KoinX alongside the Trading History file.
  </Accordion>

  <Accordion title="Staking rewards are missing from KoinX">
    Staking rewards are included in the Funding History export. Re-download the Funding History CSV and re-upload both files together in KoinX.
  </Accordion>

  <Accordion title="OKX export is still processing">
    Large exports can take a few minutes to generate. Wait for the download link to become active in the exports list before downloading. Do not attempt to upload a partially generated file.
  </Accordion>

  <Accordion title="KoinX is showing duplicate OKX transactions">
    This happens when overlapping CSV files covering the same date range are uploaded. Go to **KoinX** -> **Integrations**, remove the duplicate OKX upload, and re-upload a clean set of files with no overlapping date ranges.
  </Accordion>

  <Accordion title="Date range on OKX export is not saving correctly">
    Clear your browser cache and retry setting the date range. Ensure you click Export after setting the range - the file will appear in the download queue once generated.
  </Accordion>
</AccordionGroup>

***

## Related integrations

<CardGroup cols={2}>
  <Card title="Bybit Integration" icon="bolt" href="/integration/bybit">
    Connect Bybit via API key or file upload.
  </Card>

  <Card title="Binance - File Upload" icon="chart-bar" href="/integration/binance">
    Export Binance CSVs for Spot, P2P, Earn, and Options.
  </Card>

  <Card title="Bitget - API Upload" icon="key" href="/integration/bitget">
    Connect Bitget via Tax API Key or Normal API Key.
  </Card>

  <Card title="Bitunix Integration" icon="chart-line" href="/integration/bitunix">
    Connect Bitunix via API key or CSV upload.
  </Card>
</CardGroup>

<Card title="Ready to generate your OKX crypto tax report?" color="#6366f1" icon="rocket" href="https://app.koinx.com/get-started">
  Create a free KoinX account - no credit card required. Import your OKX transactions and generate a country-specific tax report in minutes.
</Card>
