All Collections
Bots (Signal, DCA, GRID)
Signal bot
Signal bot use cases: Signals from X channel (ex. Twitter)
Signal bot use cases: Signals from X channel (ex. Twitter)
Updated over a week ago

X ( ex. Twitter) often becomes a primary source of news, that can heavily impact the market volatility. It can be information from an exchange about adding or deleting trading pairs, from the project itself about their updates and plans, or even tweets from influencers like Elon Musk about Bitcoin or Doge. So we can teach our bot to trade based on these messages.

Let's assume you want to make AI scan tweets from some crypto project. If it finds certain keywords in their posts, it should generate a JSON message and send it to your Signal bot. Then, this bot can open or close the positions, add or reduce the position size or change the direction from Long to Short or vice versa.

Here is an example.

You can use automation services like IFTTT or Zapier to achieve the goal without writing your own scripts. Both these services provide an intuitive user interface to create an automated flow without writing a script. You can adjust the trigger and action conditions and send the JSON messages to your webhook.

Let's take a closer look at IFTTT.

Assume you want a service to scan tweets from Elon Musk, and if he mentions "Doge" or "Dogecoin" it should send a signal in a JSON message to your Signal bot to open a position with Doge coin or increase a position if we already have one open. If a tweet does not include specific words, the service will ignore such a tweet.

Historical fact. Back in 2021, when Elon Musk mentioned Doge in his tweet, the price of this coin started to incline:

Steps to create such signals.

1. Create a new rule (applet) in IFTTT

To do so, you need to log in and click on Create at the top right corner.

2. In “If This” area, click on “Add

3. In searchbar find “Twitter

4. Choose a trigger

Service will display several signal triggers. Choose "New tweet by a specific user". Pay attention that you may need a Pro subscription on the IFTTT service.

5. Adjust the trigger

In the “Twitter account” field, connect your X (Twitter) account, and in the “Username to watch” field, add the name of the X (Twitter) account whose tweets you want to scan for specific keywords. Then click “Create trigger”:

6. Click "Add" in the "Then That" field

7. Find and choose "Webhooks"

8. Choose “Make a web request

9. Adjust it to send webhook requests with POST method

JSON message should be taken from the previously created Signal bot to open/close Long/Short position. Also if needed, in this message you can adjust exchange, trading pair and action the bot should do. Then save this rule in IFTTT.

10. Click on "+" between If and Then

Now, we need to teach the IFTTT service to scan tweets, find certain words, and send signals to our bot if the word is found.

11. Choose “Filter code” and click on "+"

Paste this JavaScript code there:

let str=Twitter.newTweetByUser.Text; 
let searchTerms=[

let foundOne=0;
if(searchTerms.some(function(v){return str.indexOf(v)>=0;})){


(if necessary, change the words "Doge" or "Dogecoin" to any other words or add some more)

Click “Add filter” after you add the code. You should see something like this:

12. Save and activate your rule (applet)

Now when there will be a new tweet with the certain words IFTTT will automatically send JSON message to your Signal bot via webhook.

Please note!

  • Using this method allows to scan any X (Twitter) account.

  • In the JavaScript code, you can change only "Doge" and "Dogecoin" words to any words you like, the rest of the code must remain the same.

  • To proceed with the signal by IFTTT it might take up to 2 minutes to deliver the signal to your Signal bot, so be prepared that there might be some delays.

Did this answer your question?