Skip to content

Repository files navigation

Gemini Developer Platform

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.

What's Included

PackageDescription
packages/mcp-serverMCP 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)

Samples

Multi-language examples (TypeScript, Python, Go) demonstrating public and authenticated API usage. See samples/README.md for the full guide.

Quick Start

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 btcusd

With 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

Install Dependencies

# TypeScriptcd samples/typescript && npm install
# Pythoncd samples/python && pip install -r requirements.txt
# Gocd samples/go && go mod download

Configuration

All components read credentials from environment variables:

VariableDescription
GEMINI_BASE_URLAPI base URL (production or sandbox)
GEMINI_API_KEYYour Gemini API key
GEMINI_API_SECRETYour 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.

Authentication

Private endpoints use HMAC-SHA384 signing:

  1. Build a JSON payload with the request path and a millisecond timestamp nonce
  2. Base64-encode the payload
  3. Sign it with your API secret using HMAC-SHA384
  4. Send via headers: X-GEMINI-APIKEY, X-GEMINI-PAYLOAD, X-GEMINI-SIGNATURE

All samples and the MCP server handle this automatically.

Installing Skills

Install all Claude Code skills using the skills CLI:

npx skills add gemini/developer-platform -a claude-code --all -y

See skills/README.md for installing individual skills or other agents.

MCP Server

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

Setup

cd packages/mcp-server
npm install
npm run build

Configure 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"
}
}
}
}

API Documentation

License

Apache 2.0

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages