Gemini API Documentation
Gemini Developer Platform
Build trading applications, market data tools, and enterprise crypto solutions on a secure, regulated exchange trusted by millions of users and institutions worldwide.
Get Started
Jump-start your integration with step-by-step guides for the most common use cases.
Get your API credentials
Sign up at exchange.gemini.com, navigate to Settings → API, and create a key with the Trading scope enabled.
export GEMINI_API_KEY="account-xxxxxxxxxxxxxxxx"
export GEMINI_API_SECRET="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Clone the samples repo and install dependencies
Clone the Gemini API samples repository, navigate to the Python directory, and install the required packages (requests and python-dotenv).
git clone https://github.com/gemini/developer-platform.git
cd developer-platform/samples/python
pip install -r requirements.txtConfigure your environment
Create a .env file with your API credentials and the sandbox base URL. The sample uses python-dotenv to load these automatically.
cat > .env << 'EOF'
GEMINI_API_KEY=account-xxxxxxxxxxxxxxxx
GEMINI_API_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GEMINI_BASE_URL=https://api.sandbox.gemini.com/v1
EOFRun the place order example
Run the example to place a sandbox limit order. The script handles HMAC-SHA384 signing automatically.
python place_order.pyYou're done!
Your order is live in the sandbox. Check the response for order_id and use it to query status or cancel.
# Order confirmed ✓
Order placed: {'order_id': '7651834', 'symbol': 'btcusd', 'side': 'buy', ...}Build with Gemini APIs
Pick the protocol that fits your use case.
Access Gemini products
APIs for every type of user — retail, business, and institutional.
Developer Resources
Essential guides and references for every stage of your integration.
Start building in the sandbox
Access a full-featured test environment with automated market simulation, pre-funded accounts, and support for both REST and WebSocket — no real money needed.