Skip to main content

Automate Bitget spot trading with GPT-4o-mini AI agent via Telegram

Workflow preview

Workflow preview
100%
Automate Bitget spot trading with GPT-4o-mini AI agent via Telegram preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 reasonin...

Best for

  • Crypto Trading automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.telegramtrigger, n8n-nodes-base.code, n8n-nodes-base.telegram, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.toolcalculator, @n8n/n8n-nodes-langchain.toolthink, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Don Jayamaha Jr.

Original n8n.io source

1.1 Workflow description

Title
Automate Bitget spot trading with GPT-4o-mini AI agent via Telegram
Workflow name
Automate Bitget spot trading with GPT-4o-mini AI agent via Telegram

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

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 2 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 3 - User Authentication (Replace Telegram ID)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 5 - Splits message is more than 4000 characters

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Calculator

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Block 13 - Think

Type / Role
@n8n/n8n-nodes-langchain.toolThink - toolThink
Config choices
Version 1.1

Block 14 - Bitget AI Trader Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 15 - Account and Wallet Agent tool

Type / Role
@n8n/n8n-nodes-langchain.agentTool - agentTool
Config choices
Version 2.2

Block 16 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 17 - Get Account Information HTTP Request

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 18 - Get Account Assets HTTP Request

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 19 - Get Deposit Address HTTP Request

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 20 - Simple Memory1

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 21 - Spot Order Trading Agent tool

Type / Role
@n8n/n8n-nodes-langchain.agentTool - agentTool
Config choices
Version 2.2

Block 22 - OpenAI Chat Model2

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 23 - Place Order HTTP Request

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 24 - Calculator1

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Showing the first 24 of 156 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automate Bitget spot trading with GPT-4o-mini AI agent via Telegram
Complexity advanced
Nodes 156
Categories Crypto Trading, AI Chatbot
Author Don Jayamaha Jr
Published 17 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9842/9842.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate Bitget spot trading with GPT-4o-mini AI agent via Telegram do?

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 reasonin...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Crypto Trading, AI Chatbot use case.