Prerequisites
- Cursor editor installed
- Gigabrain API key from your Profile
- Basic knowledge of Python or JavaScript
Quick Start
1
Get your API key
- Sign in to Gigabrain
- Go to Profile → API Keys
- Generate a new API key (format:
gb_sk_...)
2
Set up your project
Create a new directory for your trading bot:Create a
.env file to store your API key:3
Configure Cursor rules
Create
.cursor/rules.md in your project root to teach Cursor about Gigabrain API patterns:Example: Funding Rate Monitor Bot
Build a bot that monitors funding rates and alerts when they reach extreme levels.- Python
- JavaScript
funding_monitor.py
Using Cursor Composer
Cursor’s Composer feature is perfect for building complex trading bots with Gigabrain. Here’s how to use it effectively:Example Prompt for Composer
.cursor/rules.md to generate code that follows Gigabrain API best practices.
Common Integration Patterns
Pattern 1: Structured Data Queries
Always specify exact fields for consistent responses:Pattern 2: Error Handling
Implement retry logic for transient errors:Pattern 3: Rate Limit Monitoring
Track your API usage:Next Steps
Brain API Overview
Explore all available data types and query patterns
REST API Reference
Complete API documentation with authentication and endpoints
SuperAgent Setup
Launch an always-on SuperAgent on Gigabrain
Integrations
Connect Hyperliquid for trade execution