Registry / crypto / ccxt-rest

ccxt-rest

JSON →
library2.5.0jsnpmunverified

ccxt-rest is a unified REST API wrapper for over 100 cryptocurrency exchanges, built on top of the CCXT library. Current stable version is 2.5.0, with frequent releases following CCXT updates. It provides a standardized HTTP interface for trading, market data, and account management, designed for easy integration with any programming language that can make HTTP requests. Key differentiators include comprehensive exchange coverage, automatic rate limiting, and support for WebSocket streaming in addition to REST. It simplifies multi-exchange trading bots and analytics by abstracting exchange-specific differences.

npm install ccxt-rest
INSTALL
IMPORT
SIG · CCXT-REST
C
ccxt-rest
cryptojavascriptv2.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CCXTRest
import { CCXTRest } from 'ccxt-rest'
const CCXTRest = require('ccxt-rest')
Default export is not available; use named import. CJS users: const { CCXTRest } = require('ccxt-rest');
CCXTRestServer
import { CCXTRestServer } from 'ccxt-rest'
import CCXTRestServer from 'ccxt-rest'
Named export for the server class. Default import is not supported.
config
import { config } from 'ccxt-rest'
const config = require('ccxt-rest').config
Configuration object is a named export; destructure or import directly.

Initializes a ccxt-rest server with Binance and Coinbase, starts it, then uses client to fetch BTC/USDT ticker.

import { CCXTRest, CCXTRestServer } from 'ccxt-rest'; const server = new CCXTRestServer({ port: 3000, exchanges: ['binance', 'coinbase'], apiKey: process.env.API_KEY ?? '', secret: process.env.SECRET ?? '' }); server.start().then(() => { console.log('ccxt-rest server running on port 3000'); }); // Fetch ticker via REST API const client = new CCXTRest({ baseUrl: 'http://localhost:3000' }); client.fetchTicker('BTC/USDT', 'binance').then(console.log);
Debug
Known issues
breakingVersion 2.0.0 changed the configuration structure. The `exchanges` config is now an array instead of an object with exchange IDs as keys.
fix
Update config to array format: exchanges: ['binance', 'coinbase'] instead of exchanges: { binance: {...}, coinbase: {...} }
affects: >=2.0.0
deprecatedThe `fetchMarkets` method is deprecated in favor of `loadMarkets` to align with CCXT terminology.
fix
Use `client.loadMarkets(exchangeId)` instead of `client.fetchMarkets(exchangeId)`
affects: >=1.5.0
gotchaRate limiting is not enabled by default. HTTP 429 errors may occur on high-frequency requests without explicit configuration.
fix
Set `rateLimit: true` in server options or configure per-exchange rate limits in CCXT options.
affects: *
breakingWebSocket support was removed in v2.0.0; only REST endpoints are provided.
fix
For WebSocket streaming, use CCXT directly or ccxt-pro. Alternatively, use older ccxt-rest v1.x with the --websockets flag.
affects: >=2.0.0
deprecatedThe `binanceus` exchange identifier was renamed to `binanceusdm` in CCXT v4.x, breaking ccxt-rest v2.x integration.
fix
Use 'binanceusdm' instead of 'binanceus' in exchange lists and endpoints.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'ccxt-rest'
Package not installed or installed globally but used locally without require/import path.
fix
Run `npm install ccxt-rest` in your project directory and ensure the import path is correct: `import { CCXTRest } from 'ccxt-rest'`
TypeError: CCXTRest is not a constructor
Using default import when the package exports named exports only.
fix
Use named import: `import { CCXTRest } from 'ccxt-rest'`
Error: ENOTFOUND localhost:3000
Server not running or port mismatch when client tries to connect.
fix
Ensure the ccxt-rest server is started on the same host and port. Check server logs and verify client configuration.
Error: Exchange 'kraken' not found in config
Exchange ID not included in the server's exchange list or misspelled.
fix
Add the exchange to the server config's exchanges array. Check for correct spelling and supported exchanges list.
Error: Rate limit exceeded (HTTP 429)
Too many requests without rate limiting enabled.
fix
Enable rate limiting in server options: set `rateLimit: true` or configure per-exchange limits.
Upgrade
Version history
2.5.0latest on npm
Audit
Dependencies
ccxtrequiredCore dependency providing exchange implementations
expressrequiredHTTP server framework for REST API
Agent activity
29 hits · last 30 days
node
24
Resources
ccxt-rest — npm install ccxt-rest · libregistry