Unofficial CLI

Indodax CLI

Trade, track markets, and manage your Indodax account from the terminal. Built-in MCP server for AI agent integration.

$ indodax market ticker btc_idr
+----------+-------------+-------------+-----------+
| Pair | Last Price | High (24h) | Low (24h) |
+----------+-------------+-------------+-----------+
| BTC/IDR | 1,050,000,000 | 1,080,000,000 | 1,020,000,000 |
+----------+-------------+-------------+-----------+

$ indodax -o json account balance
{ "idr": 250000000, "btc": 0.42, "eth": 3.5 }

$ indodax mcp -s market,paper
# MCP server started โ€” connect your AI agent

โšก Features

Everything you need to interact with Indodax โ€” without leaving your terminal.

๐Ÿค–

AI Agent Integration

Built-in MCP server for Claude, ChatGPT, Cursor, VS Code, Gemini CLI, and any MCP-compatible agent.

๐Ÿ”ฅ

Real-Time Streams

WebSocket support for live ticker, trades, order book, and private order updates.

๐Ÿ“Š

Market Data

OHLCV, order books, tickers, summaries, and price increments at your fingertips.

๐Ÿ’ฐ

Account & Trading

Check balances, place orders, view history, and manage your portfolio.

๐Ÿงช

Paper Trading

Simulated trading environment with virtual balances to test strategies risk-free.

๐Ÿ””

Price Alerts

Set price alerts and monitor in real-time via WebSocket. Never miss a trading opportunity!

๐Ÿ”

Secure Auth

HMAC-SHA512 signing with 0600-permission config files and env variable support.

๐Ÿ“ฆ Installation

Requires Rust. Install from source in seconds:

git clone https://github.com/ibidathoillah/indodax-cli.git
cd indodax-cli
cargo install --path .

Or build locally:

cargo build --release
./target/release/indodax --help

๐Ÿš€ Quick Start

1. Check Market Data (No API Key Needed)

indodax market server-time
indodax market ticker btc_idr
indodax market orderbook btcidr
indodax market pairs

2. Set API Credentials (For Account & Trading)

indodax auth set --api-key YOUR_API_KEY --api-secret YOUR_API_SECRET

Or use environment variables for CI/CD:

export INDODAX_API_KEY=your_api_key
export INDODAX_API_SECRET=your_api_secret

3. Check Your Account

indodax account balance
indodax account info

4. Start the Interactive Shell

indodax shell

๐Ÿค– MCP Server

indodax-cli includes a built-in Model Context Protocol (MCP) server over stdio. No subprocess wrappers needed.

MCP tool calls run through the same Rust code path as CLI commands and inherit the same error handling, rate-limit behavior, and security model.

โš ๏ธ Warning

MCP is local-first and designed for your own machine. Any AI agent connected to this MCP server uses the same configured Indodax account and API key permissions. Do not expose, tunnel, or share this server outside systems you control. Always use https:// and wss:// endpoints. Treat this integration as alpha and use least-privilege API keys.

Usage

indodax mcp                           # default: market, account, paper (read-only)
indodax mcp -s all                    # all services, dangerous calls require acknowledged=true
indodax mcp -s all --allow-dangerous  # all services, no per-call confirmation
indodax mcp -s market,trade,paper     # specific service groups

Service Groups

GroupToolsAuthDangerous
marketServer time, ticker, pairs, orderbook, trades, OHLC, price incrementsNoNo
accountBalance, open orders, order history, trade history, account infoYesNo
tradeBuy, sell, cancel ordersYesYes
fundingWithdraw fees, withdraw cryptoYesYes
paperPaper trading init, balance, buy, sell, orders, cancel, history, statusNoNo
authShow config, test credentialsVariesNo

Configure Your MCP Client

Add to your MCP client configuration:

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "indodax": {
      "command": "indodax",
      "args": ["mcp", "-s", "all"]
    }
  }
}

VS Code / Cursor (.vscode/mcp.json or Cursor MCP settings):

{
  "mcpServers": {
    "indodax": {
      "command": "indodax",
      "args": ["mcp", "-s", "all"]
    }
  }
}

Gemini CLI:

gemini extensions install https://github.com/ibidathoillah/indodax-cli

๐Ÿ“– Commands

Market Data (Public API)

CommandDescription
market server-timeGet server time
market pairsList available trading pairs
market ticker <pair>Get ticker for a pair
market ticker-allGet tickers for all pairs
market summariesGet 24h and 7d summaries
market orderbook <pair>Get order book
market trades <pair>Get recent trades
market ohlcGet OHLCV candle data

Account (Private API)

CommandDescription
account infoGet account information
account balanceShow wallet balances
account open-ordersList open orders
account order-historyGet order history (v2 API)
account trade-historyGet trade fill history (v2 API)

Trading (Private API)

CommandDescription
trade buyPlace a buy order
trade sellPlace a sell order
trade cancelCancel an order by ID
trade countdownDeadman switch countdown

WebSocket Streaming

CommandDescription
ws ticker <pair>Stream real-time ticker
ws trades <pair>Stream real-time trades
ws book <pair>Stream real-time order book
ws ordersStream private order updates

๐Ÿ“ Output Formats

Human-friendly tables by default, or JSON for automation and AI agent consumption.

# Table mode (default)
indodax market ticker btc_idr

# JSON mode
indodax -o json market ticker btc_idr

When an error occurs in JSON mode, a structured error envelope is returned:

{
  "error": true,
  "message": "Invalid trading pair: xxx_idr",
  "error_type": "invalid_pair",
  "retryable": false
}

๐Ÿงช Paper Trading

Test strategies with virtual balances before risking real funds.

# Initialize with default balances (100M IDR, 1 BTC)
indodax paper init

# Place simulated orders
indodax paper buy --pair btc_idr --price 500000000 --amount 0.1
indodax paper sell --pair btc_idr --price 600000000 --amount 0.05

# Check status
indodax paper balance
indodax paper status

๐Ÿ”” Price Alerts

Set price alerts and get notified when conditions are met. Monitor in real-time via WebSocket.

# Price threshold alerts
indodax alert add -p btc_idr --above 150000000
indodax alert add -p btc_idr --below 50000000

# Percentage change alerts
indodax alert add -p btc_idr --percent-up 5
indodax alert add -p btc_idr --percent-down 10

# Real-time monitoring
indodax alert watch
indodax alert list

๐Ÿ” Security

Indodax uses HMAC-SHA512 signing. Credentials are resolved in priority order:

  1. CLI flags (--api-key, --api-secret)
  2. Environment variables (INDODAX_API_KEY, INDODAX_API_SECRET)
  3. Config file (~/.config/indodax/config.toml with 0600 permissions)