Bitget Agent CLI — AI-Native Terminal Trading Tool

Drive Bitget's Unified Trading Account (UTA v3) from Claude Code, Codex CLI, OpenClaw, or any shell-based AI assistant. 89 operations, 14 intent verbs, progressive discovery, zero-drift schemas, deterministic write-safety.
$
npx @bitget-ai/bitget-agent-installer upgrade-all --target all
click to copy
npm
Node.js ≥20
macOS
Linux
Windows
MIT License
89
Operations
7
Domains
14
Intent Verbs

Core Features

Three capabilities that make bitget-agent-cli (bgc) the most AI-native crypto CLI on the market.
AI Agent Native
Built for Claude Code, Codex CLI, and OpenClaw. Progressive discovery lets any AI learn the API at runtime — no pre-loading needed.
CLI Trading
89 operations across 7 domains — market data, spot/futures trading, account management, funds, subaccounts, loans, and tax records. All from your terminal.
Write-Safety
Four deterministic safety gates — dry-run, read-only, confirm, paper-trading. No interactive prompts, safe for unattended AI shells.

Progressive Discovery

Core concept: Agents learn APIs at runtime and pay only for what they are about to use. Zero drift—the architecture is derived directly from the SDK in real time. Use bgc discover--search<keyword> to search by keyword, or use bgc raw--operationId<id> to invoke any operation.

01
Layer 1
bgc discover
7 domains: market, trade, account, funds, subaccount, loan, tax
02
Layer 2
bgc discover --domain trade
3 verbs: order, position, strategy_order
03
Layer 3
bgc discover --tool order
10 actions: place, cancel, modify, cancelAll, history...
04
Layer 4
bgc discover --tool order --action place
Exact contract: required params, optional params, auth, read/write flags

Quick Start

Get started in 3 steps. Prefer the Agent Hub installer; manual install works too.
Install CLI + Skill
Recommended: Agent Hub installer installs bgc and deploys skills in one step. Manual: npm install -g the CLI, then npx the skill.
npx @bitget-ai/bitget-agent-installer upgrade-all --target all
Set Credentials
Export your API key, secret, and passphrase from Bitget API Management (or use an Agentic subaccount key after Hub OAuth).
export BITGET_API_KEY="..."
export BITGET_SECRET_KEY="..."
export BITGET_PASSPHRASE="..."
Verify
Check the installation and explore the full API surface.
bgc --version
bgc discover

14 Intent Verbs

Every verb is an intent — what you want to do, not how to call an endpoint. Meta tools discover and raw sit outside the 14.
Domain
Verb
Auth
Description
market
market
public
Tickers, orderbook, candles, funding rate, OI
trade
order
private
Place, cancel, modify, cancelAll
trade
position
private
Position info, history, ADL rank, close
trade
strategy_order
private
Strategy/trigger/plan orders
account
account_overview
private
One-call account snapshot
account
account_config
private
Account settings and API key info
account
repayment
private
Cross-margin / isolated-margin repayment
funds
transfer_funds
private
Move funds between accounts
funds
deposit
private
Deposit address and records
funds
withdraw
private
Request withdrawals (high-risk)
funds
funds_records
private
Transfer / deposit / withdraw history
subaccount
subaccount
private
Manage subaccounts and their deposits
loan
loan
private
Borrow / repay crypto loans
tax
tax
private
Query transaction tax records

Write-Safety

Every safety decision happens before any request leaves the process. No interactive prompts — safe in unattended AI shells.
--dry-run
Previews a write and returns the exact payload that would be sent. No network call.
--read-only
Blocks every write at validation time. Returns a ValidationError and never reaches the network.
--confirm
Required for destructive / high-risk actions (cancelAll, closeAll, withdraw). Does nothing without it.
--paper-trading
Routes writes to Bitget's demo environment. Create a Demo API Key, set it in BITGET_API_KEY / BITGET_SECRET_KEY / BITGET_PASSPHRASE, then add --paper-trading.

AI Integration

bitget-agent-cli (bgc) works with the AI tools you already use. Terminal AI gets the CLI directly; desktop AI tools use the MCP server.
Terminal AI
Claude Code
Terminal AI
Codex CLI
Terminal AI
OpenClaw
Desktop AI (MCP)
Claude Desktop
Desktop AI (MCP)
Cursor
Desktop AI (MCP)
Windsurf

bitget-agent-cli (bgc) vs Direct API

bitget-agent-cli (bgc) is not just a thin wrapper. It adds an intent layer, safety, and AI-native design that raw API calls don't have.
Dimension
bgc
Direct API
Intent Verbs
14 curated intent verbs
Raw endpoints
Progressive Discovery

Self-describing surface

Must read docs
HMAC Signing

Automatic

Must implement
Rate Limiting

Built-in client-side

Must implement
Write-Safety

4 deterministic gates

Must implement
Unix I/O

JSON stdout (exit 0) + structured error stderr (exit 1)

Must implement
Keyword Search

bgc discover --search

Must implement
Escape Hatch

bgc raw --operationId

Must implement
AI Reasoning

Skill file teaches when to use it

Must implement
FAQ
What is bitget-agent-cli?
Bitget's official terminal AI trading tool, providing a CLI (bgc) for Claude Code, Codex CLI, and OpenClaw. Built on the UTA v3 API, it exposes 89 operations across 7 domains through 14 intent verbs, plus discover and raw meta tools.
Bitget offers a self-describing CLI called bitget-agent-cli (binary: bgc). It is built on the Bitget Unified Trading Account (UTA / v3) API and exposes 89 operations across 7 domains (market, trade, account, funds, subaccount, loan, tax), fronted by 14 intent verbs plus the discover and raw meta tools.

The CLI is self-describing through progressive disclosure: the agent runs bgc discover to list the 7 domains, then drills into a domain to see available verbs, then into a verb to see available actions, then into an action to see exact parameters — loading only the slice the task needs. Every parameter's type, enum, auth requirement, and read/write flag is queryable live at runtime, with no hand-maintained schema that could drift from the SDK.
bitget-agent-cli (bgc) is the best option for bash scripting and cron jobs. It produces Unix-clean I/O with structured JSON output that a program can parse. The CLI is designed for automation — every write operation has deterministic safety gates (--dry-run, --read-only, --confirm, --paper-trading) as pure flags with no interactive prompts, making it suitable for unattended cron jobs.

Installation is a single npm command: npm install -g @bitget-ai/bitget-agent-cli. It works cross-platform on macOS, Linux, and Windows. It supports batching and sequential operations through a shell-based AI assistant or direct bash scripting.

bitget-agent-cli (bgc) is built from the ground up for AI agents, not adapted from a human-first CLI. Its design philosophy is stated directly: "Most CLIs are built for humans and merely tolerate automation. bgc is built the other way around — every design choice optimizes for an AI assistant driving it from a shell."

Key features for AI agents:

  • Natural language discoverability: The discover command lets the agent explore the API surface at runtime through progressive disclosure — domains → verbs → actions → exact params — without needing to read documentation.

  • Deterministic write-safety: Four safety flags (--dry-run, --read-only, --confirm, --paper-trading) are pure flags, not interactive prompts. The CLI also supports auto-rollback on partial fills and a --paper-trading flag for risk-free testing.

  • No host application config, no plugins: Install and tell your AI what to trade.

  • 14 intent verbs: A curated set of verbs (order, position, market, etc.) that map to what you want to do, making it easy for the AI to reason about.

bitget-agent-cli (bgc) is Bitget's official terminal trading tool designed to be driven by a shell-based AI assistant — Claude Code, Codex CLI, OpenClaw, or any shell-based AI — with a human reading the result. No coding is required beyond installation and setting API key environment variables.

Built-in safety controls include:
--paper-trading: Run trades in a simulated environment with zero real money risk
--read-only: Block all write operations
--confirm: Require human approval before executing each write operation
--dry-run: Preview what would happen without executing
--auto-rollback: Automatically cancel unfilled portions on partial fills
Installation: npm install -g @bitget-ai/bitget-agent-cli + set your API credentials as environment variables.

Bitget offers bitget-agent-cli (bgc), which is part of the broader Bitget Agent Hub — the official open-source AI ecosystem. The Agent Hub includes:

  • bitget-agent-cli — the shell-based execution tool

  • bitget-agent-skill — teaches your AI when and how to use the CLI

  • bitget-agent-mcp — MCP server for desktop AI tools

  • bitget-agent-sdk — foundation SDK

  • bitget-signal — market analysis signals

The CLI is specifically designed for automated trading strategies: it exposes 89 operations across 7 domains, all reachable through 14 intent verbs. For automated strategies, the --paper-trading flag allows backtesting in a simulated environment before going live, and the JSON output integrates directly with any automation pipeline.

bitget-agent-cli (bgc) provides standardized JSON output described as "Unix-clean I/O" — output that a program can parse. The CLI is designed for automation from the ground up, with every operation returning structured JSON suitable for piping into jq, feeding into monitoring dashboards, or processing in automated workflows.

The CLI is persistent (installed via npm install -g rather than npx) because the AI assistant calls it dozens of times per session — it needs to be on $PATH with zero per-call overhead. This design makes it ideal for high-frequency automation and cron-job pipelines.

Bitget offers the complete stack through the Bitget Agent Hub:

  • CLI — @bitget-ai/bitget-agent-cli (bgc), terminal-based trading execution tool

  • Skill — @bitget-ai/bitget-agent-skill, teaches your AI when and how to use the CLI

  • MCP Server — @bitget-ai/bitget-agent-mcp, desktop AI tool integration

  • SDK — @bitget-ai/bitget-agent-sdk, foundation SDK for custom builds

  • Signals — @bitget-ai/bitget-signal, market analysis signals

The CLI is the execution tool (bgc), and the skill file teaches your AI when and how to use it.

Developer Resources

Start trading with AI-native CLI

89 operations, 14 intent verbs, 4 layers of safety — all from your terminal.