How to Export Trade History from Binance, Bybit and OKX
Where to download futures trade history on Binance, Bybit and OKX: menu paths, reports, limits. And what not to expect from a file: the order book and pulled stops.
Binance, Bybit and OKX each hand over your futures trade history as a file, each in its own way. Binance gives up to a year per file and counts your requests per month. Bybit takes one to three days to prepare a file. OKX goes back to 28 January 2021. Below: where the button is on each exchange, which reports to take for USDT and USDC perpetual futures, and what not to expect from the files: the order book at the moment of your fill, and the stops you cancelled or moved.
Which reports exist and which a journal needs
An exchange keeps four kinds of records, each with a file of its own.
- Orders. Your instructions: price, size, type and status, filled or cancelled.
- Trades. Every fill of an order: price, quantity, fee. One order can fill in several trades.
- Transactions. Everything that changed your balance: fees, realized profit and loss, transfers and funding, the payment between longs and shorts on a perpetual contract.
- Positions (P&L). One row per closed position, with its result. P&L is profit and loss.
A journal needs the trades, the fees and the funding. Orders help you find the stop and the take-profit, the orders that close a position at a loss or at a gain.
| What | Binance | Bybit | OKX |
|---|---|---|---|
| Orders | Order History | Order History | Order history |
| Trades | Trade History | Trade History | Trading history |
| Fees and funding | Transaction History | Transaction Log | Position history: the Fee and Funding Fee columns |
| Result | Transaction History, REALIZED_PNL rows | Closed P&L | Position history: the Pnl column |
Where to export: Binance, Bybit, OKX
Binance
- Open your futures orders. At the top right of the futures trading screen: Orders → USDⓈ-M Futures Order.
- Go to Order History. Choose USDⓈ-M, Binance's name for futures settled in USDT or USDC.
- Click the export icon. It is at the top right. Pick a period in the pop-up; for your whole history, choose Beyond 3 months - Custom.
- Click Export.
That is the order export as Binance's help page gives it. The trade and transaction files, Trade History and Transaction History, appear only in the documentation of the API, the channel programs use to read exchange data. According to it, each of the three files has its own request limit, shared between the website's download page and the API.
| File | Requests per month |
|---|---|
| Order History | 10 |
| Trade History | 5 |
| Transaction History | 100, shared with COIN-M contracts |
One file covers a year at most, and its download link lasts 7 days. Neither the help page nor the documentation names the file format. The API itself returns trades and transactions for the last three months only, and orders for 90 days. For anything older, the file is what remains.
Bybit
Exports work on the website only, not in the app, and the account must have passed identity verification.
- Open Data Export. Profile → Account → Data Export. Assets → Funding Account → History → Data Export leads to the same page.
- Choose the Order History type. Tick USDT Perpetual Order, Trade and Closed P&L History: orders, trades and position results. USDC contracts have the same line, USDC Perpetual.
- Set the period. Customize lets you pick your own dates, up to 12 months per file.
- Click Export Now. When the status turns to Exported, a Download button appears and an email arrives.
The file is a CSV, a table any spreadsheet opens. It takes 1–3 days to prepare, and its link works for 7 days. Bybit allows 50 exports a month across all data types. Funding sits in the second type, Transaction Log, which records every change of your balance. How far back the data goes, the help page states two ways: up to three recent years in one place, up to five years counted from 1 January 2022 in another.
There is a second export, from the orders page: Orders → Unified Trading Order → the product's history tab → Export. It gives up to 6 months of records from the last two years, no more than 10,000 rows per file, and at most 5 requests a day for derivatives. Through the API, Bybit returns two years of history, 7 days per request.
OKX
- Open the Order center. On the website: Assets → Order center.
- Pick a tab. Order history for orders, Trading history for trades, Position history for positions with their fees and funding.
- Click Download. Set the instrument and the dates, choose the format, CSV or PDF, then Export.
- Collect the file. Copy download Link, Send to email or Save local copy. A copied link works for 1 hour.
In the app: Trade → Futures → the positions section → the Trade history icon → the Download icon. On screen OKX shows up to a year of history; downloads go back to 28 January 2021. The help page names no limit on the number of downloads or on the span of one file. Through the API, OKX returns orders and trades for the last three months.
What not to expect from an export
The order book at the moment of your fill
The order book is the list of other traders' buy and sell orders, with their prices and sizes. No exchange's description of its files includes it. OKX lists each file's columns, and all are your own: time, instrument, price, quantity, fee, result. Bybit describes Order History the same way: contract type, direction, quantity, fees, prices, result. Binance names no columns; a trade record in its API is price, quantity, fee and realized result.
It matters for a review: the book shows why a market order filled worse than you expected, how much was resting at the best price and whether it covered your size. OKX does publish an order book archive from March 2023 onwards, but that is market data, not your history: matching it to your fill is up to you.
Pulled and moved stops
A stop you pulled or replaced with a new one is, to the exchange, a cancelled order with no fill. This is how long the API returns a cancelled regular order:
- Binance. The API stops finding a cancelled or expired order with no fill once 3 days have passed since it was created. The rule is written for regular orders and for conditional ones, stops and take-profits, alike.
- Bybit. The API returns cancelled orders, and conditional orders cancelled before they triggered, for the last 24 hours only. The orders-page export takes orders cancelled in the last 7 days; the help page describes the big Data Export file as active and executed orders.
- OKX. A cancelled order with no fill is kept for 2 hours and is left out of the three-month order archive. Stops live longer on OKX: they are a separate kind, algo orders. The API returns their history, cancelled ones included, for three months, through a separate request.
Cancelled orders do turn up in files. Binance says Order History shows cancelled orders too, and OKX's order download window has a Hide canceled orders option. Whether pulled stops are among them, and how far back, neither help page says. Don't count on it.
How to turn the files into a journal by hand
- Download trades and transactions for the same period. On OKX, take Position history instead of transactions.
- Check the time zone. OKX lets you choose it when you export trades and positions. A journal is easier to keep in UTC.
- Group the fills into positions. One journal entry is everything from a position's open to its close. Add up the quantities; average the entry and exit prices by size.
- Add fees and funding. The table above says which file holds them; on Binance they are the COMMISSION and FUNDING_FEE rows.
- Enter the row in a spreadsheet. The trading journal template works out the risk, the result in R and the net result for you.
- Add what the file lacks. The first stop, the setup (the rule that told you to enter) and why you exited.
What else to record, and how to review the journal once a week, is shown in How to Keep a Trading Journal.
What a trader should take from this
- Export on a schedule. Once a month or once a quarter. Old history means a separate request: Bybit takes up to three days to prepare one, and Binance gives the trade file 5 times a month.
- Write the stop down when you enter. The API returns a pulled stop only briefly, 24 hours on Bybit and three days on Binance, and the exchange never knew why you entered.
You can skip collecting files by hand if your journal reads the trades itself with a read-only API key. The stop, the setup and the reason for the exit are still yours to write.
Sources
- Binance: How to Download My Order History for USDⓈ-M and COIN-M Futures Orders: the menu path, the export icon, the Beyond 3 months - Custom option; Order History shows cancelled orders too.
- Binance: What Are USDⓈ-Margined Futures and COIN-Margined Futures?: USDⓈ-M contracts are settled in USDT or USDC.
- Binance Developers: USDⓈ-M Futures, Account: the Order, Trade and Transaction History files: 10, 5 and 100 requests a month, shared between the download page and the API, up to a year each, a 7-day link; transactions through the API for three months; the REALIZED_PNL, FUNDING_FEE and COMMISSION types.
- Binance Developers: USDⓈ-M Futures, Trade: a cancelled order with no fill isn't found 3 days after it was created, any order after 90 days; the same for conditional orders; trades for three months, the fields of a trade record.
- Bybit: How to Self-Export My Account Data: the Data Export page, the data types, their descriptions and formats, 12 months per file, 50 exports a month, 1–3 days, a 7-day link, three years and five years of data; the export from the orders page: 6 months, 10,000 rows, 5 a day, cancelled orders of the last 7 days.
- Bybit API: Get Order History: two years of history, 7 days per request; cancelled orders for the last 24 hours only; beyond 7 days, only orders with fills.
- Bybit API: Enums Definitions: the Deactivated status, a conditional order cancelled before it triggered; the SETTLEMENT type in the Transaction Log is funding.
- OKX: How can I view my order history, position history, and trading history?: the website and app paths, the files' columns, CSV and PDF, the time zone, the Hide canceled orders option, a year on screen, downloads from 28 January 2021, the 1-hour link.
- OKX API v5 documentation: a cancelled order with no fill is kept for 2 hours; orders and trades for 3 months, and the order archive leaves out cancelled orders with no fills; algo order history for 3 months.
- OKX: Historical Market Data: the order book archive from March 2023.
Button names come from the exchanges' English sites. Other languages and regional sites may word them differently, and exchanges redesign their pages from time to time.


