Automate Bitget Spot Trading with GPT-4o-mini AI Agent via Telegram
Go to WorkflowDescription
A professional-grade AI trading orchestration system for Bitget Spot Market automation via Telegram.
This agent integrates Bitget REST APIs, authenticated order management, and real-time reasoning with GPT-4o-mini, allowing direct Telegram-based execution of spot and trigger orders β all within your self-hosted n8n environment.
π₯ Watch Tutorial:
π§© Required Workflows
You must install and activate all of the following workflows for the system to function correctly:
| β
Workflow Name | π Function Description |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Bitget AI Trader Agent | Core orchestrator. Handles user Telegram commands, routes to correct sub-agents, and formats all responses. |
| Account and Wallet Agent Tool | Retrieves Bitget account info, balances, and deposit addresses using authenticated endpoints /api/v2/spot/account/*. |
| Spot Order Trading Agent Tool | Places, cancels, and queries spot orders (/trade/place-order, /cancel-order, /orderInfo, /unfilled-orders). |
| Trigger Order Agent Tool | Manages conditional βplanβ (trigger) orders β place, modify, cancel, and list them (/trade/place-plan-order, /modify-plan-order, etc.). |
| Webhook HTTP Request Nodes | Securely handle REST calls for each sub-agent via n8n webhooks. All endpoints authenticated using the Bitget Sign system. |
βοΈ Installation Instructions
Step 1: Import Workflows
Open your n8n Editor UI
Import the Bitget AI Trader Agent (Finished).json file
Ensure all sub-agents are visible in the canvas and linked properly
Step 2: Set Credentials
Configure your Bitget API Key, Secret, and Passphrase inside your n8n credentials
Add your OpenAI API Key (recommended: GPT-4o-mini)
Set Telegram bot token (from @BotFather)
Step 3: Configure Webhook Endpoints
Make sure all downstream webhooks (e.g., Get-Account-Information, Place-Order, Cancel-Order, etc.) are accessible via HTTPS.
Each must use Basic Auth credentials named:
Bitget Authentication for Webhooks
Step 4: Authorize Telegram Access
Replace the placeholder Telegram ID in:
if ($input.first().json.message.from.id !== <<Replace>>) { ... }
with your Telegram user ID.
This ensures only you can issue trading commands.
Step 5: Test & Deploy
Trigger the Telegram bot command (e.g. /balance or /order) to verify:
Authenticated data fetch
Correct REST routing
Safe GPT-based reasoning
Telegram delivery with formatted markdown
π¬ Telegram Output Examples
β
BTCUSDT limit buy placed @ 23222.5, size 0.01 (orderId: 123456)
β Rejected: price tick invalid for BTCUSDT. Provide price with correct step.
π° Balance Summary:
β’ USDT: 1250.34 (Available)
β’ BTC: 0.023 (In Trade)
π§© System Overview
[Telegram Trigger]
β [User Authentication]
β [Bitget AI Trader Agent]
β [Account/Wallet Tool] + [Spot Order Tool] + [Trigger Order Tool]
β [Webhook Execution Layer]
β [GPT-4o-mini Reasoning + Message Split Logic]
β [Telegram Output]
π Safety & Compliance
All API calls use Bitget Sign authentication
Orders cannot be spoofed or simulated
No keys or signatures ever exposed in chat
Strict input validation and confirmation per action
π§Ύ Licensing & Attribution
Β© 2025 Treasurium Capital Limited Company
All architecture, prompt structures, and Telegram formatting are IP-protected.
No unauthorized resale, repackaging, or rebranding permitted.
π For support: LinkedIn β Don Jayamaha