A suite of developer tools for integrating with the Gemini cryptocurrency exchange API. Includes an MCP server for AI assistant integrations, multi-language SDK samples, and Claude Code skills.
| Package | Description |
|---|---|
packages/mcp-server |
MCP server exposing Gemini API as tools for AI assistants |
samples/ |
REST and WebSocket examples in TypeScript, Python, and Go |
skills/ |
Claude Code skills (e.g., terminal candlestick charts) |
Multi-language examples (TypeScript, Python, Go) demonstrating public and authenticated API usage. See samples/README.md for the full guide.
No API key required:
# Get ticker data
python3 samples/python/get_ticker.py btcusd
go run samples/go/get_ticker.go btcusd
npx ts-node samples/typescript/src/getTicker.ts btcusd
# Stream real-time trades (WebSocket)
python3 samples/python/ws_trades.py btcusd
go run samples/go/ws_trades.go btcusdWith API credentials:
# Copy and fill in your credentials
cp samples/.env.example samples/.env
# Get account balances
python3 samples/python/balances.py
go run samples/go/balances.go
npx ts-node samples/typescript/src/balances.ts# TypeScript
cd samples/typescript && npm install
# Python
cd samples/python && pip install -r requirements.txt
# Go
cd samples/go && go mod downloadAll components read credentials from environment variables:
| Variable | Description |
|---|---|
GEMINI_BASE_URL |
API base URL (production or sandbox) |
GEMINI_API_KEY |
Your Gemini API key |
GEMINI_API_SECRET |
Your Gemini API secret |
For testing, use the sandbox environment:
GEMINI_BASE_URL=https://api.sandbox.gemini.com/v1
Get sandbox credentials at exchange.sandbox.gemini.com.
Private endpoints use HMAC-SHA384 signing:
- Build a JSON payload with the request path and a millisecond timestamp nonce
- Base64-encode the payload
- Sign it with your API secret using HMAC-SHA384
- Send via headers:
X-GEMINI-APIKEY,X-GEMINI-PAYLOAD,X-GEMINI-SIGNATURE
All samples and the MCP server handle this automatically.
Install all Claude Code skills using the skills CLI:
npx skills add gemini/developer-platform -a claude-code --all -ySee skills/README.md for installing individual skills or other agents.
The MCP server exposes the Gemini API as tools compatible with Claude and other MCP clients. It covers 40+ tools across six categories:
- Market — ticker, symbols, candles, price feeds, order books, trade history
- Orders — place/cancel orders, order status, trade volume
- Funds — balances, deposits, withdrawals, transfers, gas fee estimates
- Account — account info, sub-accounts, approved addresses
- Margin — margin account, preview orders, open positions, funding payments
- Staking — balances, rates, history, stake/unstake
cd packages/mcp-server
npm install
npm run buildConfigure your Claude client to use the server (example for Claude Desktop):
{
"mcpServers": {
"gemini": {
"command": "node",
"args": ["/path/to/developer-platform/packages/mcp-server/dist/index.js"],
"env": {
"GEMINI_API_KEY": "account-xxxxxxxxxxxxxx",
"GEMINI_API_SECRET": "xxxxxxxxxxxxxx"
}
}
}
}