-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
exchanges_smoke
github-actions[bot] edited this page Sep 4, 2026
·
1 revision
// Smoke test across a set of exchanges via the TYPED API. Each venue is built
// by id with `ccxt::from_id` (which returns a boxed `TypedExchange`) and its
// typed `fetch_markets()` is run over the network, printing the decoded count.
use ccxt::Params;
use ccxt::{from_id, TypedExchange, TypedExchangeExt};
#[tokio::main]
async fn main() {
let ids = ["binance", "bybit", "okx", "kucoin", "bitget", "hyperliquid", "gate"];
for id in ids {
println!("\n=== {id} ===");
let mut ex: Box<dyn TypedExchange> = match from_id(id, None) {
Some(e) => e,
None => {
println!(" unknown id");
continue;
}
};
print!(" fetch_markets … ");
// Typed `fetch_markets() -> Result<Vec<Market>>` (implicit-API setup is
// handled lazily inside the Core, so no manual describe()/build needed).
match ex.fetch_markets(Params::none()).await {
Ok(markets) => println!("{} markets", markets.len()),
Err(e) => println!("error: {e}"),
}
}
}(If the page is not being rendered for you, you can refer to the mirror at https://docs.ccxt.com/)
- Install
- Examples
- Manual
- CCXT Pro
- Contributing
- Supported Exchanges
- Exchanges By Country
- API Spec By Method
- FAQ
- Changelog
- Awesome
- API Spec by Exchange
- alpaca
- apex
- aster
- backpack
- bigone
- binance
- bingx
- bit2c
- bitbank
- bitbns
- bitfinex
- bitflyer
- bitget
- bithumb
- bitmex
- bitopro
- bitrue
- bitso
- bitstamp
- bitteam
- bittrade
- bitvavo
- blockchaincom
- blofin
- btcbox
- btcmarkets
- btcturk
- btse
- bullish
- bybit
- bydfi
- cex
- coinbase
- coinbaseexchange
- coinbaseinternational
- coincheck
- coinex
- coinmate
- coinone
- coinsph
- coinspot
- cryptocom
- cryptomus
- deepcoin
- delta
- deribit
- derive
- digifinex
- dydx
- extended
- foxbit
- gate
- gemini
- grvt
- hashkey
- hibachi
- hitbtc
- hollaex
- htx
- hyperliquid
- independentreserve
- indodax
- kraken
- krakenfutures
- kucoin
- kucoinfutures
- latoken
- lbank
- lighter
- luno
- mercado
- mexc
- modetrade
- mudrex
- nado
- ndax
- okx
- onetrading
- p2b
- pacifica
- paradex
- paymium
- phemex
- poloniex
- revolutx
- tokocrypto
- toobit
- upbit
- weex
- whitebit
- woo
- woofipro
- xt
- zaif
- zebpay
- API Spec by Prediction Exchange