Linux command
ccxt 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Fetch the order book
ccxt [binance] fetchOrderBook [BTC/USDT]
Fetch recent trades
ccxt [okx] fetchTrades [ETH/USDT]
Fetch all tickers
ccxt [bitget] fetchTickers --table
Fetch account balance
ccxt [bybit] fetchBalance
Display available markets
ccxt [gate] markets
Create a limit order
ccxt [binance] createOrder [BTC/USDT] limit buy [0.001] [50000]
Use sandbox mode
ccxt [okx] fetchTicker [BTC/USDT] --sandbox
Get help on a method
ccxt explain createOrder
说明
CCXT (CryptoCurrency eXchange Trading) CLI is a command-line interface for interacting with over 100 cryptocurrency exchanges using the CCXT library. It allows fetching market data, checking balances, placing orders, and more without writing code. The CLI supports both public APIs (no authentication needed) and private APIs (requiring API keys). Credentials can be provided via environment variables (e.g., BINANCE_APIKEY, BINANCE_SECRET) or a keys.local.json configuration file. Output is JSON by default and can be piped to tools like jq for processing. The --table option provides human-readable formatted output.
参数
- --table
- Format output as a readable table instead of JSON.
- --raw
- Output raw JSON without formatting.
- --sandbox
- Use the exchange's sandbox/testnet environment.
FAQ
What is the ccxt command used for?
CCXT (CryptoCurrency eXchange Trading) CLI is a command-line interface for interacting with over 100 cryptocurrency exchanges using the CCXT library. It allows fetching market data, checking balances, placing orders, and more without writing code. The CLI supports both public APIs (no authentication needed) and private APIs (requiring API keys). Credentials can be provided via environment variables (e.g., BINANCE_APIKEY, BINANCE_SECRET) or a keys.local.json configuration file. Output is JSON by default and can be piped to tools like jq for processing. The --table option provides human-readable formatted output.
How do I run a basic ccxt example?
Run `ccxt [binance] fetchOrderBook [BTC/USDT]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --table do in ccxt?
Format output as a readable table instead of JSON.