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.
Updated: 2026-02-15
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.
Spot trades on OKX are exported from the spot order history section.
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.
OKX expiry futures have fixed settlement dates and are exported separately from perpetual swaps.
If you trade options on OKX, those fills are exported separately from swaps and futures.
OKX trade history CSVs include the core execution data for each fill.
CSV export works but has real limitations compared to API sync. Be aware of these before relying on CSV as your primary import method.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Upload your CSV or connect a read-only API key. Your trades are indexed in minutes.