# What happens to your data and your bot when an exchange closes

How a crypto exchange winds down, stage by stage, and what each stage does to your positions, API keys, bot connectors, trade history and the venue's tape.

*https://cryptomarkets.tools/guides/what-happens-when-an-exchange-closes · background to Crypto Trading Bots*

**Answer:** An exchange closure runs in dated stages: registrations and deposits stop, positions can only be reduced, contracts are settled at a price the venue names, trading ends, and a withdrawal window runs, sometimes with a monthly fee on whatever is left after it. API trading and bots go with trading or before it, and CCXT deleted its BitMart, BitMEX and CoinEx classes within five days of a notice or a halt. Only your own export keeps your fills.

An exchange closure is announced once and then happens to you several times, on different days.
Each stage switches off something different: new accounts, deposits, new positions, open
positions, trading, the API, and in the end the login that holds your records. A bot notices some
of these stages as errors and misses others entirely.

This page follows three closures announced in 2026, by BitMEX, BitMart and CoinEx, through their
own notices. It covers the whole venue going. One pair being delisted on a venue that keeps trading
is a different mechanism, covered in
[what happens to a pair's data when an exchange delists it](https://cryptomarkets.tools/guides/what-happens-to-data-after-a-delisting).
Every closure the catalogue tracks, with its date, is on the [shutdowns chronology](https://cryptomarkets.tools/shutdowns).

## How it works

The three notices ran the same sequence at very different speeds. BitMEX gave 62 days from notice
to closure. BitMart stopped all trading 31 days after its notice. CoinEx stopped futures 7 days
after its notice and spot 14 days after.

1. **Notice, and no new accounts.** BitMEX stopped registrations "with immediate effect" on 23
   July 2026. BitMart began stopping them at 01:30 UTC on 26 July 2026, and CoinEx on 15
   September 2026.
2. **Deposits stop.** BitMart began suspending crypto and fiat deposits at the same 01:30 UTC on 26
   July, and warned that later deposits "may not be automatically credited". CoinEx stopped
   on-chain deposits on 22 September, except for its own CET token, which it accepted until 29
   September. BitMEX's closure notice gives no deposit date. Its closing notice of 23 September
   says deposits are no longer available.
3. **Positions can only shrink.** BitMEX applied risk limits from 04:00 UTC on 26 August "to stop
   users from placing new positions", then set the remaining contracts to Reduce Only mode group by
   group, the last between 7 and 10 September. BitMart's futures accounts went reduce-only on the day of its
   notice, and its spot market stopped accepting new orders the same day. CoinEx put every futures
   market into reduce-only on 15 September, and kept spot trading normally until 29 September.
4. **Open positions are settled for you.** At a stated time the venue cancels open orders and
   closes every remaining position at a settlement price of its choosing. See the next section.
5. **Trading ends.** BitMart discontinued all spot and futures trading at 01:00 UTC on 26 August
   2026. CoinEx ended non-spot services on 22 September and spot on 29 September. BitMEX ended
   at its Closure Time, 04:00 UTC on 23 September 2026.
6. **What you hold may be converted.** CoinEx began processing non-USDT balances at 02:00 UTC on
   29 September. Assets with liquidity elsewhere were sold on external markets and returned as
   USDT "based on the net proceeds from the actual sale". Assets with none were delisted, and the
   platform said it would "no longer maintain the relevant wallets". Any CET left was bought back
   at 0.005 USDT per token.
7. **Withdrawals stay open, then close or cost money.** BitMEX set no end date: login and
   withdrawals continue after the Closure Time. CoinEx closes withdrawals at 02:00 UTC on 22
   December 2026. BitMart plans to cease platform operations at 15:59 UTC on 31 January 2027,
   after which users can still log in "for a specified period".

Older closures compressed the same sequence. The Bittrex Global notice, as captured on 20
November 2023, gave one date, 4 December 2023, when "all trading activity on Bittrex Global will be disabled", and
after it customers could "only be able to withdraw assets". No reduce-only stage and no withdrawal
deadline were stated.

## What reduce-only and a settlement price do to a position

**Reduce-only is a venue-wide mode, not an order flag.** BitMEX's notice of 4 September defines it:
"traders are no longer able to increase the size of their positions, open positions can only be
reduced". It also states an exception: designated market makers may still increase positions "so
they can continue to provide liquidity". For a bot this means any order that would open or add to
a position is refused, whatever the bot's own settings say. A closing order still goes through. The
per-order reduce-only flag, which is a different thing, is covered in
[how to place an order on several exchanges](https://cryptomarkets.tools/how-to/place-an-order-on-several-exchanges).

**Funding stops before the position does.** BitMEX's settlement procedure fixes one last funding
rate, calculated as normal from the previous eight hours, at 04:00 UTC on the settlement day. After
that "the next Funding Rate set to 0". That last rate is exchanged at settlement. CoinEx said
funding would "continue to operate normally" during its reduce-only window.

**The exit price is an index, not your last trade.** At 12:00 UTC on 16 September 2026 BitMEX
expired XBTUSD, XBTUSDT, ETHUSD and ETHUSDT, cancelled all open orders, and closed out every
position "using the relevant Settlement Prices". Each settlement price is an index, named by
symbol in the notice: `.BXBT30M` for XBTUSD. No fee was charged. The contract's lifetime profit and loss was
added to the user's bitcoin or Tether balance, and the contract no longer appeared under
Positions. Dated futures were settled early too, at the index adjusted by a rate:
1.021 for the March 2027 bitcoin future, taken from a 30-minute average of the fair basis on 4
September. CoinEx said positions still open on 22 September would be "forcibly settled by the
platform, with the settlement price based on the index price". BitMart said futures still open on
26 August "may be settled" on "the applicable mark price, index price, or settlement rules in
effect at the time", with details "announced separately".

The settlement is the closing leg of your position, and you did not place it. BitMEX points to a
Settlement History page on its site for the prices, not to your trade list. If your export holds
only fills, check that it shows the settlement, because no order of yours closed the position.

## What happens to the API key and the bot

**The notices rarely name the API.** BitMart is the exception. Its notice lists "Copy Trading,
Grid Trading, API Trading, and other automated trading services" among what it would discontinue
from 26 July, a month before trading ended. BitMEX's two closure notices and CoinEx's notice do not
mention the API at all, so neither gave it a date of its own. The
[BitMEX API alternatives page](https://cryptomarkets.tools/alternatives/bitmex-api) follows what went with it through to the
data and the order code.

**A key outlives trading.** BitMEX's closing notice says "Login and withdrawal capabilities remain
available", with no end date. CoinEx withdrawals run to 22 December. A key with withdrawal rights is
therefore still worth something to whoever holds it after the venue has stopped trading.

**The venue's own bots are stopped by the venue.** CoinEx accepted no new Auto-Invest, Spot Grid or
Futures Grid strategies from 15 September. On 22 September the platform ended every running
strategy, cancelled their orders, and closed Futures Grid positions "in accordance with the
applicable futures rules". BitMart stopped grid and copy trading from 26 July.

**CCXT deletes the class.** CCXT's delisting script removes every file for an exchange; the BitMEX
commit removed them in C#, Go, Java, JavaScript, PHP, Python and Rust. The three 2026 closures went
like this:

- **BitMart:** removed from master on 31 July 2026, five days after the notice and before trading
  ended. 4.5.70 is the last release with the class, 4.5.71 the first without.
- **BitMEX:** removed on 24 September 2026, the day after the Closure Time. 4.5.83 is the last
  release with it, 4.5.84 the first without.
- **CoinEx:** removed on 3 October 2026, four days after spot trading ended. 4.5.85 is the last
  release with it, 4.5.86 the first without.

Upgrade past those releases and `ccxt.bitmex` is no longer a name the module has. Pin an older
release and you keep a class pointed at a venue that no longer trades.

**Frameworks inherit the change when they bump the pin.** [Freqtrade](https://cryptomarkets.tools/tools/freqtrade) reaches
any venue outside its supported list through CCXT, and none of these three is on that list, as its
card records. Its stable branch pins ccxt 4.5.84, which has no BitMEX or BitMart class and
still has CoinEx. Its develop branch pins 4.5.90, which has none of the three.
[Hummingbot](https://cryptomarkets.tools/tools/hummingbot) writes its own connectors, and its card records the other failure:
`bitmart` and `bitmart_perpetual` were still on its development branch on 25 October 2026,
reaching an exchange that had stopped trading on 26 August.

**Hosted bots update their lists on their own schedule.** The [3Commas](https://cryptomarkets.tools/tools/3commas) card
records nine exchanges in v2, none of them BitMEX, while the site footer still named BitMEX on 4
October 2026. The [Bitsgap](https://cryptomarkets.tools/tools/bitsgap) card records BitMart dropping out of its
supported-exchange table, re-read on 25 October 2026. So a venue still appearing in a list is not
evidence that it trades. Removal can also arrive before trading ends, as BitMart's did in CCXT.

## Where the venue's history goes

**Not to the exchange.** None of the three notices says anything about public market data, candle
history or an archive after closure. What they keep is your account: BitMEX promises "historical
transaction information" behind the login after closure, and BitMart promises access to
"historical records" for a specified period after 31 January 2027. CoinEx says only that converted
balances will show in "account balances and transaction history". Its platform stops when
withdrawals do.

**To data vendors, for the public tape only.** What their cards record:

- **[Tardis.dev](https://cryptomarkets.tools/tools/tardis-dev)** freezes a closed venue's feed at a date and keeps it. BitMEX
  is marked delisted with history from 30 March 2019, frozen at 22 September 2026. FTX is kept from
  1 August 2019 to 13 November 2022, and AscendEX, OKCoin, CoinFLEX and dYdX v3 are frozen too.
- **[Amberdata](https://cryptomarkets.tools/tools/amberdata)** says in its changelog, as its card reports, that BitMEX history
  up to the closure stays available. Its funding data starts in May 2016 on BitMEX, and its exchange
  list includes FTX, FTX US, OKCoin and ZB.
- **[Coin Metrics](https://cryptomarkets.tools/tools/coin-metrics)** keeps the tape of venues that no longer exist, naming Mt.
  Gox, FTX, Bittrex, Liquid and Gatecoin. Its BitMEX XBTUSD and ETHUSD trades end at 12:00 UTC on
  16 September 2026, the settlement minute. Its free community tier serves no exchange-reported data.
- **[Kaiko](https://cryptomarkets.tools/tools/kaiko)**'s card records tick trades back to 2010 and does not record which closed
  venues it keeps.

None of these four cards, as written, records whether BitMart's or CoinEx's history is kept. And
none of them holds your account: a vendor's tape is the venue's public trades, not your fills, your
funding payments or your settlements.

## What it costs

The fees start when the withdrawal window ends.

- **BitMEX:** KYC'd users who have not withdrawn by the Closure Time are charged "an account fee of
  1% per annum (charged monthly), or USD 50 equivalent for accounts with no more than this amount".
  The fee is "to increase over time", with changes communicated in advance.
- **CoinEx:** USDT not withdrawn by 22 December 2026 goes into "independent custody", charged
  "monthly at 5% of the original asset balance as of the end of the withdrawal period". At that
  rate twenty monthly charges equal the whole original balance. Claims go by email to the support
  address, and the claims deadline is 22 August 2028, twenty months after the withdrawal deadline.
- **BitMart:** its notice sets no fee. Withdrawals after the recommended timeframe go to "a
  dedicated processing procedure", with arrangements "communicated separately".

Conversion is a cost of its own. A balance CoinEx sold for you on an external market came back at
the net proceeds of that sale, which is a price you did not choose.

## What you can do about it

**Read the notice for its first date, not its last.** The date that breaks a bot is the earliest
one. For BitMart, API trading and new spot orders stopped on the day of the notice, a month before
trading ended and six months before the platform closes. Put every stated time in a calendar in
UTC: CoinEx's own notice mixes dates without times with 02:00 UTC deadlines.

**Export before the first deadline that touches your records.** BitMart's notice asks users to
"download and securely retain your account balances, deposit history, withdrawal history, and
trading records". Do that at the notice, while the site, the app and the API all still work. The
mechanics and the limits of each export are in
[how to export your exchange trade history](https://cryptomarkets.tools/how-to/export-exchange-trade-history).

**Check that the export holds what tax needs.** For every row you want the time in UTC, the venue's
transaction or trade ID, the pair, the side, the quantity, the price, and the fee with the asset it
was charged in. Then add the rows a fills export leaves out: deposits and withdrawals, which carry
the cost basis of anything you transferred in; funding payments; the settlement that closed each
position; and any conversion the venue made for you, such as CoinEx's USDT conversions and CET
buyback. A closure produces exactly the rows a fills-only export misses.

**Check that it holds what a backtest needs.** Your own fills with order IDs, the funding you paid
and received, and the dates of each stage. A series that runs to the end includes the reduce-only
days and an index settlement, not a market close, so record where the wind-down began. For the
venue's public tape, buy it from a vendor that kept it, and check that vendor's card for the venue
by name before you pay.

**Find out whether your connector is gone, in the version you run.** In CCXT, test
`'bitmex' in ccxt.exchanges` against the installed release, not the documentation. In Freqtrade,
read the ccxt version pinned in the branch you run: stable and develop differ. In Hummingbot, the
connector's presence in the repository says nothing either way. For a hosted bot, read the
vendor's supported-exchange table rather than a footer or a landing page.

```python
import ccxt

print(ccxt.__version__)
print([venue for venue in ('bitmart', 'bitmex', 'coinex') if venue in ccxt.exchanges])
```

**Take the venue out of your config before the upgrade does it for you.** Code that builds a
venue's client by name stops at that line once the class is gone, which is the error the FAQ below
describes.

**Revoke the key while the login still works.** Withdrawals outlive trading at every venue here. A
key with withdrawal rights on a closed exchange is a live credential with nothing left to do except
move your money. [What your API key lets a bot do](https://cryptomarkets.tools/guides/what-your-api-key-lets-a-bot-do) covers
what to grant the replacement.

**Know which deadline is yours.** If you would rather close a position yourself than take the
venue's settlement price, the deadline is the settlement time, not the closure. If you want assets
back in their original form rather than converted, CoinEx's cut-off was 02:00 UTC on 29 September,
not 22 December.

## Tools this bears on

- [CCXT](https://cryptomarkets.tools/tools/ccxt.md) — One MIT client for 104 crypto exchanges, 76 of them over websocket.
- [Freqtrade](https://cryptomarkets.tools/tools/freqtrade.md) — Write the strategy in Python, backtest it, then run the same class live.
- [Tardis.dev](https://cryptomarkets.tools/tools/tardis-dev.md) — Tick-by-tick order books, trades and options chains from 69 exchange feeds since 2019.
- [Coin Metrics](https://cryptomarkets.tools/tools/coin-metrics.md) — Institutional reference rates, exchange market data and network metrics behind one API.

## FAQ

### Can I still download my trade history after an exchange closes?

It depends on the notice, and only one of three 2026 notices promises it open-ended. BitMEX said users could still log in after closure to see balances and historical transactions. BitMart said login would continue for a specified period after 31 January 2027. CoinEx said the platform ceases operations when withdrawals end on 22 December 2026 and promised nothing after. Export before the first deadline, not the last.

### What happens to an open futures position when an exchange closes?

The venue first stops you adding to it, then closes it for you at a price it names. BitMEX closed its last perpetuals at 12:00 UTC on 16 September 2026 at index-based settlement prices, with no settlement fee. CoinEx settled positions still open on 22 September 2026 at the index price. BitMart said positions open on 26 August 2026 may be settled at mark price, index price or other rules.

### Why does my code say the ccxt module has no attribute bitmex?

Because CCXT deletes a closed exchange's class outright. BitMEX went from master on 24 September 2026 and is absent from release 4.5.84 on; BitMart is absent from 4.5.71, CoinEx from 4.5.86. Upgrading past those releases removes the name, and pinning an older release keeps a class whose venue no longer trades.

### What happens to money left on an exchange after the withdrawal deadline?

On the two 2026 notices that set terms, it starts paying a fee. BitMEX charges KYC'd users 1% a year, charged monthly, or 50 dollars' worth for small balances, and said the fee will rise. CoinEx moves unwithdrawn USDT into independent custody at 5% of the original balance a month, with a claims deadline of 22 August 2028.

## Sources

1. [Important Message from BitMEX](https://www.bitmex.com/blog/bitmex-closure/) — BitMEX (HDR Global Trading Limited), 2026-07-23
2. [Setting the Remaining Contracts on the BitMEX Platform to Reduce Only from 7th September, and Delisting on 16th September](https://www.bitmex.com/blog/reduce-only-september) — BitMEX (HDR Global Trading Limited), 2026-09-04
3. [XBTUSD, XBTUSDT, ETHUSD and ETHUSDT Perpetual Swaps and XBTU26, XBTZ26, XBTH27 and ETHUSDU26 Futures Contracts](https://www.bitmex.com/blog/delisting-16-september) — BitMEX (HDR Global Trading Limited), 2026-09-16
4. [[Notice] BitMEX Exchange Now Closed](https://www.bitmex.com/blog/bitmex-closure-live/) — BitMEX (HDR Global Trading Limited), 2026-09-23
5. [Important Notice Regarding the Orderly Cessation of BitMart Operations (Internet Archive capture of 14 October 2026)](https://web.archive.org/web/20261014103919/https://bitmart.zendesk.com/hc/en-us/articles/53544595916059-Important-Notice-Regarding-the-Orderly-Cessation-of-BitMart-Operations) — BitMart, read through the Internet Archive, 2026-07-26
6. [Important Notice on CoinEx's Orderly Cessation of Operations (Internet Archive capture of 15 September 2026)](https://web.archive.org/web/20260915143531/https://www.coinex.com/en/announcements/detail/53539656293908) — CoinEx, read through the Internet Archive, 2026-09-14
7. [Important Update Regarding Bittrex Global (Internet Archive capture of 20 November 2023)](https://web.archive.org/web/20231120185353/https://bittrexglobal.com/) — Bittrex Global, read through the Internet Archive, read 2026-10-27
8. [delist: remove bitmart (#29376), commit of 31 July 2026](https://github.com/ccxt/ccxt/commit/9b5b5514044b7264f7da17d38bdd0198ade5685c) — CCXT, on GitHub, 2026-07-31
9. [chore: delist bitmex (#30612), commit of 24 September 2026](https://github.com/ccxt/ccxt/commit/15b904507e3da3a8c3865c44be3f45c71bfafa71) — CCXT, on GitHub, 2026-09-24
10. [fix!(coinex): delist (#30737), commit of 3 October 2026](https://github.com/ccxt/ccxt/commit/41850f6699df11a2c2a0d6a98b6edb078e6bfef5) — CCXT, on GitHub, 2026-10-03
11. [requirements.txt on the stable branch (pins ccxt 4.5.84)](https://github.com/freqtrade/freqtrade/blob/1f394eaebc2f46a83d26971388628707802f8602/requirements.txt) — Freqtrade, on GitHub, read 2026-10-27
12. [requirements.txt on the develop branch (pins ccxt 4.5.90)](https://github.com/freqtrade/freqtrade/blob/dafa0b6f4e1af30a80aedf730b5509ca59d0d7cc/requirements.txt) — Freqtrade, on GitHub, read 2026-10-27

*Last updated 2026-10-27. A reference page, corrected in place — not a dated post.*
