Self-contained developer package for the CCXT-compatible consumer sink on exchange.datadefi.ai. Use this directory (or clone it as a standalone repo) to integrate markets, tickers, order books, and OHLCV into bots, dashboards, and agent runtimes.
Not the x402 paywall. Genomic micropayments and MCP tools live on x402.datadefi.ai. Paid client flows are documented in the DataDeFi x402 integration guide. The CCXT surface under /api/ccxt/* is public (no 402) on the exchange API.
Source of truth in the private monorepo: csai/services/datadefi-x402-mcp-safe/public/. See SECURITY.md before publishing this repo.
# Validate live feed (recommended first step)
python3 scripts/validate_ccxt_sink.py
# Or open the zero-install demo
open webapp/index.html # macOS; or double-click in a browser# Python (CCXT class)
pip install -r python/requirements.txt
python3 python/examples/basic.py
# Node (thin fetch wrapper)
node js/examples/basic.js| Path | Purpose |
|---|---|
docs/datadefi_ccxt.md |
Canonical model: LRB instruments vs synthetic market layer |
docs/INTEGRATION.md |
Step-by-step sink integration (env, auth, CORS, production) |
docs/INTERFACE.md |
Every endpoint, parameter, response shape, errors |
python/day1_ccxt.py |
Reference CCXT exchange stub (vendored from micro/services/) |
js/datadefi_ccxt.js |
Equivalent thin wrapper for Node / browser (with fetch) |
webapp/index.html |
Rapid-start browser demo (markets, ticker, book, OHLCV, validate) |
scripts/validate_ccxt_sink.* |
Troubleshooting validators (Python / shell / TypeScript) |
marketing/ |
Partner-ready overview, benefits, one-pager |
| Variable | Default | Role |
|---|---|---|
DATADEFI_API_BASE_URL |
https://exchange.datadefi.ai |
Exchange origin (Python day1_ccxt) |
DATADEFI_CCXT_BASE_URL |
{origin}/api/ccxt |
Full CCXT prefix (validators / JS client) |
DATADEFI_API_KEY |
(empty) | Optional; public CCXT does not require a key today |
DATADEFI_CCXT_SYMBOL |
CVAR/USD |
Probe symbol for examples / validation |
- Allowed: Instruments returned by
GET /api/ccxt/markets(base spotsGVAR/USD,BRCA/USD,NEURO/USDplus LRB indices such asCVAR/USD,EQTL/USD, …). - New LRB indices: Adding instruments via
lrb_assets.jsonon the exchange is expected; consumers should refresh markets, not hardcode. - Forbidden pattern: 1:1 replication of external exchange symbols (e.g.
BTC/USD) as if they were native genomic instruments. Validators flag these.
Responses use Cache-Control: no-cache on the exchange. Consumers may cache markets for 1–5 minutes locally; refresh tickers/order books more frequently for UX.
| Surface | URL |
|---|---|
| CCXT REST (this package) | https://exchange.datadefi.ai/api/ccxt/* |
| Dynamic micropay hints | https://exchange.datadefi.ai/api/pricing/suggested-micropay |
| x402 gateway + MCP | https://x402.datadefi.ai |
| API docs | https://exchange.datadefi.ai/docs |
MIT — reference code in python/ and js/ is intended for vendoring into your project.