LogoLogo
  • Getting Started
    • Overview
    • How-to Guides & Tutorials
      • Video Tutorials
        • Building an Autonomous AI Agent for Twitter/X
        • Bulding Your Own Whale Tracking Agent
        • Building a Degen Agent that Apes in low-caps on Solana
      • How to Build Your First AI Agent
      • How to Choose the Right AI Model for Your Agent
      • How to Add and Configure Plugins
      • How to Set Up and Trigger Workflows
      • How to Launch and Tokenize Your AI Agent
      • How to Edit Your Published Agent
      • How to View Agent Wallet Activity
      • How to get a free Twitter/X API key
      • Official vs Unofficial X plugins. What's the difference?
      • How to Create a Telegram Bot & Get your Chat ID
      • How to Build a Copy-Trading AI Agent
      • Loomlay Troubleshooting Guide
  • LOOMLAY AI AGENTS
    • Introduction
    • Deploying agent live
    • Models
    • Plugins
    • Workflows
    • Workflow Triggers
      • Custom
      • Run on Repeat
      • New Message: Telegram
    • Agent Wallet
  • Terminal
    • Overview & Installation
  • Integration with workflows
  • Configuration & styling
  • Advanced features
  • Tokens
    • LAY Token
    • Agent Tokens
  • Pricing
    • Agent Developer
Powered by GitBook
On this page
  • Introduction
  • Watch the Video Tutorial
  • Step-by-Step Instructions
  1. Getting Started
  2. How-to Guides & Tutorials

How to Build a Copy-Trading AI Agent

PreviousHow to Create a Telegram Bot & Get your Chat IDNextLoomlay Troubleshooting Guide

Last updated 5 months ago

Introduction

Discover how to create a powerful copy-trading AI agent on Loomlay that automates buying tokens based on social media signals. This step-by-step guide will walk you through building an agent that follows trading signals from the aixbt_agent Twitter account, checks token availability, and executes trades on Base.

Watch the Video Tutorial

Step-by-Step Instructions

Step 1: Fetch Latest Tweets

Start by configuring your agent to fetch the latest tweets from aixbt_agent and identify mentioned tickers. Use the Twitter plugin to:

  • Retrieve tweets from the specified account.

  • Extract tickers mentioned in the tweets.

  • Log these tickers for later use.

Step 2: Analyze Tickers with Dexscreener

Use the Dexscreener plugin to search for the tickers and determine which blockchain they’re on:

  • Query each ticker.

  • Identify the blockchain associated with each token.

  • Log the tokens and their respective chains.

Step 3: Filter for Base Chain Tokens

Focus on tokens available on Base:

  • Filter the logged tickers to retain only those on Base.

  • Retrieve the contract addresses for these tokens.

  • Log the contract addresses for future operations.

Step 4: Check Wallet Balances

Configure your agent to:

  • Check your wallet for balances of the Base chain tokens.

  • Identify tokens that are not currently held in your wallet.

Step 5: Check ETH Balance

Ensure you have enough ETH for the transaction:

  • Verify your wallet’s ETH balance.

  • If the balance exceeds 0.001 ETH, proceed to the next step.

Step 6: Swap ETH for the Found Token

Execute the trade:

  • Swap 0.001 ETH for the token that you don’t currently hold.

  • Log the transaction hash as confirmation.

Step 7: Finish and Return Transaction Details

Complete the workflow by:

  • Returning the transaction hash.

  • Logging the process to ensure everything executed as intended.