Indodax
indodax-cli
Unofficial Rust CLI for Indodax. Use it to inspect markets, manage account data, place spot orders, stream live WebSocket events, run paper trading and price alerts, and expose the same command surface to agents through MCP.
Highlights
Public market data: server time, pairs, ticker, all tickers, summaries, order book, trades, OHLC, and price increments.
Private account data: account info, balances, transactions, and trade history.
Spot trading: buy, sell, cancel, cancel by client order ID, cancel all, and deadman countdown.
Funding: withdrawal fee lookup, crypto withdrawal, and withdrawal callback validation server.
Real-time streams: ticker, trades, order book, summary, and private order updates.
Paper trading: risk-free simulated trading with balances, orders, fills, history, and status.
Price alerts: threshold and percentage alerts with one-shot checks or live WebSocket monitoring.
Automation-friendly output: human tables by default, JSON envelopes with
-o json.Credential resolution: CLI flags, environment variables, or
~/.config/indodax/config.toml.Agent support: MCP server mode with guarded dangerous operations.
Recent Highlights
MCP server overhaul: Alert tools, deposit address, auth configuration, WebSocket snapshot tools, Resources, and Prompts support.
WebSocket reliability overhaul: application-level pings, automatic reconnection with exponential backoff, and private WebSocket support for real-time order and balance updates.
Secure WebSocket authentication: configurable WebSocket tokens with fallback to a stable default.
TradeAPI-2 compliance: normalized symbol formats and stricter request handling across commands.
Response parsing improvements: order book handling supports both legacy and modern API shapes.
Installation
Install from source:
git clone https://github.com/ibidathoillah/indodax-cli.git
cd indodax-cli
cargo install --path .Install from crates.io:
cargo install indodax-cliInstall from npm:
npm install -g indodax-cliOn Android/Termux, npm install -g indodax-cli downloads the Android release binary when available. If the release asset is missing, it falls back to a local cargo build, so cargo still needs to be installed in Termux for that fallback path.
Run with Docker:
docker run --rm ibidathoillah/indodax-cli --help
docker run --rm -v ~/.config/indodax:/root/.config/indodax ibidathoillah/indodax-cli balanceRun from the checkout:
cargo build
./target/debug/indodax --helpQuick Start
Market data does not require credentials:
indodax server-time
indodax ticker btc/idr
indodax orderbook btc/idr --count 10
indodax pairs
indodax ohlc --pair btc/idr
indodax -o json ticker btc/idrConfigure private API credentials:
indodax auth set --api-key YOUR_API_KEY --api-secret YOUR_API_SECRET
indodax auth test
indodax auth showOr use environment variables:
export INDODAX_API_KEY=your_api_key
export INDODAX_API_SECRET=your_api_secretCredential priority:
--api-keyand--api-secretINDODAX_API_KEYandINDODAX_API_SECRET~/.config/indodax/config.toml
Command Reference
Global options:
indodax [OPTIONS] <COMMAND>
Options:
-o, --output <table|json> Output format [default: table]
--api-key <API_KEY> API key override
--api-secret <API_SECRET> API secret override
--api-secret-stdin Read API secret from stdin
-v, --verbose Enable verbose logs
--yes, --force Skip confirmation promptsMarket
indodax server-time
indodax pairs
indodax ticker btc/idr
indodax ticker-all
indodax summaries
indodax orderbook btc/idr --count 10
indodax trades btc/idr
indodax ohlc --pair btc/idr --interval 60
indodax history btc/idr --timeframe 15 --from 1779158061 --to 1779454161
indodax webdata btc/idr
indodax chat-history
indodax pairs-v2
indodax search-v2
indodax terminal-trade usdt/idr
indodax terminal-market usdt/idr
indodax terminal-categories
indodax onramp-config usdt/idr
indodax news btc
indodax price-incrementsAccount
indodax account-info
indodax balance
indodax transactions
indodax trades-history btc/idr --limit 5Trading
indodax order buy --pair btc/idr --idr 100000 --price 1000000000
indodax order buy --pair btc/idr --idr 100000 --order-type market
indodax order sell --pair btc/idr --amount 0.001 --price 1000000000
indodax order cancel --order-id 123456 --pair btc/idr --order-type buy
indodax order cancel-by-client-id --client-order-id CLIENT_ID
indodax --yes order cancel-all --pair btc/idr
indodax order countdown --pair btc/idr --countdown-time 60000Funding
indodax withdrawal fee --asset btc
indodax withdraw --asset btc --volume 0.001 --address bc1... --network BTC
indodax withdrawal serve-callback --port 8080For withdrawals, Indodax may require a callback URL. Configure it with:
indodax auth set --callback-url https://yourdomain.com/callbackWebSocket Streaming
Public streams:
indodax ws ticker btc/idr
indodax ws trades btc/idr
indodax ws book btc/idr
indodax ws summaryPrivate stream:
indodax ws ordersPrice Alerts
indodax alert add -p btc/idr --above 150000000
indodax alert add -p btc/idr --below 50000000
indodax alert add -p btc/idr --percent-up 5
indodax alert add -p btc/idr --percent-down 10
indodax alert list
indodax alert list --history
indodax alert cancel -i 1
indodax alert cancel --all
indodax alert check
indodax alert watch -p btc/idr
indodax alert triggeredAlerts are stored in ~/.config/indodax/alerts.json.
Paper Trading
indodax paper init
indodax paper init --idr 50000000 --btc 0.5
indodax paper balance
indodax paper buy -p btc/idr -i 1000000
indodax paper buy -p btc/idr -a 0.1 -r 500000000
indodax paper sell -p btc/idr -a 0.05 -r 1000000000
indodax paper orders --pair btc/idr
indodax paper cancel -i 1
indodax paper cancel-all
indodax paper fill -i 1
indodax paper fill -i 2 --price 110000000
indodax paper fill --all
indodax paper check-fills -p '{"btc/idr": 95000000, "eth/idr": 12000000}'
indodax paper topup -c usdt -a 50000
indodax paper history
indodax paper status
indodax paper resetPaper trading mirrors the live order interface for safer strategy testing.
Interactive Shell
indodax shellMCP Server
indodax mcp
indodax mcp -s all
indodax mcp -s all --allow-dangerous
indodax mcp -s market,trade,paperService groups:
Group | Tools | Auth Required | Dangerous |
| Server time, ticker, pairs, orderbook, trades, OHLC, price increments, WS snapshots | No | No |
| Balance, trade history, transactions, account info, open orders, order history, get order | Yes | No |
| Buy, sell, cancel, cancel all orders | Yes | Yes |
| Withdraw fees, withdraw crypto, deposit address | Yes | Yes |
| Paper trading init, balance, buy, sell, orders, cancel, fill, history, status | No | No |
| Show config, test credentials, set credentials | Varies | No |
| Add, list, cancel, check price alerts | No | No |
By default, trade and funding MCP tools require acknowledged: true. Use --allow-dangerous only for controlled local automation.
MCP Resources
The server exposes read-only resources that MCP clients can inspect:
Resource URI | Description |
| Current API configuration status |
| All available trading pairs from the API |
| Current paper trading state (balances, orders count) |
MCP Prompts
Pre-built prompt templates for common workflows:
Prompt | Arguments | Description |
|
| Generate buy/sell order with safety checks |
| (none) | Account balance and open orders overview |
|
| Market analysis with ticker, order book, and trades |
Example MCP client configuration:
{
"mcpServers": {
"indodax": {
"command": "indodax",
"args": ["mcp", "-s", "all"]
}
}
}Output Formats
Table mode is the default:
indodax ticker btc/idrJSON mode is intended for scripting and automation:
indodax -o json ticker btc/idrError responses in JSON mode use structured envelopes:
{
"error": true,
"message": "Invalid trading pair: xxx_idr",
"error_type": "invalid_pair",
"retryable": false
}E2E Testing
The repository includes live API smoke tests:
./scripts/e2e_minimal.sh --public
./scripts/e2e_minimal.sh --private
./scripts/e2e_minimal.sh --ws
./scripts/e2e_websocket_mock.shEnvironment knobs:
INDODAX_BIN=./target/debug/indodaxLatest local verification:
cargo test: 296 passed
./scripts/e2e_minimal.sh --public: passed
./scripts/e2e_minimal.sh --private: skipped private checks (credentials unavailable)
./scripts/e2e_minimal.sh --ws: passedAPI Coverage
Public REST: Indodax market endpoints
Private REST: Indodax TradeAPI and TradeAPI-2 endpoints
Public WebSocket:
wss://ws3.indodax.com/ws/Private WebSocket:
wss://pws.indodax.com/ws/
Architecture
This project is inspired by the Kraken CLI architecture and built with modern Rust:
clapfor derive-based CLI parsingtokiofor async runtimetokio-tungstenitefor WebSocket streamsreqwestfor REST API callsserdefor serialization and deserializationcomfy-tablefor terminal tablesrmcpfor Model Context Protocol support
Testing Standards
Every release should pass:
Unit tests with
cargo testPublic E2E smoke tests
WebSocket smoke tests
Private read-only tests when credentials are available
Coverage is maintained across auth, client, config, errors, commands, mcp, and output modules.
Security
Credentials are stored with
0600permissions when usingindodax auth set.HMAC-SHA512 signing is used for private API authentication.
Prefer read-only API keys for account inspection and WebSocket monitoring.
Use least-privilege exchange API keys for MCP and automation.
Never commit real API keys, secrets, callback tokens, or listen keys.
Development
cargo fmt
cargo test
cargo buildContributing
Contributions are welcome:
Fork the repository.
Create a feature branch.
Run tests and relevant E2E smoke checks.
Open a pull request.
Related Projects
If you use multiple exchanges, check out these related CLI tools built with the same architecture:
indodax-cli - CLI for Indodax
bittime-cli - CLI for Bittime
binance-cli - CLI for Binance Spot
tokocrypto-cli - CLI for Tokocrypto
kraken-cli - CLI for Kraken (Spot, Margin, Futures)
License
MIT
Disclaimer
This project is unofficial and is not affiliated with or endorsed by Indodax. Cryptocurrency trading is risky; review commands carefully before using write-capable API keys.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ibidathoillah/indodax-cli'
If you have feedback or need assistance with the MCP directory API, please join our Discord server