v0.4.0 — Compile-time 93% faster, named params, self-describing APIs
Hey all, sharing a progress update on ccxt_client. v0.4.0 is going up on Hex today.
Compile-time: 35s → 2.5s
The biggest win this release. Exchange modules used to inline the full pipeline per endpoint — Binance alone took 28 seconds. We replaced that with a shared runtime dispatcher (Dispatch.call/5) where generated functions are thin wrappers looking up pre-computed @endpoint_configs. Binance now compiles in ~1 second. .beam sizes dropped 85%.
# What the generator produces now (per endpoint):
def fetch_ticker(symbol, opts \\ []) do
Dispatch.call(__MODULE__, :fetch_ticker, [symbol], opts, @endpoint_configs)
end
Named params everywhere
Positional arg0/arg1 replaced with actual parameter names across all 52 specs. Function signatures now read naturally:
# Before
CCXT.Binance.fetch_ohlcv(symbol, arg0, arg1, opts)
# After
CCXT.Binance.fetch_ohlcv(symbol, timeframe, since, opts)
Timeframe translation
Unified timeframes ("1h", "1d") are automatically translated to exchange-native formats ("60", "D") for both REST and WebSocket. No more checking what Phemex calls a daily candle.
# Just use standard timeframes — translation happens automatically
{:ok, candles} = CCXT.Phemex.fetch_ohlcv("BTC/USDT", "1d", credentials: creds)
Symbol format v2
Symbol normalization got significantly richer — forward_aliases, prefix handling, colon separators, and split_no_separator for exchanges that don’t use delimiters. Coverage went from basic delimiter mapping to handling most exchange quirks.
Self-describing APIs (Descripex)
Exchange modules now expose machine-readable metadata about their capabilities:
CCXT.Binance.__ccxt_spec__().endpoints
# Returns structured endpoint definitions with param types, defaults, etc.
This is groundwork for agent-consumable APIs — other tools (including AI agents) can discover what an exchange supports programmatically.
Other highlights
- CCXT v4.5.42 sync — added Lighter (DEX), 4 new parse methods (TWAP, ADL rank)
- 993 response transformers — column-oriented OHLCV, variable-length order book levels, bid/ask array coercion
CCXT.Health— quick exchange health checks (ping/2,latency/2,status/1)- Order sanity checks — validation on order responses
- Sync verification script —
scripts/verify_sync.shvalidates nothing breaks across spec refreshes
Installation
{:ccxt_client, "~> 0.4"}
Still need your help testing
The library covers 107 exchanges, but most authenticated endpoints still need real-world validation. If you trade on any exchange and can spare 10 minutes with testnet credentials, open an issue with what works and what doesn’t. Every exchange tested helps everyone.


















