Open the app
Data collection

Exchange integration

CCXT as the central layer across many venues, capability flags, version pinning, and venue trust tiers earned through onboarding.

CCXT is the central exchange integration layer across many venues — market metadata, balances, tickers, OHLCV, order books, order creation/cancellation, trade history and reconciliation where supported. Clawlas is not a Binance-only bot: Binance is one venue among many, and probably a minor one.

CCXT is central, not a universal abstraction

CCXT standardizes more than 100 venues behind one interface, but venues still differ in order types, stop-order parameters, order-history completeness, WebSocket capabilities, precision and minimum-notional rules, fees, authentication, maintenance windows and ticker collisions. So Clawlas always inspects capability flags before using a method:

capability flags
exchange.has.fetchMarkets / fetchOHLCV / fetchOrderBook
exchange.has.createOrder / cancelOrder / fetchOpenOrders / fetchMyTrades
exchange.has.watchTicker / watchTrades / watchOrderBook / watchOrders

A method being present is never proof it behaves identically across venues — flags gate behaviour, and per-venue contract tests verify it.

When a direct adapter is needed

  • a required endpoint is missing from CCXT;
  • lower latency or an exchange-specific order type is required;
  • the unified schema hides important information;
  • listing announcements need a separate source, or WebSocket behavior differs.

The VenueAdapter interface

No strategy calls CCXT directly. Every venue — CCXT, native, aggregator or paper — exposes one internal interface, so swapping implementations is a configuration choice:

VenueAdapter
get_quote() · validate_order() · place_order() · cancel_order()
reconcile_order() · get_balances() · health_check()

VenueAdapter ── CCXTAdapter · JupiterAdapter · EVMRouterAdapter
                NativeDEXAdapter · PaperTradingAdapter

Venue trust tiers

A supported venue is never auto-enabled for real trading. Each one earns a tier through an onboarding checklist before it can receive orders:

  1. 0
    Discovery only, no account connected
  2. 1
    Read-only account connection
  3. 2
    Paper trading / simulated execution
  4. 3
    Small real trades with human approval
  5. 4
    Limited automatic execution
  6. 5
    Fully approved within strict strategy limits

The onboarding checklist each venue must clear:

  • legal / geographical availability
  • verification requirements
  • API key scope controls
  • IP allowlisting
  • withdrawal restrictions
  • trading fees
  • minimum order amount
  • market precision
  • rate limits
  • WebSocket reliability
  • order-history reliability
  • liquidity & spread quality
  • deposit/withdrawal availability
  • incident history
  • fill reconciliation accuracy
  • sandbox / testnet support
  • tiny real-order behaviour
Pin the version, test every upgrade
CCXT changes frequently — releases add, remove or alter venues. Production pins an exact CCXT version; upgrades are tested in staging with a per-venue regression suite; production never auto-upgrades, and rollback to the previous package version is always possible.
Credentials never leave the execution service
Exchange API keys are never stored in Convex, in agent prompts or in logs; they use trading permissions only, with withdrawals disabled and IP restrictions where supported, mounted only into the execution engine. Agent services have no access to raw exchange secrets.