Updated: 2026-02-15

How to Export OKX Trade History

Export your OKX spot, perpetual swap, futures, and options trade history as CSV files. Step-by-step instructions for each product type, plus what to do with the data once you have it.

Export Spot Trade History

Spot trades on OKX are exported from the spot order history section.

  • Log in to OKX on a desktop browser
  • Go to Trade > Spot > Order History, or Assets > Order History > Spot
  • Select the trading pair or leave it as 'All' to export everything
  • Set the date range — OKX allows up to 3 months per export
  • Click 'Export' to generate and download the CSV
  • For longer periods, run consecutive exports and import each file into Tiltless

Export Perpetual Swap Trade History

Perpetual swaps are the most traded derivative product on OKX. They have no expiry date and use funding rates to keep the price anchored to the spot market.

  • Go to Trade > Perpetual Swap > Order History
  • Select the contract (e.g., BTC-USDT-SWAP) or 'All'
  • Set the date range and click 'Export'
  • The CSV includes fill price, size, side, fee, and order ID
  • USDT-margined and crypto-margined swaps may be in separate tabs

Export Futures Trade History

OKX expiry futures have fixed settlement dates and are exported separately from perpetual swaps.

  • Go to Trade > Futures > Order History
  • Select the contract and date range
  • Click 'Export' to download the CSV
  • Futures contracts are identified by their expiry date (e.g., BTC-USD-250328)
  • Export futures separately from perpetual swaps — they are different products with different settlement mechanics

Export Options Trade History

If you trade options on OKX, those fills are exported separately from swaps and futures.

  • Go to Trade > Options > Order History
  • Select the underlying asset and date range
  • Click 'Export' to download the CSV
  • Options exports include strike price, expiry, and option type (call/put)
  • Options are a distinct product type — export them separately from other derivatives

What the CSV Contains

OKX trade history CSVs include the core execution data for each fill.

  • Date and time of execution (UTC)
  • Instrument ID (trading pair or contract symbol)
  • Side: buy or sell
  • Fill price and quantity
  • Fee amount and fee currency
  • Order ID for matching fills to orders
  • For derivatives: leverage and margin mode may be included

CSV Export Limitations

CSV export works but has real limitations compared to API sync. Be aware of these before relying on CSV as your primary import method.

  • 3-month date range limit per file — long histories require multiple exports
  • Funding rate payments are not in the standard trade history CSV — they are in a separate billing export
  • Liquidation events may not appear in the standard trade history
  • No automatic sync — you must re-export and re-upload to capture new trades
  • Export is most reliable on the desktop web interface
  • Each product type (spot, perp swap, futures, options) requires a separate export

Consider API Sync Instead

If you trade actively on OKX, API sync is faster and more complete than CSV export. A read-only API key pulls trades automatically — including funding rate payments, liquidation events, and all product types — without manual exports.

Note: OKX API keys require a passphrase in addition to the key and secret. See our API key setup guide for the full configuration steps.

CSV export is best for one-time historical backfill. For ongoing journaling, API sync removes the friction of repeated manual exports.

Related Resources

FAQ

?Where do I export trade history on OKX?

Go to Assets > Order History on the OKX website. Select the instrument type (spot, perpetual swap, futures, or options) and click Export. You can also find exports under Trade > Order History for each product type.

?What date range can I export?

OKX typically allows CSV exports covering up to 3 months per file. For longer periods, run multiple exports with consecutive date ranges and import each file into Tiltless.

?What format does the CSV use?

OKX exports a CSV with columns for time, instrument ID, side, price, size, fee, fee currency, and order ID. The exact columns may vary slightly between spot and derivatives exports.

?Do I need to export spot and derivatives separately?

Yes. OKX separates trade history by instrument type. Spot, perpetual swaps, expiry futures, and options each have their own export section. Export each type separately and import them into Tiltless individually.

?Is there a faster way than CSV export?

Yes — connect a read-only API key instead. API sync pulls trades automatically and does not require manual exports. See our OKX API key setup guide for instructions. Note: OKX API keys also require a passphrase.

?Does the CSV include funding rate payments?

Not in the standard trade history export. Funding payments for perpetual swaps are in a separate billing or transaction history export. For automatic funding rate tracking, use API sync instead of CSV.

?Can I export from the OKX mobile app?

The OKX mobile app has limited export functionality. For a complete trade history CSV, use the OKX website on a desktop browser. The full export controls are only available in the web interface.

?What is the difference between OKX perpetual swaps and futures?

Perpetual swaps have no expiry date and use funding rates. Futures have a fixed expiry date and settle at expiration. Both are exported separately on OKX. Make sure you export from the correct section for the products you trade.

?What if my export is empty or missing trades?

Check the date range and instrument type. OKX requires you to select the correct product type before exporting. If you traded BTCUSDT perpetual swaps, you need to be in the perpetual swap section, not the spot section.

Import your OKX trades into Tiltless

Upload your CSV or connect a read-only API key. Your trades are indexed in minutes.

How to Export OKX Trade History (CSV) | Tiltless