# 🤝🏻 Cooperation-Script:💵How to Quickly Create an Automated Script for Trading with GMGN Bot

***Note: This tutorial requires some programming skills and\*\*\*\*&#x20;**<mark style="color:red;">**knowledge of network security to avoid Telegram account theft.**</mark>*

You can use the Telegram API to automatically send token contract addresses to the GMGN Sniper Bot, enabling **immediate buying and selling, as well as creating limit buy/sell orders.**

Suitable scenarios include:

1. Monitoring smart money signals for automatic buying and limit sell orders
2. Monitoring on-chain trading signals and CTO signals for automatic buying and limit sell orders

## **Specific Steps:**

## **1.** 🔔 **Monitor GMGN Trading Signals and Smart Money**

#### **1)** 🔔 **Subscribe to GMGN Signal**

* Join the signal group at <https://t.me/gmgnsignals>
* Receive specialty signal messages (10+ signals available, more are in development):

  * CTO Signal
  * Update DEX Screener Social Infos
  * PUMP Update DEX Screener Social Infos
  * PUMP FDV Surge
  * Solana FDV Surge
  * Smart Money FOMO
  * KOL FOMO
  * DEV Burnt Alert
  * All Time High Price
  * Heavy Bought
  * Sniper New

  <figure><img src="https://3168316658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcwvUtvEIyqrWZx7sPliY%2Fuploads%2FgnTdHQyLBQC5e8jH8Jfm%2Fimage.png?alt=media&#x26;token=06044d37-5691-4c04-a634-dcc3f5763e6d" alt=""><figcaption></figcaption></figure>

#### **2)** 💰**Follow Smart Money**

* Visit the [GMGN.AI](http://gmgn.ai) Smart Money leaderboard to find high win-rate smart money that matches your trading style at <https://gmgn.ai/discover/?chain=sol>

<figure><img src="https://3168316658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcwvUtvEIyqrWZx7sPliY%2Fuploads%2FjLOA4WLmXlgP3iqU11JO%2Fimage.png?alt=media&#x26;token=e74bb662-f169-4361-a689-ce3c2bb4042b" alt=""><figcaption></figcaption></figure>

## **2.** 🙋🏼‍♀️ **Apply for Telegram App API**

* Log in at <https://my.telegram.org/auth>
* Create a Telegram app, fill out the form, and obtain the app’s **api\_id** and **api\_hash** (Note: Do not disclose these to any third parties to prevent Telegram account theft). For detailed instructions, refer to the official Telegram documentation at <https://core.telegram.org/api/obtaining_api_id>

## **3.** 🤖 **Set Up the Automation Script**

* You need to write an automation script or search for open-source projects on [github.com](http://github.com) with similar functionality (Note: Assess code security to avoid Telegram account theft).
* Automation script code logic:
  * Use the **api\_id** and **api\_hash** obtained above to receive messages from the GMGN signal group or get trading signals from other channels/groups, or monitor smart money on-chain transactions (e.g., subscribe to a paid plan from a Solana RPC provider like Alchemy to use WebSocket for monitoring specified wallet transactions).
  * Based on the received signal messages, create your own token filtering conditions and trading strategies (extract token contract address).
  * Send trading commands to [GMGN Sniper Bot](https://t.me/GMGN_sol03_bot):
    * Method 1 (Simpler, faster): Send the token contract address. You need to enable the automatic buy and sell features of the GMGN Sniper Bot first (pre-set stop-loss and take-profit orders; when buying, it will automatically place a limit sell order). — This feature is in development and will be available soon.
    * Method 2 (More flexible parameters): Send trading commands, such as immediate buy/sell or creating limit buy/sell orders. The trading commands are as follows:

```
Buy Immediately
/buy ukHH6c7mMyiWCf1b9pnWe25TSpkDDt3H5pQZgZ74J82 0.5
Indicates buy BOME token with 0.5 SOL immediately

Sell Immediately
/sell ukHH6c7mMyiWCf1b9pnWe25TSpkDDt3H5pQZgZ74J82 50
/sell ukHH6c7mMyiWCf1b9pnWe25TSpkDDt3H5pQZgZ74J82 50%
Indicates sell 50% of BOME token holdings immediately

Create Limit Buy Order at Trigger Price
/create limitbuy ukHH6c7mMyiWCf1b9pnWe25TSpkDDt3H5pQZgZ74J82 0.5@0.1 -exp 3600
Indicates create limit buy order for BOME token, buy 0.5 SOL, trigger price $0.1, expires in 1h (3600 seconds)

Create Limit Sell Order at Trigger Price
/create limitsell ukHH6c7mMyiWCf1b9pnWe25TSpkDDt3H5pQZgZ74J82 50@0.1 -exp 3600
Indicates create limit sell order for BOME token, sell 50% holdings, trigger price $0.1, expires in 1h (3600 seconds)

Tip: If the '-exp' parameter is omitted, the limit orders default expiration time is 3 days.
```

<figure><img src="https://3168316658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcwvUtvEIyqrWZx7sPliY%2Fuploads%2FXGY7nj49j7KAVa7A5pYu%2Fimage.png?alt=media&#x26;token=2303f31e-bc65-4de5-8ef9-5ef279856a40" alt=""><figcaption></figcaption></figure>

## **🎉 Automation Script Setup Complete**

It is recommended to start with a small amount to test your trading strategy.

If you are interested in automated trading strategies, feel free to join the GMGN official group for discussions at <https://t.me/gmgnai>
