Bitget APIBitget API
UTAClassic
Legacy Doc
  • Overview
  • API Documentation
  • WebSocket
  • Agent Hub
  • SDK
  • Changelog
Copied to clipboard
Overview
Agent HubWhat you can doHow to connectProduct structureFAQLegacy system
Agent Hub

Agent Hub

Skip the exchange. Connect Agenthub, say one sentence, and an agent trades tokenized US stocks and crypto in your Bitget account from Claude, Cursor, Codex, or the Personal Agents Grok bot, Muse, and Dot.

In Claude, Cursor, Codex, or the Personal Agents Grok bot, Muse, and Dot, connect https://agent.bitget.com/mcp and sign in to Bitget in the browser when the page asks. Read what it can do, then how to connect.

About the old version

The second half of this article is the old install path. That product will be maintained less and less. It is only here so people who already installed it can look up the old commands.

Landing page · API Docs · Telegram

Contents

Code
Bitget Agenthub ├── What you can do ├── How to connect ├── Product structure │ ├── Agentic account │ ├── Trading MCP │ └── Data MCP ├── Safety ├── FAQ └── Links

1. Current version (use this one)

What you can do

Who it's for

Agenthub is for people who want an agent to trade crypto and tokenized US stocks: watch the market · read the tape · place trades · manage the account · write a strategy · do research.

The hard part of trading with AI is not the strategy. It is jumping back and forth: you ask the AI, then place the order yourself, then come back to the chat. Agenthub puts both steps in one place. You say one sentence. It does the rest. Market data does not need a login. Trading, account checks, and tokenized US stocks do. Sign in once in the browser.

You sayWhat happens
"BTC price" · "4h candles" · "funding rate"Live market data. No login.
"Market-buy 0.1 BTC" · "Open a BTC long" · "Buy a little rAAPL"Trade crypto, or tokenized US stocks such as Apple, Tesla, and NVIDIA. Login required.
"Check my balance" · "Show transfers and deposits"Account balances and funding records. Login required.
"When does Apple pay a dividend, and is the market closed today?" · "What is rAAPL worth?"Dividends, market holidays, and valuation for the stock. Login required.

How to connect

Paste the text in the box below to your AI. It connects Agenthub and opens a browser so you can sign in to Bitget. You need that login to place orders and view the account. If you only want market prices this time and do not want to sign in, add this line: market data only, do not sign in yet.

Fastest way to start

Send this to your AI — it will install Agenthub:

Code
Read https://www.bitget.com/support/articles/12560603894122 and finish Bitget Agentic account authorization.

Before you switch

  1. If an old Bitget stdio MCP or CLI is still on this computer, remove it and use Agenthub. The authorization flow above is enough to start using Agenthub.
  2. If you already authorized an Agentic account (formerly called an Agent sub-account), close the positions and open orders first, then remove the old setup. An Agentic account authorized through the old MCP does not work with the new MCP. When you authorize, create a new account.

Product structure

Agenthub has three parts. The Agentic account is how you sign in and how you see the money in that account. Trading is for crypto and for tokenized US stocks such as Apple, Tesla, and NVIDIA. Data is for market prices, and for dividends, holidays, and valuation on those tokenized stocks.

(1) Agentic account

An Agentic account is a separate trading account. Its funds are not the same as your main account. After you sign in in the browser, you can trade in this account. You do not type an API Key.

To disconnect it: open the sub-account page and choose Disconnect Agent. Clear unfilled orders first. You can move the money back yourself.

What you wantWhere
Disconnect the agentSub-account page
Not connected, connect againAgentic account page

New accounts do not have an API Key. If an older account still has one, you cannot delete that Key by itself on the website. Clear the orders, move the assets out, then delete the Agentic sub-account yourself. Its old name was Agent sub-account. The AI will not delete the account for you.

Before every trade, you see what is about to run. It is sent only after you agree.

(2) Trading MCP

22 endpoints. All of them require a login. You confirm before an order is sent. Tokenized US stocks such as Apple, Tesla, and NVIDIA use this same order flow.

AreaEndpointsAuthWhat it coversFor example
Place orders3LoginMarket or limit orders
Submit several orders at once
Strategy orders
Spot
Futures
Tokenized US stocks such as Apple, Tesla, and NVIDIA
"Market-buy 0.1 BTC"
"Open a BTC long"
"Place these three limit orders together"
"Buy a little of Apple's tokenized stock"
Change orders3LoginChange the price or size of a normal order
Change a strategy order
Change several orders at once
"Move this order to 65000"
"Raise the take-profit on the strategy order"
"Reprice these orders together"
Cancel and close6LoginCancel one order
Cancel a strategy order
Cancel several orders
Cancel every open order
Cancel everything after a countdown
Close all positions
"Cancel this order"
"Cancel every BTC order"
"Close the long in one step"
Look up10LoginOpen positions
Position history
Position risk rank
Open orders
Open strategy orders
Order history
One order's details
Fills
How much more you can open
"What's my position?"
"What did I close yesterday?"
"Did this order fill?"
"How much more can I open?"

Not here: buying stocks inside a US brokerage account, CFDs, tax, collateralized lending, or institutional lending.

(3) Data MCP

AreaEndpointsAuthWhat it coversFor example
Market data35No loginCurrent and historical candles
Latest prices
Order book
Recent trades
Current and historical funding rates
Open interest and its cap
Position tiers
Long/short ratio
Taker buy and sell volume
Liquidation history
Spot flow and large-account net inflow
Index components
Discount rate
Risk reserve
Proof of reserves
Cash dividends
Splits and reverse splits
"BTC price"
"4h candles"
"What's the funding rate?"
"Show the book"
"How much just got liquidated?"
Tokenized US stocks14LoginStock profile
Market open or closed
Holiday calendar
Halts and resumptions
Book and trades
Dividends and splits
Valuation
Earnings estimates
Company overview
Share-count changes
Major holders
Management holdings
Insider trades
"Is Apple's market closed today?"
"When does NVIDIA pay a dividend?"
"What is Tesla's tokenized stock worth?"
"Who are the major holders?"
Crypto research40No loginTradable markets and token profiles
Spot candles
Spot prices
Spot book
Spot trades
Spot taker flow
Spot large trades
Mark price
Futures candles
Funding rate
Open interest
Long/short ratio
Liquidations
Futures large trades
On-chain flows
Buy and sell signals
Exchange inflows and outflows
Active addresses
Stablecoin changes
Unlock schedule
Corporate holdings
ETF holdings
Miner holdings
Country holdings
Technical indicators
Hyperliquid long/short
Hyperliquid PnL
Hyperliquid positions
Hyperliquid whale trades
"Which pairs does BTC trade on?"
"Is on-chain money flowing in or out?"
"When is the next unlock?"
"Are Hyperliquid whales long or short?"
US stock research21No loginCompany profile and live quote
Historical candles
Management
Earnings calendar
Balance sheet
Income statement
Cash flow
Financial ratios
Valuation
Dividends
Insider trades
Major holders
Institutional holdings
Analyst price targets
Earnings estimates
Revenue estimates
"What's Apple trading at?"
"Show NVIDIA's latest earnings"
"When is Tesla's next dividend?"
"Are institutions adding or cutting?"
ETFs3No loginProfile
Holdings
Performance
"What does this ETF hold?"
"How has it done lately?"
News1No loginSearch financial news by keyword"Any NVIDIA news today?"
Sentiment2No loginCrypto Fear and Greed
Broader market sentiment
"Is the market fearful or greedy?"

Safety

Sign-in happens in the browser. Do not hand an API Key to the AI, and do not put one in a config file. Every trade waits for your confirmation.

Change your email, phone, or two-factor settings on the Bitget website yourself. Withdrawals, and moving money from the main account into the Agentic account, are also done on the website.


FAQ

Q: Do I still create an API Key?

A: No.

Q: Do I need to sign in just to see prices?

A: No. Trading, account actions, and Reality tokenized-stock details require a login.

Q: What about the old tools later in this article?

A: Those are the old install, and they will be maintained less and less. Agenthub uses only https://agent.bitget.com/mcp.

Q: How do I revoke access?

A: Disconnect the agent on the sub-account page. Clear unfilled orders first.

Q: The login page will not open.

A: Check that you can open bitget.com. If you cannot, turn on a proxy, then ask the agent to authorize again.

Q: How do I delete an API Key on an old account?

A: Clear the orders, move the assets out, then delete that Agentic sub-account yourself. You cannot delete only the Key on the website.


Links

ResourceAddress
Agenthub landing pagehttps://www.bitget.com/activity-hub/agent-hub
Cloud MCPhttps://agent.bitget.com/mcp
Sub-account pagehttps://www.bitget.com/account/sub-account
Agentic account pagehttps://www.bitget.com/account/center/agent-subaccount-mcp
Telegramhttps://telegram.me/+o1tYqQ_lXxllYjgy

2. Legacy system (being phased out)

Legacy

This is the old version. It will be maintained less and less. Use Agenthub above. If you already installed the old tools, the commands are here.

Code
Legacy system (being phased out) ├── What the old version could do ├── Old install paths ├── Old Agentic (local MCP, API Key on this device) ├── Old CLI · bgc ├── Old Signal ├── Old SDK ├── Old safety notes └── Old FAQ

Runs as a local process on your device · API Keys are signed on this device with HMAC-SHA256 and never pass through a third-party server · MIT licensed

GitHub · API docs · Get an API Key (legacy only) · Telegram

What the old version could do

Who it's for

Agenthub is for people who want AI to trade crypto and tokenized US stocks: watch the market · read the tape · place trades · manage the account · write a strategy · do research.

The hard part of trading with AI is not the strategy. It is jumping back and forth: you ask the AI, then place the order yourself, then come back to the chat. Agenthub puts both steps in one place. You say one sentence. It does the rest.

You sayWhat happens
"Market-buy 0.1 BTC" · "Open a BTC long at 10x"Spot or futures order
"Check my balance" · "Move 500 USDT to the futures account"Account lookup and a transfer
"BTC price" · "4h candles" · "funding rate"Live market data (no API Key)
"Is sentiment too greedy or too fearful?" · "What matters in the news today?"Market analysis (no account)

Risk

AI can be wrong. You are responsible for orders. Practice on the demo account first.

Old install paths

Pick the path for the AI tool you use.

Fastest start

Send this to Claude Code or Cursor. It installs the legacy Skill and local MCP, then opens the browser for authorization.

Code
Do only the legacy first-time install. Node.js 20+ is required. Do not run upgrade-all. Do not ask me to create or paste an API Key. Do not build the authorization URL yourself. 1. Run npx @bitget-ai/bitget-agent-skill --target all --skill agentic. The --skill agentic flag is required. Version must be 3.3.0 or newer. 2. Run npm i -g @bitget-ai/bitget-agent-mcp. Do not set BITGET_API_*. 3. Stop in this chat once the MCP is registered. Ask me to open a new chat, then call authorize_start to open the browser. After I log in and approve, confirm with get_auth_status. If bitget.com will not open, check the local proxy first, then authorize again.

Overview

The same install works for every tool listed on that path. The CLI command, for example, is the same on Claude Code, Codex, and OpenClaw. After it runs, it detects the tools you already have and deploys into them.

I use…PathOne-step install
Claude Desktop · Cursor · Windsurf · ChatGPT Desktop · Codex (OAuth in one step, no Key to type)Old MCP servernpx -y @bitget-ai/bitget-agent-mcp
Claude Code · Codex CLI · OpenClawCLI · bgcnpx @bitget-ai/bitget-agent-installer upgrade-all --target all
Market analysis only, no tradingSignalnpx @bitget-ai/bitget-signal --target all
Not sure / I want everythingFull setnpx @bitget-ai/bitget-agent-installer upgrade-all --target all

Note

The MCP server command in the table only starts the process. It does not write your AI tool's config. You, or the AI, still have to edit that file. The steps are under Old Agentic below. The row that used to point at https://agent.bitget.com/mcp now belongs in part 1. Do not install that address here as a read-only data service.

Requirement: Node.js 20 or newer. Check with node -v.

Old Agentic (local MCP, API Key on this device)

An Agentic account is a separate trading account connected with OAuth. Its funds stay apart from the main account. After authorization, MCP and CLI tools can trade in that account. You do not type a Key. This setup stores the credentials on your device.

Paste this to your AI. It will walk you through browser OAuth and install the tools.

Code
Do only the legacy first-time install. Node.js 20+ is required. Do not run upgrade-all. Do not ask me to create or paste an API Key. Do not build the authorization URL yourself. 1. Run npx @bitget-ai/bitget-agent-skill --target all --skill agentic. The --skill agentic flag is required. Version must be 3.3.0 or newer. 2. Run npm i -g @bitget-ai/bitget-agent-mcp. Do not set BITGET_API_*. 3. Stop in this chat once the MCP is registered. Ask me to open a new chat, then call authorize_start to open the browser. After I log in and approve, confirm with get_auth_status. If bitget.com will not open, check the local proxy first, then authorize again.

When to use

Use this if your AI tool has a window: Claude Desktop, Cursor, Windsurf, ChatGPT Desktop, or Codex. Each sentence you type becomes an action on your Bitget account.

The steps are the same for every tool. The command stays npx -y @bitget-ai/bitget-agent-mcp. Only the config file location changes.

About this authorization

Before you trade, move funds from the main account to the Agentic account on the website. The agent cannot transfer or withdraw for you. Once the credentials are saved, the trading tools work without restarting the agent. If the link drops or the credentials expire, run OAuth again.

Manual setup

Step 1 — Open your AI tool's MCP config.

Step 2 — Add the block below. Do not put an API Key in it. The first time you use a trading tool, the AI opens the browser for OAuth. Bitget issues the credentials and they are saved locally.

Code
{ "mcpServers": { "bitget": { "command": "npx", "args": ["-y", "@bitget-ai/bitget-agent-mcp"] } } }

Step 3 — Quit the AI tool completely and open it again.

Step 4 — Ask What is the BTC price? A quote means the basic setup works. Then ask something that needs trading permission, such as your account balance. The AI opens the browser for OAuth.

Modes

SituationExtra argsWhat it does
Practice on the demo account first"--paper-trading"Uses a Demo Key. Real assets stay put.
Look only, do not trade"--read-only"Blocks orders and transfers.
Prices only, no account"--modules", "market"No API Key.

Cursor users

Cursor holds about 40 MCP tools in total, and Bitget uses about 14 by default. If they do not all load, turn other MCP servers off, or start with --modules market so only market data loads.

Proxy

If you need a VPN or proxy, add an env block to the MCP config. This is only for the network. It is not part of account authorization. Use your own proxy address.

Code
"env": { "HTTPS_PROXY": "your proxy, for example http://127.0.0.1:port", "NODE_USE_ENV_PROXY": "1" }

Why NODE_USE_ENV_PROXY

NODE_USE_ENV_PROXY=1 makes Node.js itself use the proxy. Without it, some requests skip the proxy.

What the AI can do after install

ModuleLoaded by defaultCoversNeeds authorization
marketYesPrices, candles, funding, order book, open interestNo
tradeYesPlace, cancel, and edit orders; positions; strategy ordersYes
accountYesBalances, transfers, deposits, withdrawals, sub-accountsYes
strategyOn requestTrigger orders, take-profit and stop-loss, planned ordersYes
cryptoloansOn requestBorrow, repay, collateralized loansYes
taxOn requestTax record lookupYes

Try these

Code
What is the BTC price? Check my USDT balance and list my futures positions. On the demo account, open a BTC long, 10x, 0.01 BTC. Check the BTC price, then place a limit buy 2% below it.

Old CLI · bgc

When to use

Use this with a terminal AI (Claude Code, Codex CLI, OpenClaw), or when you want to type Bitget commands yourself.

Code
Install the Bitget Agent Hub terminal tools. Node.js 20+ is required: npx @bitget-ai/bitget-agent-installer upgrade-all --target all When it finishes, verify with `bgc --version` and `bgc discover`, and show me the output.
TerminalCode
npx @bitget-ai/bitget-agent-installer upgrade-all --target all

That installs the bgc CLI, the trading Skill, and the market-analysis Skill, and deploys them to Claude Code, Codex, and OpenClaw.

API Key

bgc still needs an API Key typed in by you. Create one on the API management page. Enable Read + Trade, and save the API Key, Secret Key, and Passphrase. A Demo Key plus --paper-trading is the safer way to practice.

TerminalCode
export BITGET_API_KEY="your API Key" export BITGET_SECRET_KEY="your Secret Key" export BITGET_PASSPHRASE="your Passphrase"

Tip

Put those three lines in ~/.zshrc or ~/.bashrc. Public prices do not need a Key. Balances and orders do.

Check the install

TerminalCode
bgc --version bgc discover bgc market --action tickers --category SPOT --symbol BTCUSDT
VerbWhat it doesExample
marketPrices, candles, funding (public)bgc market --action tickers --symbol BTCUSDT
orderPlace, cancel, edit, and look up ordersbgc order --action place --side buy --qty 0.1
positionPositions, close, leveragebgc position --action info --category linear
strategy_orderTrigger orders, take-profit and stop-lossbgc strategy_order --action open
account_overviewSnapshot of assets, positions, and feesbgc account_overview --coin USDT
transfer_fundsMove funds between accountsbgc transfer_funds --fromType spot --amount 100
depositDeposit address and recordsbgc deposit --action address --coin USDT
withdrawWithdraw (high risk, needs --confirm)bgc withdraw --coin USDT --amount 100 --confirm
loanBorrow and repaybgc loan --action borrow --coin USDT
subaccountSub-accountsbgc subaccount --action list
taxTax recordsbgc tax --action history --year 2024
discoverList available actionsbgc discover --domain trade

Safety flags

FlagEffect
--dry-runBuild the request and do not send it
--read-onlyBlock every write
--paper-tradingUse the demo environment
--confirmSecond confirmation for high-risk actions such as withdrawals

Legacy Skill (used with the CLI, Key typed in by you)

A Skill is a note installed into the AI tool. It tells the AI when to call bgc, how to build the command, and when to ask you before a write. upgrade-all already includes it. To install only the Skill:

TerminalCode
npx @bitget-ai/bitget-agent-skill --target all
--targetInstalls into
claudeClaude Code
codexCodex CLI
openclawOpenClaw
allAll of the above

Note

Without --skill agentic, this command installs the manual-Key instructions. Agenthub's instructions are in How to connect, above.

Old Signal

No Bitget account and no API Key. Install puts five Skill files on this device and registers a public remote MCP data service (https://datahub.noxiaohao.com/mcp) as the source.

You can ask…Source
"How does a Fed hike hit BTC?"macro-analyst — rates, yield curve, cross-asset correlation
"Are whales sending coins to exchanges?"market-intel — on-chain flow, ETF net inflow, DeFi TVL
"How is sentiment?"sentiment-analyst — sentiment index, funding, long/short positioning
"Is BTC's RSI overbought?"technical-analysis — indicators calculated from candles
"What mattered in crypto news today?"news-briefing — news aggregation
TerminalCode
npx @bitget-ai/bitget-signal --target all

Python dependencies

technical-analysis needs pandas and numpy. If you want indicators, run pip install pandas numpy first. Restart the AI tool after install.

Old SDK

For developers embedding this in their own project: a custom MCP, a quant strategy, or automated trading.

TerminalCode
npm install @bitget-ai/bitget-agent-sdk
Code
import { loadConfig, buildTools, BitgetRestClient, safeInvoke } from "@bitget-ai/bitget-agent-sdk"; const config = loadConfig({ modules: "all", readOnly: true }); const client = new BitgetRestClient(config); const tools = buildTools(config); const ctx = { config, client }; const market = tools.find((t) => t.name === "market")!; const res = await safeInvoke(market, { action: "tickers", category: "SPOT", symbol: "BTCUSDT" }, ctx); if (res.ok) console.log(res.data); else console.error(res.error);
ParameterDefaultMeaning
surface"intent""intent" is the short verb set; "full" exposes every action
modules"account,trade,market"Comma-separated module names, or "all"
readOnlyfalseDrop every write tool
paperTradingfalseRoute to the Bitget demo environment
baseUrlhttps://api.bitget.comOverride with BITGET_API_BASE_URL

More: agent-sdk

Requires: Node.js 20 or newer · ESM only · no runtime dependencies · TypeScript types included

Old safety notes

Credentials stay on this device. API Keys are read only from environment variables. Requests are signed locally with HMAC-SHA256 and sent straight to api.bitget.com. Agentic credentials follow the same rule: after OAuth, the MCP or SDK stores them locally. The AI never asks you to type or paste them.

ControlWhat it does
Demo mode--paper-trading sends requests to the Bitget demo environment
Read-only--read-only removes every write tool at startup
Preview--dry-run builds the full request and does not send it
High-risk confirmationWithdrawals and cancel-all need an explicit --confirm

Start on the demo account. When you create an API Key, enable only what you need. Leave withdrawals off if you do not need them.

Old FAQ

Q: My AI tool is not on the list. Can I use it?

A: Any client that speaks MCP can connect. A terminal AI that can run commands can use bgc.

Q: Do prices need an API Key?

A: No. A Key is only for balances, orders, and transfers.

Q: Does the AI see my API Key?

A: No. The Key is read from a local environment variable and is not uploaded.

Q: What is the difference between a Key I create and an Agentic account?

A: A Key you create on the website shares the main-account balance. The old Agentic account enters a separate pool of funds through OAuth, and the MCP or SDK stores the credentials on this device.

Q: Bitget tools did not all load in Cursor.

A: Turn other MCP servers off, or add --modules market to the start args.

Q: Will the AI ask before it places an order?

A: Yes. The Skill asks and waits before a write. Withdrawals also need --confirm.

Q: Is there a fee?

A: Agenthub itself is MIT-licensed and free. Trading fees follow your Bitget account tier.

Q: Where do I report a problem?

A: GitHub Issues. Email security issues to [email protected]. Do not post them in public.

ResourceAddress
Agent Hubhttps://github.com/Bitget-AI/agent_hub
MCP serverhttps://github.com/Bitget-AI/agent-mcp
CLI (bgc)https://github.com/Bitget-AI/agent-cli
Skillhttps://github.com/Bitget-AI/agent-skill
Signalhttps://github.com/Bitget-AI/bitget-signal
SDKhttps://github.com/Bitget-AI/agent-sdk
Bitget API docshttps://www.bitget.com/api-doc/common/intro
API Key managementhttps://www.bitget.com/en/api-management
Telegramhttps://telegram.me/+o1tYqQ_lXxllYjgy

Risk disclaimer

Crypto and tokenized US stock trading can lose money, and AI can be wrong. Check everything yourself and accept the results. This tool is not investment advice.

On this page
  • Contents
  • 1. Current version (use this one)
    • What you can do
    • How to connect
    • Product structure
    • Safety
    • FAQ
    • Links
  • 2. Legacy system (being phased out)
    • What the old version could do
    • Old install paths
    • Old Agentic (local MCP, API Key on this device)
    • Old CLI · bgc
    • Old Signal
    • Old SDK
    • Old safety notes
    • Old FAQ
JSON
JSON
TypeScript