Skip to content
Skip to content

Twitter/X Integration

Use X as a channel surface for your Studio bot to monitor market conversations, respond to mentions, and surface social trading signals — without building separate API infrastructure.

What is this?

The X integration connects your Studio bot to an X (Twitter) account using the X API v2. Your bot can listen to mentions of a configured account, respond to incoming tweets, and use the social signal stream as input to its analysis pipeline.

X integration is a channel binding — it extends where your bot operates, just like Telegram or Discord. It does not change how your bot thinks, trades, or accesses its knowledge base. The same AI configuration and risk settings apply regardless of which channel the command arrives from.

X is best suited for market sentiment monitoring and social trading signal workflows. It is not designed for high-frequency trade execution. If you need a robust execution channel, Telegram or Discord is a more reliable choice.


Prerequisites

Before connecting X:

  • You have a bot created in Studio
  • You have an X developer account and a project with an App created at developer.twitter.com
  • Your X App has Read and Write permissions enabled (read-only apps cannot post replies)
  • You have generated an Access Token and Access Token Secret for the X account your bot will act as
  • You understand X API v2 rate limits — free-tier developer accounts have strict monthly post and read limits

Current capabilities

CapabilityStatus
Mention monitoringAvailable — bot receives @mentions to the configured account
Reply generationAvailable — bot can respond to mentions using its AI pipeline
Market sentiment analysisAvailable — mention stream feeds into analysis tools
Proactive postingAvailable — bot can post tweets based on triggers
DM handlingNot available in current release
List monitoringNot available in current release
Thread contextLimited — single-level reply context only

Warning: X API rate limits are set by X's developer platform and vary by account tier. Free-tier developer accounts allow 1,500 tweet posts per month and 10,000 reads per month. Balchemy cannot exceed these limits on your behalf. Plan your bot's activity around your tier's allowances.


Step-by-step: connect X in Studio

  1. Open Studio and navigate to the bot you want to connect.
  2. Select the Platforms tab from the bot sidebar.
  3. Find the X card. It shows a Disconnected status badge by default.
  4. Click Configure to open the X settings sheet.
  5. Enter your X App credentials: API Key, API Secret, Access Token, and Access Token Secret. These come from the X Developer Portal under your app's Keys and Tokens section.
  6. Click Save Configuration.
  7. Toggle the switch on the X card to Connected.
  8. Verify the status badge shows Connected with a timestamp.
  9. Send a test @mention to the configured X account and confirm the bot replies within a few seconds.

Tip: The X account that your Access Token belongs to is the account your bot acts as. It reads mentions sent to that account and replies from it. Use a dedicated X account for your bot rather than your personal account.


Setup mindset: monitoring vs posting

X should be treated as a signal-in, signal-out channel rather than a command-execution surface. Here is how to think about the two sides:

Monitoring — your bot watches the mention stream of the connected X account. It reads what people are saying about your account, tokens you track, or market events. This input feeds into the same analysis pipeline that Telegram and Discord messages use.

Posting — your bot can compose and post replies or standalone tweets. These posts go out from the connected X account. Treat every post as a public communication; configure your bot's persona and response style carefully in the AI Configuration tab.

Keep the bot's X behavior narrow and intentional. A bot that posts in response to every mention on a busy account will exhaust its rate limit quickly and produce a chaotic experience for followers.


Use cases

Market sentiment monitoring. Point the bot at an X account that receives mentions from traders discussing specific tokens or chains. The bot's analysis tools can process the incoming mention stream and surface sentiment shifts, emerging narratives, or unusual activity.

Social trading signals. When a high-signal account posts about a trade or a market move, the bot can detect the pattern and generate an analysis summary that you review before taking action. This keeps a human in the loop while automating the detection step.

Automated FAQ replies. If your bot's X account receives common questions — token details, pool addresses, getting started — configure quick-reply templates in the AI Configuration tab to answer them without invoking the full AI pipeline.

Community engagement. For bots with a public social presence, X is a lightweight engagement surface. The bot can acknowledge mentions, share analysis snippets, and maintain a consistent voice without you monitoring the account manually.


Rate limit awareness

X API v2 rate limits apply at the application level, not the Balchemy platform level. Your bot shares these limits with any other tool using the same X App credentials.

OperationFree tier limit
Tweet posts1,500 per month
Tweet reads10,000 per month
Mention lookupCounted against read limit

If your bot exhausts its read or write limit, X API calls will return 429 errors and the bot will stop responding to X mentions until the monthly reset. The Platform card will show an Error status badge.

Manage rate limit exposure by:

  • Limiting which mentions trigger a full AI response (use keyword filters in your bot's AI Configuration)
  • Using quick-reply templates for common questions instead of AI-generated responses
  • Monitoring usage in the X Developer Portal dashboard

Tip: Upgrade to a Basic or Pro X developer tier if your use case requires higher volume. Balchemy works with any valid X API v2 credentials regardless of the tier you choose.


Common issues

The X card shows an Error badge after toggling on. Your X App credentials may be incorrect or the Access Token may have been revoked. Regenerate the Access Token and Access Token Secret in the X Developer Portal and re-enter them in the Configure sheet.

The bot is not replying to mentions. Check that your X App has Read and Write permissions. Read-only apps can monitor mentions but cannot post replies. Update the app permissions in the X Developer Portal and regenerate the Access Token after changing permissions — tokens issued under the old permission set do not inherit new permissions.

The bot was replying, then stopped. You have likely hit your monthly rate limit. Check the X Developer Portal for usage statistics. The limit resets on the first day of the next calendar month.

The bot is posting replies I did not expect. Review your bot's AI Configuration. The system prompt, persona settings, and response rules apply on X exactly as they do on Telegram and Discord. If the bot's replies feel off-brand or over-active, tighten the persona guidance and enable keyword filters to restrict which mention types trigger a response.


Connection lost. Retrying...