<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by p05h on Medium]]></title>
        <description><![CDATA[Stories by p05h on Medium]]></description>
        <link>https://medium.com/@p05h?source=rss-d2a741448dc4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5qvBoGcddVWLZ8_jfmm6sA.jpeg</url>
            <title>Stories by p05h on Medium</title>
            <link>https://medium.com/@p05h?source=rss-d2a741448dc4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 02:33:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@p05h/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Best Copy Trading Bot Strategy: How to Programmatically Detect Profitable Copy Trading…]]></title>
            <link>https://medium.com/@p05h/best-copy-trading-bot-strategy-how-to-programmatically-detect-profitable-copy-trading-9f4b312a0287?source=rss-d2a741448dc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f4b312a0287</guid>
            <category><![CDATA[solana-network]]></category>
            <category><![CDATA[trading-bot]]></category>
            <category><![CDATA[copy-trading-bot]]></category>
            <category><![CDATA[copy-trading]]></category>
            <category><![CDATA[memecoins]]></category>
            <dc:creator><![CDATA[p05h]]></dc:creator>
            <pubDate>Sun, 16 Feb 2025 00:07:38 GMT</pubDate>
            <atom:updated>2025-02-17T12:57:46.709Z</atom:updated>
            <content:encoded><![CDATA[<h3>Best Copy Trading Bot Strategy: How to Programmatically Detect Profitable Copy Trading Opportunities on Solana</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8zFW5P2tfIxa4SNHleJNhg.jpeg" /><figcaption>Best Copy Trading Bot Strategy</figcaption></figure><p>If you’re struggling with proprietary trading or have tried to work with or build trading bots that are going nowhere, then copy trading might be the most straight forward and profitable approach for you.</p><p>For newcomers and experienced traders alike, if one manages to discover some consistently profitable traders to follow then you can see great returns very quickly.</p><p>In this article I’ll focus on Solana copy trading. Being the platform on which meme coins flourish, you’ll have a much greater chance of catching some crazy gains.</p><blockquote>Read on and I’ll share with you a bespoke Python bot I made to help you discover profitable traders to follow and give you a step-by-step guide on how to get it set up and running</blockquote><h3>How to find profitable Solana based trader wallets to copy</h3><p>A common method that’s recommended online for finding copy traders for meme coins and other Solana based tokens is to head to a site like <a href="https://dexscreener.com/"><strong><em>DexScreener</em></strong></a>, look for current fairly high market capped, high volume and high liquidity tokens and then scan over the <strong><em>Top Traders</em></strong> tab for these tokens while looking for wallet addresses that jump out as having made fantastic profits.</p><p>In the image below I have highlighted (between the turquoise lines) where we can see such an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MFqcpxhxb6X_h_NFcu0S1g.jpeg" /><figcaption>The old way of finding profitable wallets to copy trade</figcaption></figure><p>In this case, that trader bought just $68 worth of a token called DEEP, then made $18,400 over 12 sells in a few hours. 🤤 Lucky them!</p><p>This can be a great way of stumbling upon profitable traders, but the problem is that they are often just flukes. Someone might have been lucky enough to snipe a random shitcoin right after launch on PumpFun and then rode it all the way up to riches.</p><p>They could equally have been losing for a year up to this point and might well go on to lose that 18 grand by tomorrow.</p><blockquote>That would <strong>NOT</strong> be a wallet worth copy trading.</blockquote><p>This is <em>quite</em> a good filtering process and there will indeed be plenty of consistently profitable traders to be found with this method, but you’ve then got to go on and manually analyse the trading history of each of these wallets on <a href="https://solscan.io/"><strong><em>Solscan</em></strong></a> and try to make some subjective decisions on whether or not they are a trader worthy of copying. It’s like looking for a needle in a medium sized haystack</p><blockquote>What we want to start with is a tiny haystack!</blockquote><h4><strong><em>How do I make smaller haystacks then?</em></strong></h4><p>A couple of months ago I figured out this neat method to identify consistently profitable traders to follow. I was poking around on the contract address that a popular Telegram trading bot uses to receive all the trading fees from their users and suddenly realised that from this stream of data I would be able to infer which traders on their platform were doing well.</p><p>I then got to work on building some bots to help me analyse all of this data and that’s what I’m going to share with you now…</p><h3>My step-by-step guide to find profitable traders to copy</h3><h4>Step 1</h4><p>Firstly, you’re going to need to connect to the Telegram based bot that I use for this method. You’ll need this for actually executing the copy trades as well as for harvesting the good traders from their platform.</p><figure><a href="https://t.me/menelaus_trojanbot?start=r-signup_trojan"><img alt="" src="https://cdn-images-1.medium.com/max/570/1*S8pWQEsE_v5qIfQ6BrbDTg.png" /></a></figure><figure><a href="https://t.me/menelaus_trojanbot?start=r-signup_trojan"><img alt="" src="https://cdn-images-1.medium.com/max/355/1*-U3UyMnB9GLY_Tu_W4-ONg.png" /></a><figcaption>The official link for Trojan bot</figcaption></figure><p>If you don’t already know about it, Trojan is a Telegram based bot that allows for super-fast trade execution with Solana tokens. Please use the button above to quickly add it to your Telegram app (download Telegram from <a href="https://telegram.org/"><strong><em>HERE</em></strong></a> or from your app store first if you don’t already have it installed).</p><p>Trojan is completely free and easy to set up, but you have to be careful…. If you were to just search for Trojan within Telegram there a load of fake versions listed and they will definitely steal your SOL when you connect your wallet.</p><p>That button above includes the official link for their bot which I will repeat here: (<a href="https://t.me/menelaus_trojanbot?start=r-signup_trojan"><strong><em>https://t.me/menelaus_trojanbot?start=r-signup_trojan</em></strong></a>). This official link will also get you 10% off trading fees for life…</p><h4>Step 2</h4><p>Next, in order for the bot to function, you will need to get set up with what is called a <strong><em>remote procedure call</em></strong> (RPC) endpoint. This is also free and it is what allows us to connect directly to the Solana blockchain with our bot.</p><figure><a href="https://account.getblock.io/sign-in?ref=ZTgxMmMzOGEtZmQ0Mi01MzViLWJkNjQtZjgxM2Q0N2IxYTAx"><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*X1UdZObVU2ymxrmga4XH0g.jpeg" /></a></figure><p>Clicking the banner above will take you to a provider that gives you a tonne of requests for free. More than enough for you to get going with the bot I’ll share with you.</p><p>Once signed up, you’ll need to create a Solana endpoint and your unique url for it will be copyable as in the screenshot below.</p><figure><a href="https://account.getblock.io/sign-in?ref=ZTgxMmMzOGEtZmQ0Mi01MzViLWJkNjQtZjgxM2Q0N2IxYTAx"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ko7ACEeLWFQqGxz2CYlaw.png" /></a></figure><h4>Step 3</h4><p>Now that you have these two key elements set up, we can move on to actually running the bot which harvests the wallets of profitable traders.</p><p><strong><em>Python Requirement</em></strong></p><p>The bot is built in Python. You will probably already have Python installed on your computer.</p><p>To check, go to your terminal app / command prompt and type the following and hit Enter:</p><pre>python --version</pre><p>If it returns anything above Python 3.0 you’re good to go.</p><p>If you don’t have Python on your machine, then go ahead and download and install Python 3.9+ from <a href="https://python.org/">python.org</a></p><ul><li>During installation, make sure you check ‘<strong><em>Add Python to PATH</em></strong>’.</li><li>Verify your installation and versioning by opening your terminal app / command prompt and typing the following again to confirm you have it:</li></ul><pre>python --version</pre><p><strong><em>Create a new directory</em></strong></p><p>Still in your terminal app / command prompt, paste in the commands below and hit Enter:</p><pre>mkdir copy-trading-bot<br>cd copy-trading-bot</pre><p><strong><em>Create a new Python virtual environment</em></strong></p><p>You will now be in your bot’s directory and you will be able to create a Python virtual environment for it. It’s good practice to silo your different Python projects into their own virtual environments. This helps you to avoid clashes between different code libraries from project to project and ensures your code will always run correctly when launched from its own environment.</p><p>Paste and run the following:</p><pre># Windows<br>python -m venv venv<br>.\venv\Scripts\activate<br><br># Mac/Linux<br>python -m venv venv<br>source venv/bin/activate</pre><p><strong><em>Setting up your development environment</em></strong></p><ul><li>Install a free code editor like VSCode: <a href="http://code.visualstudio.com/">code.visualstudio.com</a>. I personally use <a href="https://www.spyder-ide.org/">Spyder</a> as it’s what I first used when I learned Python and am most familiar with.</li><li>These code editors or integrated development environments (IDEs) are where developers actually spend time working on their code. If you’re new to this, don’t worry, it’s really not complicated at all. You’ll just need to edit the code slightly to add your RPC endpoint that you generated earlier.</li></ul><p>Once you have your IDE installed create a new file and paste in the following code:</p><p><strong><em>The bot code</em></strong></p><pre>import asyncio<br>import aiohttp<br>import json<br>import csv<br>from datetime import datetime<br>import os<br><br>class FeeMonitor:<br>    def __init__(self, config=None):<br>        self.config = {<br>            &#39;solana_rpc&#39;: &quot;&quot;,<br>            &#39;fee_collector&#39;: &quot;9yMwSPk9mrXSN7yDHUuZurAh1sjbJsfpUqjZ7SvVtdco&quot;,<br>            &#39;scan_interval&#39;: 1,         <br>            &#39;min_usd_threshold&#39;: 5,   <br>            &#39;sol_price&#39;: 0,            <br>        }<br>        if config:<br>            self.config.update(config)<br>        <br>        # Headers for RPC calls<br>        self.headers = {<br>            &quot;Content-Type&quot;: &quot;application/json&quot;,<br>            &quot;User-Agent&quot;: &quot;Mozilla/5.0&quot;<br>        }<br>        <br>        # Ensure CSV file exists<br>        self.initialize_csv()<br><br>    def initialize_csv(self):<br>        &quot;&quot;&quot;Create CSV file if it doesn&#39;t exist&quot;&quot;&quot;<br>        if not os.path.exists(&#39;copy_trader_targets.csv&#39;):<br>            with open(&#39;copy_trader_targets.csv&#39;, &#39;w&#39;, newline=&#39;&#39;) as f:<br>                writer = csv.writer(f)<br>                writer.writerow([&#39;timestamp&#39;, &#39;source_address&#39;, &#39;amount_sol&#39;, &#39;amount_usd&#39;])<br><br>    async def get_sol_price(self):<br>        &quot;&quot;&quot;Get current SOL price from CoinGecko&quot;&quot;&quot;<br>        try:<br>            async with aiohttp.ClientSession() as session:<br>                url = &quot;https://api.coingecko.com/api/v3/simple/price&quot;<br>                params = {<br>                    &quot;ids&quot;: &quot;solana&quot;,<br>                    &quot;vs_currencies&quot;: &quot;usd&quot;<br>                }<br>                async with session.get(url, params=params) as response:<br>                    if response.status == 200:<br>                        data = await response.json()<br>                        self.config[&#39;sol_price&#39;] = data[&#39;solana&#39;][&#39;usd&#39;]<br>                        print(f&quot;Updated SOL price: ${self.config[&#39;sol_price&#39;]:.2f}&quot;)<br>        except Exception as e:<br>            print(f&quot;Error updating SOL price: {str(e)}&quot;)<br><br>    def save_target(self, source_address, amount_sol):<br>        &quot;&quot;&quot;Save potential copy trading target to CSV&quot;&quot;&quot;<br>        try:<br>            current_time = datetime.now().strftime(&#39;%Y-%m-%d %H:%M:%S&#39;)<br>            amount_usd = amount_sol * self.config[&#39;sol_price&#39;]<br>            <br>            with open(&#39;copy_trader_targets.csv&#39;, &#39;a&#39;, newline=&#39;&#39;) as f:<br>                writer = csv.writer(f)<br>                writer.writerow([current_time, source_address, f&quot;{amount_sol:.4f}&quot;, f&quot;{amount_usd:.2f}&quot;])<br>            <br>            print(f&quot;💰 New target saved: {source_address} sent {amount_sol:.4f} SOL (${amount_usd:.2f}) to Trojan in fees&quot;)<br>        except Exception as e:<br>            print(f&quot;Error saving target: {str(e)}&quot;)<br><br>    async def get_recent_transfers(self):<br>        &quot;&quot;&quot;Get recent transfers to the fee collector address&quot;&quot;&quot;<br>        try:<br>            payload = {<br>                &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>                &quot;id&quot;: 1,<br>                &quot;method&quot;: &quot;getSignaturesForAddress&quot;,<br>                &quot;params&quot;: [<br>                    self.config[&#39;fee_collector&#39;],<br>                    {&quot;limit&quot;: 5}<br>                ]<br>            }<br>            <br>            async with aiohttp.ClientSession() as session:<br>                async with session.post(self.config[&#39;solana_rpc&#39;], <br>                                     headers=self.headers, <br>                                     json=payload) as response:<br>                    if response.status == 200:<br>                        data = await response.json()<br>                        if &#39;result&#39; in data:<br>                            return data[&#39;result&#39;]<br>        except Exception as e:<br>            print(f&quot;Error getting recent transfers: {str(e)}&quot;)<br>        return []<br><br>    async def process_transaction(self, signature):<br>        &quot;&quot;&quot;Process a transaction to find transfer amount and source&quot;&quot;&quot;<br>        try:<br>            payload = {<br>                &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>                &quot;id&quot;: 1,<br>                &quot;method&quot;: &quot;getTransaction&quot;,<br>                &quot;params&quot;: [<br>                    signature,<br>                    {<br>                        &quot;encoding&quot;: &quot;jsonParsed&quot;,<br>                        &quot;maxSupportedTransactionVersion&quot;: 0<br>                    }<br>                ]<br>            }<br>            <br>            async with aiohttp.ClientSession() as session:<br>                async with session.post(self.config[&#39;solana_rpc&#39;], <br>                                     headers=self.headers, <br>                                     json=payload) as response:<br>                    if response.status == 200:<br>                        data = await response.json()<br>                        if &#39;result&#39; in data and data[&#39;result&#39;]:<br>                            return self.extract_transfer_info(data[&#39;result&#39;])<br>        except Exception as e:<br>            print(f&quot;Error processing transaction: {str(e)}&quot;)<br>        return None<br><br>    def extract_transfer_info(self, tx_data):<br>        &quot;&quot;&quot;Extract transfer amount and source address from transaction data&quot;&quot;&quot;<br>        try:<br>            pre_balances = tx_data[&#39;meta&#39;][&#39;preBalances&#39;]<br>            post_balances = tx_data[&#39;meta&#39;][&#39;postBalances&#39;]<br>            account_keys = tx_data[&#39;transaction&#39;][&#39;message&#39;][&#39;accountKeys&#39;]<br>            <br>            # Find fee collector index<br>            fee_collector_idx = None<br>            for idx, account in enumerate(account_keys):<br>                if account[&#39;pubkey&#39;] == self.config[&#39;fee_collector&#39;]:<br>                    fee_collector_idx = idx<br>                    break<br>            <br>            if fee_collector_idx is not None:<br>                # Calculate balance change in SOL<br>                balance_change = (post_balances[fee_collector_idx] - pre_balances[fee_collector_idx]) / 1e9<br>                <br>                if balance_change &gt; 0:<br>                    # Find source address (usually the fee payer)<br>                    source_address = account_keys[0][&#39;pubkey&#39;]<br>                    return {<br>                        &#39;source&#39;: source_address,<br>                        &#39;amount&#39;: balance_change<br>                    }<br>            <br>            return None<br>        except Exception as e:<br>            print(f&quot;Error extracting transfer info: {str(e)}&quot;)<br>            return None<br><br>    async def monitor_fees(self):<br>        &quot;&quot;&quot;Monitor for new fee transfers above threshold&quot;&quot;&quot;<br>        last_signature = None<br>        print(&quot;\n✨ Starting fee monitoring...&quot;)<br>        <br>        while True:<br>            try:<br>                # Update SOL price every minute<br>                if not self.config[&#39;sol_price&#39;] or datetime.now().second == 0:<br>                    await self.get_sol_price()<br>                <br>                signatures = await self.get_recent_transfers()<br>                <br>                if signatures:<br>                    newest_signature = signatures[0][&#39;signature&#39;]<br>                    <br>                    if newest_signature != last_signature:<br>                        for sig_info in signatures:<br>                            signature = sig_info[&#39;signature&#39;]<br>                            if signature == last_signature:<br>                                break<br>                            <br>                            transfer_info = await self.process_transaction(signature)<br>                            if transfer_info:<br>                                amount_sol = transfer_info[&#39;amount&#39;]<br>                                amount_usd = amount_sol * self.config[&#39;sol_price&#39;]<br>                                <br>                                if amount_usd &gt;= self.config[&#39;min_usd_threshold&#39;]:<br>                                    self.save_target(transfer_info[&#39;source&#39;], amount_sol)<br>                    <br>                    last_signature = newest_signature<br>            <br>            except Exception as e:<br>                print(f&quot;Error in fee monitoring: {str(e)}&quot;)<br>            <br>            await asyncio.sleep(self.config[&#39;scan_interval&#39;])<br><br>    async def run(self):<br>        &quot;&quot;&quot;Run the monitoring loop&quot;&quot;&quot;<br>        print(f&quot;\nStarting p05h Copy Trading Fee Monitor&quot;)<br>        print(f&quot;Minimum threshold: ${self.config[&#39;min_usd_threshold&#39;]}&quot;)<br>        print(f&quot;Scanning every {self.config[&#39;scan_interval&#39;]}s&quot;)<br>        <br>        try:<br>            await self.monitor_fees()<br>        except KeyboardInterrupt:<br>            print(&quot;\n👋 Shutting down...&quot;)<br>        except Exception as e:<br>            print(f&quot;Fatal error: {e}&quot;)<br><br><br>if __name__ == &quot;__main__&quot;:<br>    config = {<br>        &#39;solana_rpc&#39;: &quot;YOUR_RPC_ENPOINT&quot;,  # Replace YOUR_RPC_ENPOINT with your actual RPC url between the quotes<br>        &#39;min_usd_threshold&#39;: 5,  # Monitor fee transfers worth $x or more<br>        &#39;scan_interval&#39;: 1,  # Check for new transfers every second<br>    }<br>    <br>    monitor = FeeMonitor(config)<br>    asyncio.run(monitor.run())</pre><p>Now you’ll want to edit the settings of the bot in your IDE. In the dictionary section at the bottom called ‘<strong><em>config</em></strong>’ you will paste your RPC endpoint url between the quotes. You can also edit the values for ‘<strong><em>min_usd_threshold’</em></strong> and ‘<strong><em>scan_interval’</em></strong>. Leave these as is for now.</p><p>With these default settings, the bot will scan for traders who have just paid fees to Trojan valued anything over $5. That’s equating to a trader who just made a trade worth over $500 (Trojan take a 1% fee on all trades or 0.9% if it’s from a referred account like I listed in the Trojan referral link earlier).</p><p>If you want to scan for larger whale trades, then by all means do so and edit that ‘<strong><em>min_usd_threshold’</em></strong> to a higher value. The results from the bot will come through less frequently, of course.</p><p>Leaving it at this lower $5 setting for now will at least prove to you that the bot is working as the results will pour in faster.</p><p><strong><em>Saving your bot</em></strong></p><p>Now that you have the full bot code pasted in and edited, go ahead and save it as a file called ‘<strong><em>fee-monitor.py</em></strong>’ in the same directory we created earlier called ‘<strong><em>copy-trading-bot</em></strong>’ (it should be visible in the root directory of your machine).</p><p><strong><em>Installing the requirements</em></strong></p><p>You need to make sure there are a few imports set up for your bot to run. In your terminal app / command prompt please run the following line:</p><pre>pip install aiohttp asyncio</pre><p><strong><em>Launching the bot</em></strong></p><p>Now you can start the bot by running the following in your terminal app / command prompt:</p><pre>python fee_monitor.py</pre><p>The bot will launch and create a copy_trader_targets.csv file in your bot directory containing:</p><ul><li>Timestamp of fee payment</li><li>Source wallet address</li><li>Amount in SOL</li><li>Amount in USD</li></ul><p>All the qualifying wallets it finds will be logged and appended to that CSV.</p><p>You will also see the output of the bot in your console like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HqC3XruX9J5swI6JBEPQzg.png" /><figcaption>p05h copy trading fee monitoring bot in progress</figcaption></figure><p>To stop the bot you can just send the command <strong><em>‘ctrl+c</em></strong>’ .</p><p>And to restart it again (perhaps after changing your fee threshold):</p><pre>python fee_monitor.py</pre><h3>Figuring out which harvested wallets are worth copying</h3><p>Now that you have your bot harvesting wallets, you can check them in <a href="https://solscan.io/"><strong><em>Solscan</em></strong></a> manually to see if they belong to traders who have large balances, are trading frequently, are consistently profitable, etc.</p><p>Look for wallets that have a moderate to high SOL balance, have traded a decent amount in the last 24hrs, but not too much or they’ll likely be high-frequency bots that don’t work well with copy trading. And you’ll need to check some of the tokens they’ve traded to see if they are actually winning trades.</p><blockquote>By the way, if you want to avoid this final tedious manual process altogether and fully automate it, then I have a far more advanced version of the bot which does all of this for you.</blockquote><blockquote>I’m happy to email it to you for free if you follow the instructions I’ve made at the bottom of this article. It’s a very powerful version of this bot as it actually calculates all the traders’ win rates allowing you to gather a continuously growing stable of fresh and profitable traders to copy! 🤑</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*fWtOae5p6NPMcOQadEXp9Q.png" /><figcaption>For the more advanced version of script (see instructions at bottom of article)</figcaption></figure><h3>Getting ready to copy trade some target wallets</h3><p>Now that you have some target wallets you want to copy, you can go to your Trojan bot in Telegram and get it set up for copy trading.</p><p>If you haven’t already funded your Trojan wallet, go ahead and add some SOL.</p><p>By the way, all the instructions for how to use Trojan can be found <a href="https://docs.trojan.app/"><strong><em>HERE</em></strong></a> if you need a crash course.</p><p>Click ‘<strong><em>Copy Trade</em></strong>’ from the ‘<strong><em>/start</em></strong>’ menu of Trojan bot as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bYzj0l_54ksJLG4WsJWPzQ.png" /></figure><p>Then click on ‘<strong><em>New</em></strong>’:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XBJCpEWhi-nCSlZxp9B_ZQ.png" /></figure><p>Now you’ll be able to set up your copy trading profile for the wallet you want to target. Clicking ‘<strong><em>Target Wallet</em></strong>’ enables you to paste in the target wallet. ‘<strong><em>Buy Percentage’</em></strong> works like so:</p><blockquote>Enter the percentage of the target’s buy amount to copy trade with. E.g. with 50%, if the target buys with 1 SOL, you will buy with 0.5 SOL. If you want to buy with a fixed sol amount instead, enter a number. E.g. 0.1 SOL will buy with 0.1 SOL regardless of the target’s buy amount.</blockquote><p>If you’re starting out with copy trading I’d recommend you stick with a smallish fixed amount so as not to expose yourself to too much risk. Some of these good traders will be working with large position sizes (you’ll have a clearer picture of this from my advanced version of the bot anyway) and you might risk ploughing through all your capital if you left it on the 100% option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqM89OSa9VPAaa_PxwIzpw.png" /></figure><p>It’s up to you how tight you want to be on slippage and how speedily you want your orders to go through based on Gas levels. When it comes to whether or not to leave ‘<strong><em>Copy Sells</em></strong>’ checked, it depends on how confident you are in that trader’s win rate. If they are really good, it might be best to copy them entirely. If you want to be a bit more conservative or to be more in line with your own trading style, then uncheck it and click ‘<strong><em>Advanced Features</em></strong>’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQFr-AUI28UcbZ-ehpg-8A.png" /></figure><p>Most of these features are self-explanatory, but with regards to now having ‘<strong><em>Copy Sells</em></strong>’ unchecked, you should click on ‘<strong><em>Auto Sell</em></strong>’ and from within there you will have the option to apply a profile which will manage how to handle all your sells.</p><p>You might want to sell 50% of your position at 100% gain, for example, to take out your initials, and then sell 25% at 300% gain and the remaining 25% at 500% gain? Or, you might want to be super conservative, and sell 100% of your position at 40% gain?</p><p>It’s really up to you at this point. I can’t dictate how best to handle your trading style.</p><blockquote>What I have given you, though, is an amazingly powerful head start in aligning yourself with profitable traders and set you on the track to snagging potentially huge gains in a turbo fashion.</blockquote><p>You can set up as many of these copy trading profiles as you want within Trojan now. Don’t overwhelm yourself too much, though. It can be pretty nuts when you have a torrent of buys and sells happening in the app. Log your trades in a spreadsheet by target wallet address and keep track of the P&amp;L of each. Try and have a measured approach and prune out the wallets that are performing less well and keep the ones that are flying.</p><h3>“Why are you giving away such value?” you might ask…</h3><p>I already have dozens of my own advanced and highly profitable trading bots running at all times on the cloud. I’m crushing it on Solana right now — even without copy trading. What I don’t have yet is a particularly large Medium following or mailing list.</p><p>I am trying to segue into offering my services for coding trading bots as well as other automation scripts for a wide range of online businesses, so I am pushing a value-for-value model here. Giving away something truly valuable should result in growing my audience? 🤞🤞</p><blockquote>If you want to get the advanced version of my Python bot which identifies profitable traders for copy trading on Solana, then all I ask you to do is the following:</blockquote><h3>HOW TO GET THE ADVANCED BOT</h3><ol><li>Please give this article a load of love and claps using the clap button below 👏</li><li>Follow my Medium profile.</li><li>Leave a comment below saying ‘<strong><em>I’d like the advanced bot please</em></strong>’, or something to that effect.</li><li>Sign up to my specific mailing list for this article by clicking <a href="https://confirmsubscription.com/h/i/B3F5B32CF19789EC"><strong><em>HERE</em></strong></a> and include your Medium username in the form.</li><li>I’ll then know that you’ve commented by matching your signup to the comments and I’ll send you the bot right away.</li><li>Finally, you might want to save / bookmark this article so you can find it again if you need to read over the details. That’s the button below that looks like this:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/96/1*8IJpJX4WZux0JZbMTNXgKQ.png" /></figure><p>Shouldn’t take you more than a minute or so to take these steps… for a whole load of potential gains ahead!</p><h3>Collaborative opportunities</h3><p>I’m passionate about helping traders automate their strategies and would love to collaborate with you if you have any ideas you want to build out but don’t know how to.</p><h3>Connect with me</h3><p>You can reach me through:</p><ul><li><strong>Telegram</strong>: <a href="https://t.me/real_p05h">https://t.me/real_p05h</a></li><li><strong>X (Twitter)</strong>: <a href="https://x.com/real_p05h">https://x.com/real_p05h</a></li><li><strong>Email</strong>: drop me an email at <a href="http://p05h@p05h.com/">p05h@p05h.com</a></li><li><strong>GitHub</strong>: <a href="https://github.com/realp05h">https://github.com/realp05h</a></li><li><strong>Medium</strong>: just follow me here for more articles or message me directly / leave more detailed comments or questions below.</li></ul><p><em>Disclaimer: This article is for educational purposes. Trading cryptocurrency involves significant risk. Always conduct your own research and never trade with money you cannot afford to lose.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f4b312a0287" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Automate Your Social Media Marketing Using AI Agents: A Deep Dive Into 3 Amazing Agentic AI…]]></title>
            <link>https://medium.com/@p05h/how-to-automate-your-social-media-marketing-using-ai-agents-a-deep-dive-into-3-amazing-agentic-ai-785423e69723?source=rss-d2a741448dc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/785423e69723</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[social-media-marketing]]></category>
            <category><![CDATA[ai-automation-tool]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[p05h]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 22:44:18 GMT</pubDate>
            <atom:updated>2025-02-15T12:45:41.252Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Automate Your Social Media Marketing Using AI Agents: A Deep Dive Into 3 Amazing Agentic AI Tools</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZNQSpH7BR4v4gBP4dW9HA.jpeg" /></figure><p>If you feel overwhelmed at the moment trying to keep up with all the ways in which AI promises to automate our workflows, boost engagement and increase sales, you’re not alone.</p><p>AI agents, or agentic AI, are all the rage right now and there are a myriad of tools on offer to help us get the jobs we need done while saving our valuable time.</p><p>Many are anxious that these AI automation tools will soon eclipse the ‘meatspace’ and rob us all of our jobs. I personally don’t think there’s much chance of that happening just yet. ‘AI slop’ is a major issue. It’s pretty obvious, especially in the world of sales and marketing, when you’re on the receiving end of fully automated outreach. Most people will instantly dismiss it. We still value human connections and in order to achieve that it’s best that those of us who use AI become one with it without fully substituting ourselves for it.</p><blockquote>Become a puppet master of AI. Use it to enhance your abilities, not replace them. It’s not so much that AI will replace you, it’s more that the people effectively using it will!</blockquote><p>If you want to become an AI-augmented leader in your field, dominate in marketing and leave your competition in the dust, then read on and I’ll show you some of the best AI agents that you can try out right now.</p><h3>1. ReplyGuy</h3><figure><a href="https://replyguy.com/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BmoW6MF1ozxk19DN6kakjg.jpeg" /></a></figure><p>In this fast evolving landscape of digital marketing it’s becoming increasingly challenging to find and connect with potential customers. Enter <a href="https://replyguy.com/?aff=7G8JND">ReplyGuy</a>, the AI-driven automation tool which has reimagined how businesses can rapidly discover and engage with fresh social media conversations that are the most relevant to your brand and offering.</p><p>Traditionally, social media marketing required hours of manual trawling though posts to find conversations worth engaging with. It typically takes a social media marketer a couple of hours a day per project when going down this route. Something like the following is likely:</p><ul><li>30 minutes monitoring various social networks by relevant keywords</li><li>30 minutes analysing all that’s been gathered for product / brand relevance</li><li>60 minutes crafting personalised responses to the harvested posts</li></ul><p>This isn’t just a time consuming process, it’s incredibly boring. Additionally, it’s very inefficient, difficult to scale and one often misses the window for active engagement with a potential lead; by the time you’ve actually identified a relevant post to engage with, either the OP is no longer online or there are a tonne of other replies in there which dilutes your own messaging.</p><p>Because of this, many businesses and social media marketers struggle to maintain consistent engagement across multiple platforms while making sure that their responses maintain relevance, appear genuine and are valuable to the conversation.</p><h4>How does ReplyGuy work?</h4><p>ReplyGuy completely scraps the afore mentioned tedious processes, potentially saving you 30–60 hours per month.</p><blockquote>How much is that saved time worth to you?</blockquote><p><strong><em>1. Keyword selection and AI optimisation</em></strong></p><p>Upon launching the platform you are presented with the option to complete some fields about the business, product or service you want to promote.</p><figure><a href="https://replyguy.com/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/760/1*sdYCtyRUg2d8llsSzKkwbw.png" /></a></figure><p>Once added, their AI will generate relevant keywords which you can then add to the monitoring list for that project. You can use their suggested ones or add any of your own that you think might be most fitting.</p><figure><a href="https://replyguy.com/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZlvwtJpVQW2dRGdwalREQ.png" /></a></figure><p><strong><em>2. Automated mention tracking</em></strong></p><p>Once your keywords are set, ReplyGuy continuously monitors social media platforms for relevant mentions. This relentless monitoring means no opportunities are missed.</p><figure><a href="https://replyguy.com/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bN9FKsPOur33vHC9OJQ2ng.png" /></a></figure><p><strong><em>3. Smart AI-powered post selection</em></strong></p><p>Not all keyword matched posts are worthy of a response. ReplyGuy’s smart AI does its best to filter out those that aren’t relevant to your brand / offering. It tries to select the highest quality, most recent and targeted posts where you can add genuine value to the conversation.</p><p><strong><em>3. Cunning AI-generated replies</em></strong></p><p>Like the look of a post that’s just popped up? Quickly click on the green <strong><em>‘Generate reply’</em></strong> button and you will be presented with a contextual reply that perfectly balances helpfulness with a subtle product / service promotion. These really aren’t generic spam responses, they’re designed to genuinely aid the OP while segueing into sales and the opening of continued dialogue. You can edit it slightly if needs be then either copy and paste it into the target post, or automatically publish your reply with the click of a button.</p><figure><a href="https://replyguy.com/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LFS4lyVKJMBRyWb3YmLJFA.png" /></a></figure><h4>Account management</h4><p>When it comes to replying, ReplyGuy gives you the choice of using their high-quality social media accounts which can auto-post on your behalf. This option makes it easier to get started without additional setup. Or, you can use your own accounts by entering your details into the fields as shown in the image below.</p><figure><a href="https://replyguy.com/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWMCFzAA2A3ru3T2veUlpQ.png" /></a></figure><p>Best practice in my opinion is to use your own accounts, but to do so with dedicated, branded accounts rather than personal profiles. This will help you to maintain professional consistency and will ensure better CRM practices.</p><h4>Pricing and scalability</h4><p>ReplyGuy offers tiered pricing to accommodate varying business sizes and needs.</p><p>They do have a free trial, though. The link to which I will list just below this pricing breakdown:</p><ul><li><strong><em>Pro ($49/mo)</em></strong>: Perfect for small businesses, with 10 keywords and 100 replies per month.</li><li><strong><em>Business ($99/mo)</em></strong>: This next rung up is ideal for growing companies and offers 25 keywords with 100 replies per month.</li><li><strong><em>Enterprise ($199/mo)</em></strong>: Tailored for larger companies, with 100 keywords and 1,000 replies per month.</li><li><strong><em>Agency ($499/mo)</em></strong>: If you’re a dedicated social media marketing agency, then this will be the most suited and cost effective tier to go for. 1,000 keywords can be tracked and 5,000 replies made per month.</li></ul><blockquote><a href="https://replyguy.com/?aff=7G8JND">✅ Click here for a free ReplyGuy trial (no 💳 required!)</a></blockquote><h4>Final thoughts</h4><p>Having used ReplyGuy for a while now, I’d say that it represents a significant advance in social media marketing automation. By combining actually intelligent AI-powered monitoring with meaningful response creation, it offers businesses a fast-tracked means of scaling their outreach and engagement while maintaining authenticity through genuine value creation. Personally, I started to see decent cumulative traffic build up from my activity about 10 days into using it. The conversations are sticky, especially on Reddit.</p><p>Whether you’re a solopreneur, small business owner or dedicated SMM account manager looking to add a time saving and impactful weapon to your arsenal, then it’ll definitely be worth your while to give their free trial a go.</p><h3>2. Spell</h3><figure><a href="https://spell.so/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0-3bSPeAkdUtQ_8jRJiAhA.jpeg" /></a></figure><p>With over 90,000 users already onboard, <a href="https://spell.so/?aff=7G8JND">Spell</a> has proved itself to be a leader in the field of AI automation.</p><p>Spell is a powerful and innovative task automation platform which can transform the way businesses handle their operations.</p><h4>The core agentic structure to Spell</h4><p>While most of us are already deeply familiar with the question and answer interaction form of LLM chatbots, Spell employs truly autonomous agents that can work completely independently on your behalf. These agent types are structured as follows:</p><ol><li><strong><em>Zero-Shot Agents</em></strong> — these offer fast and simple execution with no memory of previous steps. They’re ideal for straightforward tasks and are the most cost-effective of Spell’s agentic tools. Also called ReAct (reason + act) agents, they take a question from the user, think about it and then act on it.</li><li><strong><em>AutoGPT Agents</em></strong> — these type of agents are memory enabled and allow for more complex tasks. They have iterative problem solving capabilities with detailed internal reasoning processes. They are perfect for solving open-ended problems.</li><li><strong><em>Plan &amp; Execute Agents</em></strong> — this type of Spell agent creates execution plans up front. They employ a systematic approach to the more complex tasks you might throw at them. These are the most costly to run in terms of burning credits, but they are really well suited to structured, multi-step tasks.</li></ol><h4>How can Spell benefit social media marketers?</h4><p>Businesses and marketers can massively scale their productivity by using Spell’s parallel processing capabilities. For example you could:</p><ul><li>Instantly generate multiple platform-specific versions of content</li><li>Create a whole weeks worth of social media content in one stroke</li><li>Create multiple versions of ad copy at once for different platforms or for split-testing</li><li>Generate batches of platform-specific hashtags in parallel</li></ul><h4>Leverage Spell’s plugins to aid in your marketing efforts</h4><p>At time of writing, Spell has 366 plugins which you can bolt in to your agents.</p><figure><a href="https://spell.so/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BmYk_O-xrR5I8Eu6GOYCUA.png" /></a></figure><p>You could for example use their search plugins for realtime trend monitoring, website scraping plugins for content curation, demographic research, competitor analysis… the permutations are nearly endless.</p><p>To give a more detailed example for market research, you could splice together their <strong><em>Web Search</em></strong>, <strong><em>Web Browsing</em></strong>, and <strong><em>Web Scraper</em></strong> plugins. Then, once configured, you can prompt your custom agent with something like:</p><blockquote><em>Conduct detailed market research about the latest trends in the AI and automation sectors. Create a business plan, focusing on target audience, industry trends, SWOT analysis, growth projections, and competitor analysis.</em></blockquote><blockquote>Then bingo! You get exactly what you’re after.</blockquote><h4>Pricing</h4><p>Unlike ReplyGuy, Spell don’t offer a cardless free trial. However, they do offer a 7 day free trial if you sign up for any of their packages using either credit card, Cashapp, GooglePay or Paypal. Bear in mind, if you want to try the plugins feature, you’ll need to go for the Professional package. The Personal package just has the bare minimum.</p><ol><li><strong><em>Personal ($7.50/mo)</em></strong>: Suitable for solopreneurs, small business owners, freelance social media managers or anyone looking for light usage. No plugin functionality, but you do get 800 credits a month which is great for basic content creation and is ideal for individual channel management.</li><li><strong><em>Professional ($25/mo)</em></strong>: Perfect for small to medium businesses and marketing agencies. 2,000 credits per month. All plugins are included. Can accommodate multiple clients with this package.</li><li><strong><em>Expert ($41/mo)</em></strong>: This is really designed for larger businesses and full-service marketing agencies. 5,000 credits per month. All plugins are included. Ideal for high-volume content creation.</li></ol><blockquote><a href="https://spell.so/?aff=7G8JND">✅ Click here for a free ‘Professional’ Spell trial (remember to cancel before 7 days are up if you don’t find it useful!)</a></blockquote><p><strong><em>Disclaimer: <br>When I tested Spell I went for ‘Professional’ (using PayPal) and cancelled within 7 days. What I’ve coded myself actually matches most of the functionality that Spell offers, so I had no need to use it personally or professionally beyond testing it for this review.</em></strong></p><h4>Final thoughts</h4><p>For social media marketers, or, indeed, literally anyone conducting business online, Spell is an invaluable tool. Its combination of autonomous agents, parallel processing, plugins and customisable templates means that users can consistently enhance their activities with speed and at scale.</p><p>If you’re looking to shave more time off tedious business operations and increase productivity, be sure to check out Spell’s trial.</p><h3>3. Revid AI</h3><figure><a href="https://www.revid.ai/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JsiAOt7e_ChjZQT45Yr4LQ.jpeg" /></a></figure><p>Pivoting to a more creative side of agentic AI, but definitely squarely in the online marketing arena, I present to you <a href="https://www.revid.ai/?aff=7G8JND">Revid AI</a>.</p><h4>Powerful AI-driven video creation</h4><p>Revid AI is designed to totally simplify the usually complex and time consuming process of creating engaging short-form video content. Here are just a few of its key features (they have <strong><em>LOADS</em></strong> of features, though. Far too many to go into great detail on here!):</p><p><strong><em>Automated script generation</em></strong></p><ul><li>Their AI analyses the successful patterns of existing viral video content</li><li>Generates hooks that capture the viewer’s attention</li><li>Can create story arcs that maintain viewer engagement</li><li>Dynamically content adaptation for different platform requirements</li></ul><p><strong><em>Pro-grade production tools</em></strong></p><ul><li>50+ unique AI voices for narration</li><li>Countless video styles and templates</li><li>Platform specific formatting. Whether it be for TikTok, YouTube, Instagram, etc.</li><li>High-quality video export options</li><li>A super easy and intuitive editing interface</li></ul><h4>Revid AI’s step-by-step creation process</h4><p><strong><em>Getting set up after signup</em></strong></p><p>Revid will firstly ask you to complete a short form to give them a bit of context to who you are and what you’re into:</p><figure><a href="https://www.revid.ai/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i6mOIe6fVHb-987pDcj8Mg.png" /></a></figure><p><strong><em>Creating a short form video script</em></strong></p><p>Select your story style, give a description, set your target video duration and boom! It instantly churns out three great scripts for you.</p><figure><a href="https://www.revid.ai/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzTo5-DJDWKc0vVTXA8Hgw.png" /></a></figure><p><strong><em>Choosing the video imagery, voiceover and music</em></strong></p><p>Incredible versatility in these options. Choose from stock videos, moving AI images, AI video or your own media.</p><p>Then either pick a pre-made voice, clone your own or anyone’s and it will read the script for you.</p><p>If you want, you can then add some music to your video.</p><figure><a href="https://www.revid.ai/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XAOrBuNIAWcQa5r0FK69Aw.png" /></a></figure><p><strong><em>Click create video</em></strong></p><p>Then, just 30 seconds later, you have a unique and highly engaging video generated for you! You can now tweak and tailor it to your own requirements or just take what they’ve generated for you and publish it right away.</p><figure><a href="https://www.revid.ai/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q3xDt4WWf224aBNS6GejWw.png" /></a></figure><h4>Other tools and advanced features</h4><p>It doesn’t stop there, though. You can use amazing features like their PDF to video converter, YouTube clip maker, audio to video transformer, music video generator, website to video tool or even Tweet to video converter.</p><p>Advanced features include AI talking avatars, cinematic video creation and even <strong><em>‘brainrot</em></strong>’ video generation 😂</p><h4>Pricing options</h4><p>The great news is Revid AI offers a cardless free trial. Just by signing up you start with 70 free credits which is more than enough for you to test out their platform. Use the link below this pricing table to get the free access:</p><figure><a href="https://www.revid.ai/?aff=7G8JND"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3l3oCl75mXksfsABMijlxQ.png" /></a></figure><blockquote><a href="https://www.revid.ai/?aff=7G8JND">✅ Click here for a free Revid AI trial (no 💳 required!)</a></blockquote><h4>Final thoughts</h4><p>I’m sure you can appreciate how powerful a tool this is. Social media continues to favour video content, so platforms like Revid AI are a godsend to those of us looking to up our game and create quality content at scale while saving countless hours of script writing, commissioning of voice-over actors, editing and publishing (you can do it in one click rather than going platform by platform).</p><blockquote>Thanks for making it this far in my article! I hope you enjoy testing out these great AI agents. Let me know in the comments below what you think of them. And don’t forget to clap the article if you found it helpful 👏</blockquote><h4>Collaborative opportunities</h4><p>I’m passionate about helping people automate their online business activities and would love to collaborate with you. Need any custom AI integrations for you business? Have any fiddly, tedious or repetitive tasks in your workflows? You’d be surprised how many can be fully automated away.</p><h4>Connect with me</h4><p>I’m always excited to discuss new ideas or work on a bespoke project for you. You can reach me through:</p><ul><li><strong>Telegram</strong>: <a href="https://t.me/real_p05h">https://t.me/real_p05h</a></li><li><strong>X (Twitter)</strong>: <a href="https://x.com/real_p05h">https://x.com/real_p05h</a></li><li><strong>Email</strong>: drop me an email at <a href="http://p05h@p05h.com/">p05h@p05h.com</a></li><li><strong>GitHub</strong>: <a href="https://github.com/realp05h">https://github.com/realp05h</a></li><li><strong>Medium</strong>: just follow me here for more articles or message me directly / leave comments below.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=785423e69723" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a Solana DEX Arbitrage Bot for Meme Coins in Python: Bidirectional Automated Price…]]></title>
            <link>https://wire.insiderfinance.io/how-to-create-a-solana-dex-arbitrage-bot-for-meme-coins-in-python-bidirectional-automated-price-8ede8f995a54?source=rss-d2a741448dc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ede8f995a54</guid>
            <category><![CDATA[dex-arbitrage]]></category>
            <category><![CDATA[solana-blockchain]]></category>
            <category><![CDATA[raydium]]></category>
            <category><![CDATA[arbitrage-bot]]></category>
            <category><![CDATA[jupiter-crypto]]></category>
            <dc:creator><![CDATA[p05h]]></dc:creator>
            <pubDate>Wed, 12 Feb 2025 18:54:46 GMT</pubDate>
            <atom:updated>2025-02-14T19:11:09.461Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Create a Solana DEX Arbitrage Bot for Meme Coins in Python: Bidirectional Automated Price Monitoring Between Raydium and Jupiter</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DO4jMR143OBN9A5QLn6jRg.jpeg" /><figcaption>Solana Arbitrage</figcaption></figure><p>The Solana ecosystem boasts multiple decentralised exchanges (or DEXs) which allow for quick swaps between SOL/USDC and SPL token pairs. Price difference between these DEXs can create arbitrage opportunities. These price imbalances are usually short lived, so programatically identifying these opportunities before they evaporate is essential. Once you can do this, though, volatility and imbalance become your friends and you can open up a whole new world of safer strategies compared to the more degen and high-risk trading approaches many meme coin traders have to contend with.</p><p>In this article I will show you how to quickly get set up with some foundational code for identifying SOL / SPL token arbitrage opportunities between Raydium and Jupiter, the two most liquid DEXs on the Solana chain.</p><p>The bot you will launch with me here provides a perfect starting point to get into meme coin arbitrage.</p><h4>So, what does this Solana arbitrage bot do?</h4><p>✅ It allows us to conduct live price monitoring across Raydium and Jupiter.</p><p>✅ It automates detection of price differences above a configurable percentage threshold.</p><p>✅ It logs all of the identified opportunities to a structured CSV file including data on (timestamp, token symbol, token address, which DEX to buy on, which DEX to sell on, the buy price, the sell price and the percentage difference.</p><p>✅ It has built in rate-limiting and error handling.</p><p>✅ It also has efficient free API usage with timeout handling and retry logic.</p><h4>How does it actually operate?</h4><p>The arbitrage bot uses four main data sources.</p><ol><li>A preloaded JSON file with our target tokens for monitoring.</li><li>Jupiter’s Quote API for fetching token prices on Jupiter DEX.</li><li>DexScreener’s API for quickly grabbing pool information for the target tokens.</li><li>And Raydium’s Price API for fetching token prices on Raydium DEX.</li></ol><p>The bot loads the target tokens from our JSON file, simultaneously fetches prices from Raydium and Jupiter, calculates the price difference between the two, and if a profitable opportunity is identified in either direction between these DEXs for any given target token it will then log that opportunity.</p><h4>Getting set up to run the bot</h4><p><strong>Python is a prerequisite</strong></p><ol><li>Firstly, you’ll need to make sure you have Python 3.9+ installed on your machine. You probably already have it, but if you don’t…</li></ol><ul><li>Download and install Python 3.9+ from <a href="http://python.org/">python.org</a></li><li>Make sure ‘Add Python to PATH’ is selected duing installation</li><li>Then verify your installation in terminal app / command prompt:</li></ul><pre>python --version</pre><p>2. Create the project directory to where you’ll have keep your bot files:</p><pre>mkdir solana-arb-monitor<br>cd solana-arb-monitor</pre><p>3. Now set up a Python virtual environment from which to run your bot:</p><pre># Windows<br>python -m venv venv<br>.\\venv\\Scripts\\activate<br><br># Mac/Linux<br>python -m venv venv<br>source venv/bin/activate</pre><p><strong>Setting up your development environment</strong></p><ul><li>Install a free code editor like VSCode: <a href="http://code.visualstudio.com/">code.visualstudio.com</a>. I personally use <a href="https://www.spyder-ide.org/">Spyder</a> as it’s what I’ve always used and am most familiar with.</li><li>These code editors or integrated development environments (IDEs) are where you will actually spend all of your time working on and customising your code.</li></ul><p><strong>Installing dependencies</strong></p><p>Create a text file called <strong><em>requirements.txt</em></strong></p><p>Into this file you will type and save the following dependencies:</p><pre>aiohttp==3.11.12<br>asyncio==3.4.3</pre><p>Make sure to save this file into the <strong><em>solana-arb-monitor </em></strong>directory you’ve already created. Now you can go ahead and install the requirements by going back to your terminal app / command prompt and running the following:</p><pre>pip install -r requirements.txt</pre><p><strong>Configuring your token source JSON file</strong></p><p>Create a <strong><em>sols_pairs.json </em></strong>file in your VSCode or whatever IDE / text editor you want. We need to fill it with the tokens we want to monitor. It is structured as so (you need to keep that SOL address in the top at all times, your target tokens can be anything you want below that):</p><pre>{<br>    &quot;tokens&quot;: {<br>        &quot;SOL&quot;: {<br>            &quot;address&quot;: &quot;So11111111111111111111111111111111111111112&quot;<br>        },<br>        &quot;Pnut&quot;: {<br>            &quot;address&quot;: &quot;2qEHjDLDLbuBgRYvsxhc5D6uDWAivNFZGan56P1tpump&quot;<br>        },<br>        &quot;BONK&quot;: {<br>            &quot;address&quot;: &quot;DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&quot;<br>        }<br>        // Add more tokens as needed<br>    }<br>}</pre><p>You’ll want to make sure that the tokens have a decent market cap, liquidity and 24hr volume. You’ll also want to make sure that the token address is actually tradable on both Jupiter and Raydium.</p><p>I find one good way of finding hot pairs is to go to this address: <a href="https://jup.ag/tokens">https://jup.ag/tokens</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4mcm7dYVOethTribvWreUA.png" /><figcaption>Trending Solana tokens on Jupiter</figcaption></figure><p>Look at the ones that are trending there. Copy their token addresses. Then paste them in to DexScreener like this: <a href="https://dexscreener.com/solana/KFTSxPQxDV1wGjEvzKHWD7mG6e9TsMVq4eF4mQppump">https://dexscreener.com/solana/</a>[target_token_address]</p><p>Then on the top right you will see this as confirmation that it’s also on Raydium:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*UHgHV_hVAmXzXrkDhLEXGw.png" /><figcaption>Raydium token confirmation on DexScreener</figcaption></figure><h4>Understanding the key elements of the bot</h4><p>Let’s now breakdown the key components in the code…</p><p><strong>The QuickTokenChecker class</strong></p><p>This class handles the core price checking functionality:</p><pre>class QuickTokenChecker:<br>    def __init__(self, token_file):<br>        self.jupiter_base_url = &quot;https://quote-api.jup.ag/v6/quote&quot;<br>        self.raydium_base_url = &quot;https://api.raydium.io/v2/main/price&quot;<br>        self.sol_address = &#39;So11111111111111111111111111111111111111112&#39;</pre><p>Important methods within this class include:</p><ul><li><strong><em>get_with_timeout</em></strong>: Handles API requests with timeout logic</li><li><strong><em>get_pool_address</em></strong>: Fetches the Raydium pool information</li><li><strong><em>check_jupiter</em></strong>: Gets prices from Jupiter</li><li><strong><em>check_raydium</em></strong>: Gets prices from Raydium</li></ul><p><strong>The ArbitrageMonitor class</strong></p><p>This class extends QuickTokenChecker and manages the monitoring process:</p><pre>class ArbitrageMonitor(QuickTokenChecker):<br>    def __init__(self, token_file: str, config: Dict):<br>        super().__init__(token_file)<br>        self.config = config<br>        self.running = False</pre><p>Key features of this class include:</p><ul><li>Rate limiting between checks</li><li>Error counting for any problematic tokens</li><li>CSV logging of opportunities</li><li>Clean handling of shutdowns (BTW, if you’re new to this, you press <strong><em>ctr+c</em></strong> when you want to stop the bot in terminal / command prompt)</li></ul><p><strong>Configuration options</strong></p><p>Near the bottom of the script you will find a configuration dictionary for easy customisation. An important feature here is the ability to set <strong><em>min_price_difference</em></strong>.<em> </em>When you consider fees for swaps, you might want to be more conservative here and go for a higher percentage — opportunities will be less frequent, but profit will be more assured.</p><pre># Configuration<br>    config = {<br>        &#39;check_interval&#39;: 60,  # Seconds between full check cycles<br>        &#39;min_check_interval&#39;: 0,  # Minimum seconds between checks for same token<br>        &#39;min_price_difference&#39;: 1.0,  # Minimum price difference percentage<br>        &#39;max_errors&#39;: 5,  # Maximum errors before warning<br>        &#39;token_file&#39;: &#39;sol_pairs.json&#39;<br>    }</pre><h4>The full bot code</h4><pre>import aiohttp<br>import asyncio<br>import csv<br>import os<br>import json<br>from datetime import datetime<br>import signal<br>import sys<br>from typing import Dict, List, Optional<br><br>class QuickTokenChecker:<br>    def __init__(self, token_file):<br>        self.jupiter_base_url = &quot;https://quote-api.jup.ag/v6/quote&quot;<br>        self.raydium_base_url = &quot;https://api.raydium.io/v2/main/price&quot;<br>        self.sol_address = &#39;So11111111111111111111111111111111111111112&#39;<br>        <br>        # Load tokens from JSON file<br>        with open(token_file, &#39;r&#39;) as f:<br>            data = json.load(f)<br>            if isinstance(data, dict) and &#39;tokens&#39; in data:<br>                self.token_addresses = {<br>                    symbol: info[&#39;address&#39;] <br>                    for symbol, info in data[&#39;tokens&#39;].items()<br>                }<br>            else:<br>                self.token_addresses = data<br>        <br>        print(f&quot;Loaded {len(self.token_addresses)} tokens to check&quot;)<br><br>    async def get_with_timeout(self, session, url, timeout=5, max_retries=3, **kwargs):<br>        &quot;&quot;&quot;Make a GET request with timeout and retry logic&quot;&quot;&quot;<br>        for attempt in range(max_retries):<br>            try:<br>                async with asyncio.timeout(timeout):<br>                    async with session.get(url, **kwargs) as response:<br>                        if response.status == 429:  # Rate limit hit<br>                            retry_after = int(response.headers.get(&#39;Retry-After&#39;, 5))<br>                            await asyncio.sleep(retry_after)<br>                            continue<br>                            <br>                        status = response.status<br>                        try:<br>                            data = await response.json()<br>                            return status, data<br>                        except Exception as e:<br>                            text = await response.text()<br>                            return status, None<br>                            <br>            except asyncio.TimeoutError:<br>                if attempt &lt; max_retries - 1:<br>                    await asyncio.sleep(2 ** attempt)  # Exponential backoff<br>                continue<br>            except Exception as e:<br>                if attempt &lt; max_retries - 1:<br>                    await asyncio.sleep(2 ** attempt)<br>                continue<br>                <br>        return None, None<br>    <br>    async def get_pool_address(self, session, token_address):<br>        &quot;&quot;&quot;Get pool address from DexScreener&quot;&quot;&quot;<br>        try:<br>            url = f&quot;https://api.dexscreener.com/latest/dex/tokens/{token_address}&quot;<br>            headers = {<br>                &#39;User-Agent&#39;: &#39;Mozilla/5.0&#39;,<br>                &#39;Accept&#39;: &#39;application/json&#39;<br>            }<br>            <br>            async with session.get(url, headers=headers) as response:<br>                if response.status == 200:<br>                    data = await response.json()<br>                    pairs = data.get(&#39;pairs&#39;, [])<br>                    <br>                    # Find Raydium pair<br>                    for pair in pairs:<br>                        if pair.get(&#39;dexId&#39;) == &#39;raydium&#39;:<br>                            return {<br>                                &#39;pair_address&#39;: pair.get(&#39;pairAddress&#39;),<br>                                &#39;price&#39;: float(pair.get(&#39;priceUsd&#39;, 0))<br>                            }<br>            return None<br>        except Exception:<br>            return None<br><br>    async def check_jupiter(self, session, symbol, address):<br>        # First get SOL/USDC price<br>        sol_price_params = {<br>            &#39;inputMint&#39;: self.sol_address,<br>            &#39;outputMint&#39;: &#39;EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&#39;,<br>            &#39;amount&#39;: &#39;1000000000&#39;,<br>            &#39;slippageBps&#39;: 50<br>        }<br>        <br>        sol_status, sol_data = await self.get_with_timeout(session, self.jupiter_base_url, params=sol_price_params)<br>        if not sol_status == 200 or not sol_data or &#39;outAmount&#39; not in sol_data:<br>            return False, None<br>            <br>        sol_price_usdc = float(sol_data[&#39;outAmount&#39;]) / 1e6  # Convert to decimal USDC<br>        <br>        # Get token/SOL price<br>        params = {<br>            &#39;inputMint&#39;: address,<br>            &#39;outputMint&#39;: self.sol_address,<br>            &#39;amount&#39;: &#39;1000000000&#39;,<br>            &#39;slippageBps&#39;: 50<br>        }<br>        <br>        status, data = await self.get_with_timeout(session, self.jupiter_base_url, params=params)<br>        <br>        if status == 200 and data and &#39;outAmount&#39; in data:<br>            sol_value = float(data[&#39;outAmount&#39;]) / float(params[&#39;amount&#39;])<br>            usdc_price = (sol_value * sol_price_usdc) / 1000  # Divide by 1000<br>            <br>            return True, {<br>                &#39;price&#39;: usdc_price<br>            }<br>        return False, None<br><br>    async def check_raydium(self, session, symbol, address):<br>        &quot;&quot;&quot;Check token price on Raydium&quot;&quot;&quot;<br>        pool_data = await self.get_pool_address(session, address)<br>        if not pool_data:<br>            return False, None<br>            <br>        return True, {<br>            &#39;price&#39;: pool_data[&#39;price&#39;]<br>        }<br><br>class ArbitrageMonitor(QuickTokenChecker):<br>    def __init__(self, token_file: str, config: Dict):<br>        super().__init__(token_file)<br>        self.config = config<br>        self.running = False<br>        self.last_check_times: Dict[str, datetime] = {}<br>        self.error_counts: Dict[str, int] = {}<br>        <br>        # Register signal handlers<br>        signal.signal(signal.SIGINT, self.handle_shutdown)<br>        signal.signal(signal.SIGTERM, self.handle_shutdown)<br><br>    def handle_shutdown(self, signum, frame):<br>        &quot;&quot;&quot;Handle graceful shutdown on signals&quot;&quot;&quot;<br>        print(&quot;\nShutdown signal received. Cleaning up...&quot;)<br>        self.running = False<br><br>    async def monitor_token(self, session: aiohttp.ClientSession, symbol: str, address: str) -&gt; Optional[dict]:<br>        &quot;&quot;&quot;Monitor a single token pair with error handling and rate limiting&quot;&quot;&quot;<br>        try:<br>            # Check if we need to wait due to rate limiting<br>            last_check = self.last_check_times.get(symbol)<br>            if last_check:<br>                time_since_last = (datetime.now() - last_check).total_seconds()<br>                if time_since_last &lt; self.config[&#39;min_check_interval&#39;]:<br>                    await asyncio.sleep(self.config[&#39;min_check_interval&#39;] - time_since_last)<br><br>            # Update last check time<br>            self.last_check_times[symbol] = datetime.now()<br><br>            # Check prices<br>            raydium_available, raydium_data = await self.check_raydium(session, symbol, address)<br>            if raydium_available:<br>                await asyncio.sleep(0.1)  # Small delay between checks<br>                jupiter_available, jupiter_data = await self.check_jupiter(session, symbol, address)<br>                <br>                if jupiter_available and raydium_data and jupiter_data:<br>                    ray_price = float(raydium_data[&#39;price&#39;])<br>                    jup_price = float(jupiter_data[&#39;price&#39;])<br>                    <br>                    diff_percent = abs(ray_price - jup_price) / min(ray_price, jup_price) * 100<br>        <br>                    if diff_percent &gt; self.config[&#39;min_price_difference&#39;]:<br>                        # Determine buy/sell venues based on prices<br>                        buy_price = min(ray_price, jup_price)<br>                        sell_price = max(ray_price, jup_price)<br>                        buy_on = &#39;Raydium&#39; if buy_price == ray_price else &#39;Jupiter&#39;<br>                        sell_on = &#39;Jupiter&#39; if sell_price == jup_price else &#39;Raydium&#39;<br>                        <br>                        opportunity = {<br>                            &#39;symbol&#39;: symbol,<br>                            &#39;address&#39;: address,<br>                            &#39;buy_on&#39;: buy_on,<br>                            &#39;sell_on&#39;: sell_on,<br>                            &#39;buy_price&#39;: buy_price,<br>                            &#39;sell_price&#39;: sell_price,<br>                            &#39;difference_percent&#39;: diff_percent,<br>                            &#39;timestamp&#39;: datetime.now().isoformat()<br>                        }<br>                        <br>                        return opportunity<br>        <br>                return None<br><br>        except Exception as e:<br>            self.error_counts[symbol] = self.error_counts.get(symbol, 0) + 1<br>            if self.error_counts[symbol] &gt; self.config[&#39;max_errors&#39;]:<br>                print(f&quot;Too many errors for {symbol}, considering removal from monitoring&quot;)<br>            return None<br><br>    async def run_monitoring_loop(self):<br>        &quot;&quot;&quot;Main monitoring loop with proper error handling and rate limiting&quot;&quot;&quot;<br>        self.running = True<br>        print(f&quot;Starting monitoring loop at {datetime.now()}&quot;)<br>        <br>        while self.running:<br>            try:<br>                timeout = aiohttp.ClientTimeout(total=30)<br>                async with aiohttp.ClientSession(timeout=timeout) as session:<br>                    while self.running:<br>                        start_time = datetime.now()<br>                        opportunities = []<br><br>                        for symbol, address in self.token_addresses.items():<br>                            if symbol != &#39;SOL&#39;:<br>                                try:<br>                                    result = await self.monitor_token(session, symbol, address)<br>                                    if isinstance(result, dict):<br>                                        opportunities.append(result)<br>                                except Exception as e:<br>                                    continue<br><br>                        if opportunities:<br>                            self.save_opportunities(opportunities)<br>                            <br>                            for opp in opportunities:<br>                                print(f&quot;\n🔥 Opportunity found for {opp[&#39;symbol&#39;]}:&quot;)<br>                                print(f&quot;Buy on {opp[&#39;buy_on&#39;]} at ${opp[&#39;buy_price&#39;]:.6f}&quot;)<br>                                print(f&quot;Sell on {opp[&#39;sell_on&#39;]} at ${opp[&#39;sell_price&#39;]:.6f}&quot;)<br>                                print(f&quot;Difference: {opp[&#39;difference_percent&#39;]:.2f}%&quot;)<br><br>                        elapsed = (datetime.now() - start_time).total_seconds()<br>                        if elapsed &lt; self.config[&#39;check_interval&#39;]:<br>                            await asyncio.sleep(self.config[&#39;check_interval&#39;] - elapsed)<br><br>            except Exception as e:<br>                print(&quot;Restarting monitoring loop in 10 seconds...&quot;)<br>                await asyncio.sleep(10)<br><br>    def save_opportunities(self, opportunities):<br>        &quot;&quot;&quot;Save opportunities to CSV file&quot;&quot;&quot;<br>        csv_filename = &#39;arbitrage_opportunities.csv&#39;<br>        file_exists = os.path.exists(csv_filename)<br>        <br>        with open(csv_filename, &#39;a&#39;, newline=&#39;&#39;) as f:<br>            headers = [<br>                &#39;timestamp&#39;,<br>                &#39;symbol&#39;,<br>                &#39;address&#39;,<br>                &#39;buy_on&#39;,<br>                &#39;sell_on&#39;,<br>                &#39;buy_price&#39;,<br>                &#39;sell_price&#39;,<br>                &#39;difference_percent&#39;<br>            ]<br>            <br>            writer = csv.DictWriter(f, fieldnames=headers)<br>            <br>            if not file_exists:<br>                writer.writeheader()<br>            <br>            for opp in opportunities:<br>                row = {<br>                    &#39;timestamp&#39;: datetime.now().strftime(&quot;%Y-%m-%d %H:%M:%S&quot;),<br>                    &#39;symbol&#39;: opp[&#39;symbol&#39;],<br>                    &#39;address&#39;: opp[&#39;address&#39;],<br>                    &#39;buy_on&#39;: opp[&#39;buy_on&#39;],<br>                    &#39;sell_on&#39;: opp[&#39;sell_on&#39;],<br>                    &#39;buy_price&#39;: f&quot;{opp[&#39;buy_price&#39;]:.8f}&quot;,<br>                    &#39;sell_price&#39;: f&quot;{opp[&#39;sell_price&#39;]:.8f}&quot;,<br>                    &#39;difference_percent&#39;: f&quot;{opp[&#39;difference_percent&#39;]:.2f}&quot;<br>                }<br>                writer.writerow(row)<br>        <br>        print(f&quot;\nLogged {len(opportunities)} opportunities to {csv_filename}&quot;)<br><br>async def main():<br>    # Configuration<br>    config = {<br>        &#39;check_interval&#39;: 60,  # Seconds between full check cycles<br>        &#39;min_check_interval&#39;: 0,  # Minimum seconds between checks for same token<br>        &#39;min_price_difference&#39;: 1.0,  # Minimum price difference percentage<br>        &#39;max_errors&#39;: 5,  # Maximum errors before warning<br>        &#39;token_file&#39;: &#39;sol_pairs.json&#39;<br>    }<br><br>    monitor = ArbitrageMonitor(config[&#39;token_file&#39;], config)<br>    <br>    try:<br>        await monitor.run_monitoring_loop()<br>    except Exception as e:<br>        print(f&quot;Fatal error: {str(e)}&quot;)<br>    finally:<br>        print(&quot;\nShutting down...&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    print(&quot;Starting the p05h SOL arbitrage monitor...&quot;)<br>    asyncio.run(main()</pre><h4><strong>Running the Bot</strong></h4><ol><li>Save the above bot code to a file name of your choice. Let’s just call it <strong><em>arb_monitor.py</em></strong> for now and save it to your bot directory you created before.</li><li>Also, make sure you have your sol_pairs.json file saved to that same directory.</li><li>Now go ahead and run the bot from your terminal / command prompt:</li></ol><pre>python arb_monitor.py</pre><p>The bot will now create a file in your bot directory called <strong><em>arbitrage_opportunities.csv</em></strong>.</p><p>The console output should look like this if it’s working:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*ypobSC1I7gzv5SzL3sZTMQ.png" /><figcaption>Terminal output when the solana arbitrage bot is started</figcaption></figure><h4>Where to go from here?</h4><p>Now that you’ve got your foundational Solana arbitrage analysis bot up and running, you’ll need to take it to the next level.</p><p>From here you can consider adding advanced analysis and features such as minimum volume thresholds, price impact analysis, gas/fees cost factoring, Telegram, Discord, email, webhook notifications… and then the key part… actual trade execution!</p><p>I really don’t want to spoon feed you absolutely everything right here in this article. I’m a great believer in learning by doing, so try and see where you can take it from here. If you’re stuck, try pasting the bot code into ChatGPT, Claude (my fave) or any other LLM AI and ask how to expand upon it with the features you need.</p><h4>Collaborative opportunities</h4><p>That said, I’m passionate about helping traders automate their strategies and would love to collaborate with you.</p><p>I would be happy to help you customise this bot and expand upon its features if you need me to.</p><h3>Connect with me</h3><p>I’m always excited to discuss new ideas or work on a bespoke project for you. You can reach me through:</p><ul><li><strong>Telegram</strong>: <a href="https://t.me/real_p05h">https://t.me/real_p05h</a></li><li><strong>X (Twitter)</strong>: <a href="https://x.com/real_p05h">https://x.com/real_p05h</a></li><li><strong>Email</strong>: drop me an email at <a href="http://p05h@p05h.com/">p05h@p05h.com</a></li><li><strong>GitHub</strong>: <a href="https://github.com/realp05h">https://github.com/realp05h</a></li><li><strong>Medium</strong>: just follow me here for more articles or message me directly / leave comments below.</li></ul><h3>Final thoughts</h3><p>Remember, successful trading automation is an iterative process. Start with the foundations (like what I have provided for you here), learn from the data it provides, then gradually build up towards more sophisticated strategies. It’s a totally addictive and exhilarating journey once you embark on it, and I’m here to help you along every step.</p><h4>A Message from InsiderFinance</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/0*10x5_2smmKq8oIlf.png" /></figure><p>Thanks for being a part of our community! Before you go:</p><ul><li>👏 Clap for the story and follow the author 👉</li><li>📰 View more content in the <a href="https://wire.insiderfinance.io/">InsiderFinance Wire</a></li><li>📚 Take our <a href="https://learn.insiderfinance.io/p/mastering-the-flow">FREE Masterclass</a></li><li><strong>📈 Discover </strong><a href="https://insiderfinance.io/?utm_source=wire&amp;utm_medium=message"><strong>Powerful Trading Tools</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ede8f995a54" width="1" height="1" alt=""><hr><p><a href="https://wire.insiderfinance.io/how-to-create-a-solana-dex-arbitrage-bot-for-meme-coins-in-python-bidirectional-automated-price-8ede8f995a54">How to Create a Solana DEX Arbitrage Bot for Meme Coins in Python: Bidirectional Automated Price…</a> was originally published in <a href="https://wire.insiderfinance.io/">InsiderFinance Wire</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Your First Proper PumpFun Trading Bot with Python: A Foundation for Automated Token Mint…]]></title>
            <link>https://medium.com/@p05h/building-your-first-proper-pumpfun-trading-bot-with-python-a-foundation-for-automated-token-mint-ac65a430cf29?source=rss-d2a741448dc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac65a430cf29</guid>
            <category><![CDATA[pumpfun]]></category>
            <category><![CDATA[pumpfunbot]]></category>
            <category><![CDATA[pumpfun-trading-api]]></category>
            <category><![CDATA[memecoin-trading]]></category>
            <category><![CDATA[cryptotradingbot]]></category>
            <dc:creator><![CDATA[p05h]]></dc:creator>
            <pubDate>Fri, 07 Feb 2025 16:24:23 GMT</pubDate>
            <atom:updated>2025-04-07T13:24:28.754Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building Your First Proper PumpFun Trading Bot with Python: A Foundation for Automated Token Mint Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tiAlCJJK8oEgZdIjRte2ew.jpeg" /></figure><p>The Solana ecosystem continues to shine as the leader for memecoin launches with the infamous <a href="https://pump.fun/">PumpFun</a> still acting as the key platform for easy and cheap token creation / trading.</p><p>Fortunes can be made and lost in seconds on PumpFun, and while many traders still manually track token launches and pore over the charts while employing proprietary trading strategies, they are at a serious disadvantage compared to those of us who are using botting and automation techniques.</p><p>In this article I want to help those who are fairly new to this and desperate to dip their toes into the exciting world of PumpFun automation. I’ll share with you a foundational bot framework I built which can be used as a launchpad and expanded upon to develop any trading strategies you might wish to explore.</p><h4>What does this foundational PumpFun Python bot actually do?</h4><ol><li>It monitors PumpFun’s contract directly on-chain for new token mints in real-time. No cumbersome or slow scraping from the PumpFun site required.</li><li>The bot automatically fetches key data from every single live launch, including token name, token symbol, uri address, mint address, creator address, bonding curve address, social links (Twitter, Telegram and Website) as well as the url to the project’s imagery / branding.</li><li>Logs everything it gathers into a structured CSV file for you to then analyse at your own leisure.</li></ol><h4>Why is this framework so valuable?</h4><ul><li><strong><em>Real-Time Data Capture</em></strong> — my bot uses WebSocket connections to capture token launches the moment they happen. There are literally tens of thousands of tokens being launched on PumpFun every day. 99% of which are junk and will dump the moment you buy them after launch. By gathering all the fresh launches programatically, we can then apply automated decision making processes to figure out which ones we want to pursue before the ‘normies’ do.</li><li><strong><em>Metadata Analysis Foundation</em></strong> — by automatically and immediately gathering all the pertinent metadata about every token, you are building a strong base from which to conduct activities such as social sentiment analysis… Perhaps you could create a filter which only allows through tokens which have valid Twitter, Telegram and website addresses. And you could then add functions which allow you to create project-legitimacy-scoring or likelihood-to-rug scores by quickly analysing all of these profiles to see how old they are, how many followers they have, how many posts they have made, how much engagement there is on these posts, what the average sentiment is on these post’s replies and so on. These are things that many traders would manually be doing anyway, but now you’ll be able to do this fully-auto, at lightning speed, with perfect accuracy and at an astonishingly large scale. Alternatively, you could create watchlists of known successful dev addresses that have consistently bonded tokens to Raydium or even identify a subsection of these devs who have sent more than 20% of their launches to a market cap of over $1,000,000, for example. You could then create a function which scans for only those devs in your watchlist and immediately creates a trading signal when a token launch by one of those devs is made — allowing you to quickly snipe a position long before others have realised that launch is a likely runner.</li><li><strong><em>Extensible Architecture</em></strong> — the modular design of my foundational code will allow you to easily add all you need to create a more advanced trading bot tailored specifically to your needs and strategies. You could track price action of every launch with on-chain direct monitoring of the bonding curve address for any given token. You can create custom signal functions, which, when triggered, will execute fully automated trades for you with direct swaps on pool or though your preferred trading bot (<a href="https://t.me/BullxBetaBot?start=access_ZIB74EPLMKH">BullX</a>, <a href="https://t.me/menelaus_trojanbot?start=r-menelaus_trojan">Trojan on Telegram</a>… wherever). You could create custom Telegram notifications which feed into a private channel when certain criteria are met, thereby allowing you to filter the noise and make more informed manual trades. Similarly, you could even create your own calls channel on Telegram and charge a subscription to followers for your cleverly filtered launch intel.</li></ul><h4>The code</h4><pre>import asyncio<br>import websockets<br>import json<br>import base64<br>import struct<br>import csv<br>from solders.pubkey import Pubkey<br>from solana.rpc.api import Client<br>from datetime import datetime, timedelta<br>import requests<br>import os<br>import sys<br>import time<br>import io<br><br># Constants<br>WSS = &quot;wss://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY&quot;  # Replace with your Helius API key<br>SOLANA_RPC_URL = &quot;https://YOUR_RPC_ENDPOINT&quot;  # Replace with your RPC endpoint<br>CSV_FILE_PATH = &quot;token_logs.csv&quot;<br><br># Initialize Solana RPC client<br>solana_client = Client(SOLANA_RPC_URL)<br><br># Retry settings<br>max_retries = 20<br>restart_delay = 5<br>backoff_factor = 3<br><br>def get_current_time():<br>    &quot;&quot;&quot;Get the current timestamp as a string.&quot;&quot;&quot;<br>    return datetime.utcnow().strftime(&#39;%Y-%m-%d %H:%M:%S&#39;)<br><br>def parse_event_data(data_hex):<br>    &quot;&quot;&quot;Parse the token creation event data.&quot;&quot;&quot;<br>    try:<br>        data_bytes = bytes.fromhex(data_hex)<br>        offset = 8<br><br>        def read_length_prefixed_string(data, offset):<br>            length = struct.unpack(&#39;&lt;I&#39;, data[offset:offset + 4])[0]<br>            offset += 4<br>            string_data = data[offset:offset + length]<br>            offset += length<br>            return string_data.decode(&#39;utf-8&#39;).strip(&#39;\x00&#39;), offset<br><br>        def read_pubkey(data, offset):<br>            pubkey_data = data[offset:offset + 32]<br>            offset += 32<br>            pubkey = str(Pubkey.from_bytes(pubkey_data))<br>            return pubkey, offset<br><br>        event_data = {}<br>        event_data[&#39;name&#39;], offset = read_length_prefixed_string(data_bytes, offset)<br>        event_data[&#39;symbol&#39;], offset = read_length_prefixed_string(data_bytes, offset)<br>        event_data[&#39;uri&#39;], offset = read_length_prefixed_string(data_bytes, offset)<br>        event_data[&#39;mint&#39;], offset = read_pubkey(data_bytes, offset)<br>        event_data[&#39;bonding_curve&#39;], offset = read_pubkey(data_bytes, offset)<br>        event_data[&#39;user&#39;], offset = read_pubkey(data_bytes, offset)<br><br>        return event_data<br>    except Exception as e:<br>        print(f&quot;Error parsing event data: {e}&quot;)<br>        raise<br><br>def fetch_token_metadata(uri):<br>    &quot;&quot;&quot;<br>    Fetch and parse metadata from token URI.<br>    Returns a dictionary with image and social links.<br>    &quot;&quot;&quot;<br>    try:<br>        response = requests.get(uri, timeout=10)<br>        response.raise_for_status()<br>        data = response.json()<br>        <br>        metadata = {<br>            &#39;image&#39;: data.get(&#39;image&#39;, &#39;NA&#39;),<br>            &#39;twitter&#39;: data.get(&#39;twitter&#39;, &#39;NA&#39;),<br>            &#39;telegram&#39;: data.get(&#39;telegram&#39;, &#39;NA&#39;),<br>            &#39;website&#39;: data.get(&#39;website&#39;, &#39;NA&#39;)<br>        }<br>        <br>        # Clean up social links if they exist<br>        if metadata[&#39;twitter&#39;] != &#39;NA&#39; and not metadata[&#39;twitter&#39;].startswith((&#39;http://&#39;, &#39;https://&#39;)):<br>            metadata[&#39;twitter&#39;] = f&quot;https://twitter.com/{metadata[&#39;twitter&#39;].lstrip(&#39;@&#39;)}&quot;<br>            <br>        if metadata[&#39;telegram&#39;] != &#39;NA&#39; and not metadata[&#39;telegram&#39;].startswith((&#39;http://&#39;, &#39;https://&#39;)):<br>            metadata[&#39;telegram&#39;] = f&quot;https://t.me/{metadata[&#39;telegram&#39;].lstrip(&#39;@&#39;)}&quot;<br>            <br>        if metadata[&#39;website&#39;] != &#39;NA&#39; and not metadata[&#39;website&#39;].startswith((&#39;http://&#39;, &#39;https://&#39;)):<br>            metadata[&#39;website&#39;] = f&quot;https://{metadata[&#39;website&#39;]}&quot;<br>            <br>        return metadata<br>        <br>    except Exception as e:<br>        print(f&quot;Error fetching metadata from {uri}: {e}&quot;)<br>        return {<br>            &#39;image&#39;: &#39;NA&#39;,<br>            &#39;twitter&#39;: &#39;NA&#39;,<br>            &#39;telegram&#39;: &#39;NA&#39;,<br>            &#39;website&#39;: &#39;NA&#39;<br>        }<br><br>def write_to_csv(data):<br>    &quot;&quot;&quot;Write token data to CSV file.&quot;&quot;&quot;<br>    try:<br>        with open(CSV_FILE_PATH, mode=&#39;a&#39;, newline=&#39;&#39;) as file:<br>            writer = csv.DictWriter(file, fieldnames=data.keys())<br>            if file.tell() == 0:<br>                writer.writeheader()<br>            writer.writerow(data)<br>        print(f&quot;Successfully logged token: {data[&#39;name&#39;]} ({data[&#39;symbol&#39;]})&quot;)<br>    except Exception as e:<br>        print(f&quot;Error writing to CSV: {e}&quot;)<br><br>def process_logs_response(response):<br>    &quot;&quot;&quot;Process WebSocket log responses.&quot;&quot;&quot;<br>    try:<br>        log_data = json.loads(response)<br>        logs = log_data.get(&quot;params&quot;, {}).get(&quot;result&quot;, {}).get(&quot;value&quot;, {}).get(&quot;logs&quot;, [])<br><br>        if &quot;Instruction: InitializeMint2&quot; in &#39;&#39;.join(logs):<br>            for log_entry in logs:<br>                if &quot;Program data: &quot; in log_entry and not log_entry.startswith(&quot;Program data: vdt/&quot;):<br>                    program_data_base64 = log_entry.split(&quot;Program data: &quot;)[1]<br>                    program_data_hex = base64.b64decode(program_data_base64).hex()<br>                    event_data = parse_event_data(program_data_hex)<br>                    <br>                    # Add timestamp<br>                    event_data[&#39;mint_time&#39;] = get_current_time()<br>                    <br>                    # Fetch and add metadata<br>                    print(f&quot;Fetching metadata for {event_data[&#39;name&#39;]}...&quot;)<br>                    metadata = fetch_token_metadata(event_data[&#39;uri&#39;])<br>                    event_data.update(metadata)<br>                    <br>                    # Log the complete token data<br>                    write_to_csv(event_data)<br>                    <br>    except Exception as e:<br>        print(f&quot;Error processing logs: {e}&quot;)<br><br>async def subscribe_to_logs(websocket):<br>    &quot;&quot;&quot;Subscribe to token creation logs.&quot;&quot;&quot;<br>    request = {<br>        &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>        &quot;id&quot;: 1,<br>        &quot;method&quot;: &quot;logsSubscribe&quot;,<br>        &quot;params&quot;: [<br>            {&quot;mentions&quot;: [&quot;6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P&quot;]},<br>            {&quot;commitment&quot;: &quot;processed&quot;}<br>        ]<br>    }<br><br>    await websocket.send(json.dumps(request))<br>    print(&quot;Subscribed to token creation logs...&quot;)<br><br>    while True:<br>        try:<br>            response = await websocket.recv()<br>            process_logs_response(response)<br>        except Exception as e:<br>            print(f&quot;Error in log subscription: {e}&quot;)<br>            break<br><br>async def logs_subscribe():<br>    &quot;&quot;&quot;Main WebSocket connection handler.&quot;&quot;&quot;<br>    retry_count = 0<br><br>    while True:<br>        try:<br>            print(&quot;Connecting to WebSocket...&quot;)<br>            async with websockets.connect(WSS, ping_interval=60, ping_timeout=30) as websocket:<br>                await subscribe_to_logs(websocket)<br>                retry_count = 0<br>        except Exception as e:<br>            print(f&quot;WebSocket error: {e}&quot;)<br>            retry_count += 1<br>            <br>            if retry_count &gt; max_retries:<br>                print(&quot;Maximum retries reached. Exiting...&quot;)<br>                break<br><br>            sleep_time = min(30, backoff_factor ** retry_count + (retry_count % 2))<br>            print(f&quot;Retrying in {sleep_time} seconds...&quot;)<br>            await asyncio.sleep(sleep_time)<br><br>async def main():<br>    &quot;&quot;&quot;Main program loop.&quot;&quot;&quot;<br>    try:<br>        tasks = [<br>            asyncio.create_task(logs_subscribe())]<br>        await asyncio.wait(tasks, return_when=asyncio.FIRST_EXCEPTION)<br>    except Exception as e:<br>        print(f&quot;Critical error: {e}&quot;)<br>        restart_script()<br><br>def restart_script():<br>    &quot;&quot;&quot;Restart the script after a delay.&quot;&quot;&quot;<br>    print(f&quot;Restarting in {restart_delay} seconds...&quot;)<br>    time.sleep(restart_delay)<br>    os.execv(sys.executable, [&#39;python&#39;] + sys.argv)<br><br>if __name__ == &quot;__main__&quot;:<br>    print(&quot;Starting the p05h PumpFun Token Monitor...&quot;)<br>    while True:<br>        try:<br>            asyncio.run(main())<br>        except Exception as e:<br>            print(f&quot;Script crashed: {e}&quot;)<br>            time.sleep(restart_delay)</pre><h4>Getting this foundational code up and running</h4><p>If you’re new to Python or blockchain development, here’s a step-by-step guide to get this PumpFun bot running.</p><p><strong>Prerequisites</strong></p><ol><li><strong><em>Python installation</em></strong></li></ol><ul><li>You probably already have it installed on your machine, but if not, go ahead and download and install Python 3.9+ from <a href="https://python.org/">python.org</a></li><li>During installation, make sure you check ‘Add Python to PATH’.</li><li>Verify your installation and versioning by opening your terminal app / command prompt and typing the following:</li></ul><pre>python --version</pre><p>2. <strong><em>Setting up your development environment</em></strong></p><ul><li>Install a free code editor like VSCode: <a href="http://code.visualstudio.com/">code.visualstudio.com</a>. I personally use <a href="https://www.spyder-ide.org/">Spyder</a> as it’s what I’ve always used and am most familiar with.</li><li>These code editors or integrated development environments (IDEs) are where you will actually spend all of your time working on and customising your code.</li></ul><p><strong>Project Setup</strong></p><ol><li><strong><em>Create your project directory</em></strong></li></ol><ul><li>Type the code below into your terminal / command prompt to create a new directory for your project.</li></ul><pre>mkdir pumpfun-bot<br>cd pumpfun-bot</pre><p>2. <strong><em>Create a Virtual Environment</em></strong></p><ul><li>It’s good practice to silo your different Python projects into their own virtual environments. This helps you to avoid clashes between different code libraries from project to project and ensures your code will always run correctly when launched from its own environment.</li></ul><pre># Windows<br>python -m venv venv<br>.\venv\Scripts\activate<br><br># Mac/Linux<br>python -m venv venv<br>source venv/bin/activate</pre><p>3. <strong><em>Install the required packages for our Python script</em></strong></p><ul><li>Navigate to the directory you’ve created and then create and save a file within it called <strong><em>requirements.txt</em></strong></li><li>Paste the following into this file before saving it:</li></ul><pre>websockets==10.4<br>solders==0.11.0<br>solana==0.28.1<br>requests==2.32.3</pre><ul><li>Now to actually install these dependencies, go back to your terminal / command prompt (where you should still be in your activated virtual environment) and use this command:</li></ul><pre>pip install -r requirements.txt</pre><p><strong>Configuration</strong></p><ol><li><strong><em>Gather your API keys</em></strong></li></ol><ul><li>In order for the bot to run, you’ll need a couple of free API keys.</li><li>Sign up for a Helius account at <a href="http://helius.dev/">helius.dev</a></li><li>Get a Solana RPC endpoint URL from <a href="https://account.getblock.io/sign-in?ref=ZTgxMmMzOGEtZmQ0Mi01MzViLWJkNjQtZjgxM2Q0N2IxYTAx">here</a>. This one gives you a tonne of requests with their free tier, which will be ample for testing the bot and formulating your strategy.</li></ul><p>2. <strong><em>Update the bot configuration in your IDE</em></strong></p><ul><li>You should have pasted the main code block from earlier into your IDE at this point. You’ll want to edit the code near the top as below… Where you see <strong>YOUR_API_KEY</strong> in WSS (leaving the url intact in front of that) is where you’ll add your Helius API key. Then you’ll replace the whole url for <strong>SOLANA_RPC_URL</strong> between the quotes with your RPC shared node endpoint which will look something like this: <strong>https://go.getblock.io/df92e593d436127688a19cd91f8900c01</strong></li></ul><pre>WSS = &quot;wss://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY&quot;<br>SOLANA_RPC_URL = &quot;https://YOUR_RPC_ENDPOINT&quot;</pre><p><strong>Running the Bot</strong></p><ol><li><strong><em>Save the bot script</em></strong></li></ol><ul><li>Now that your bot script is correctly updated with your own API and RPC endpoint details, you can go ahead and save the file to the directory we created earlier. Call it anything you want, for example: <strong>bot.py</strong></li></ul><p>2. <strong><em>Launch the bot</em></strong></p><ul><li>You can now simply go ahead and run the bot from the terminal / command prompt you were in before by typing:</li></ul><pre># Make sure your virtual environment is activated<br>python bot.py</pre><p>3. <strong><em>Check the bot’s operating correctly</em></strong></p><ul><li>When the bot starts up it will create a token_logs.csv file in your project directory.</li><li>You should see console output in your terminal showing you the connection status:</li></ul><blockquote>Starting the p05h PumpFun Token Monitor…<br>Connecting to WebSocket…<br>Subscribed to token creation logs…</blockquote><ul><li>All the freshly minted PumpFun tokens that are being harvested should now appear as a constant stream below this.</li></ul><p><strong>Troubleshooting Common Issues</strong></p><ol><li><strong><em>WebSocket connection issues</em></strong></li></ol><ul><li>Make sure you entered valid credentials for your Helius and RPC endpoint.</li><li>Make sure you’re actually connected to the internet.</li><li>Ensure you’re not hitting rate limits with your credentials (with Helius you should never hit your monthly allowance, but with your RPC endpoint you will hit it at some point — then you’ll need to set up the cheapest package option which will entitle you to millions of requests per month.</li></ul><p>2. <strong><em>Package import issues</em></strong></p><ul><li>Make sure your virtual environment is actually activated</li><li>Try reinstalling the requirements:</li></ul><pre>pip install -r requirements.txt</pre><h4>Security</h4><p>NEVER SHARE YOUR API KEYS / RPC ENDPOINT PUBLICLY! If you do, anyone can use them and use up your credit.</p><h4>Where to go from here</h4><p>Now that your PumpFun mint analysis bot is running and you’re gathering data, you can start to look for patterns and begin to formulate an actual trading strategy.</p><p>The bot we’ve explored today is just the beginning. While it provides a solid base for PumpFun token launch monitoring, every trader’s requirements are unique. Your specific strategy might need:</p><ul><li>Customised scoring algorithms for token evaluation</li><li>Advanced social sentiment analysis</li><li>Automated trading execution based on your specific criteria</li><li>Real-time notifications to public or private Telegram channels / Discord servers</li><li>Integration with 3rd party trading platforms for actual trade execution</li><li>Price action analysis and pattern trading</li><li>Historical data analysis and pattern recognition</li></ul><h4>Collaborative opportunities</h4><p>I’m passionate about helping traders automate their strategies and would love to collaborate with you.</p><p>I will be happy to help you customise this bot or any others you’re working on. I can help you to implement unique trading indicators, build additional data analysis tools, create advanced notification systems, multi-token tracking systems or customise anything to your requirements.</p><h4>Connect with me</h4><p>I’m always excited to discuss new ideas or work on a bespoke project for you. You can reach me through:</p><ul><li><strong>Telegram</strong>: <a href="https://t.me/real_p05h">https://t.me/real_p05h</a></li><li><strong>X (Twitter)</strong>: <a href="https://x.com/real_p05h">https://x.com/real_p05h</a></li><li><strong>Email</strong>: drop me an email at <a href="http://p05h@p05h.com/">p05h@p05h.com</a></li><li><strong>GitHub</strong>: <a href="https://github.com/realp05h">https://github.com/realp05h</a></li><li><strong>Medium</strong>: just follow me here for more articles or message me directly / leave comments below.</li></ul><h4>Final thoughts</h4><p>Remember, successful trading automation is an iterative process. Start with the foundations (like what I have provided for you here), learn from the data it provides, then gradually build up towards more sophisticated strategies. It’s a totally addictive and exhilarating journey once you embark on it, and I’m here to help you along every step.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac65a430cf29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sophisticated Telegram Based Scam Designed to Fool Fragment Users]]></title>
            <link>https://medium.com/@p05h/sophisticated-telegram-based-scam-designed-to-fool-fragment-users-7d06334db111?source=rss-d2a741448dc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d06334db111</guid>
            <category><![CDATA[russian-hacking]]></category>
            <category><![CDATA[telegram]]></category>
            <category><![CDATA[telegram-scam]]></category>
            <category><![CDATA[crypto-scam]]></category>
            <category><![CDATA[scam]]></category>
            <dc:creator><![CDATA[p05h]]></dc:creator>
            <pubDate>Sun, 17 Nov 2024 15:16:19 GMT</pubDate>
            <atom:updated>2025-02-07T17:00:29.238Z</atom:updated>
            <content:encoded><![CDATA[<p>In the early hours of Tuesday 12th November 2024 I was checking out the listing for an auction I’m running on <a href="https://fragment.com/">Fragment </a>— the marketplace which allows Telegram users to buy and sell collectable usernames and phone numbers — when all of a sudden a message popped up from a stranger asking if my username was for sale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_UBXhS98tdlIv7rg514ppg.png" /><figcaption>@aviatora — the first and most sophisticated of many scammers to approach me regarding my Telegram username.</figcaption></figure><p>I replied “yes” stating that there was already a very generous bidder for it who’d kindly offered 180 TON (~$1,000 USD at time of writing). I informed them that if they would like to place a bid then they were more than welcome to do so on Fragment. Moments later they made me this offer directly in our chat:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*1Iu1_Is_I06I-H6707sfaA.jpeg" /><figcaption>At more than 5x the offer I already had, it piqued my curiosity!</figcaption></figure><p>My existing bidder had originally approached me saying that he was representing a crypto business and that my username was one of several they needed to collect because it was in alignment with their brand. He’d provided me with all the proof I needed and walked me through the process of setting up the listing on Fragment as it was my first time selling on there. It made perfect sense as there was a clear motivation for him buying my username and I know that his organisation has deep pockets, so his kind offer didn’t seem too outlandish. On the other hand, this random Aviatora character had no clear motivation for buying my obscure username at 5x the current bid, so I instantly smelt a rat.</p><p>At first glance it seemed that the link they’d provided as proof of their bid was legitimate, but upon right clicking and inspecting the destination it was clear that it directed to a Telegram bot as opposed to Fragment’s site.</p><h3>🚨They’d messed with the wrong guy!🚨</h3><p>It was about 2am at this point but I wanted to keep them on the hook and couldn’t resist doing some digging, so I fired up Kali Linux on my VM and got to work.</p><p>The link was pointing here: <a href="https://t.me/FragmentOffersRoBot/start?startapp=username_menelaus_trojan_price_1000">https://t.me/FragmentOffersRoBot/start?startapp={MY_USERNAME_FOR_SALE}_price_1000</a> (edited out my username there)…</p><p>It looked doubly fishy as they’d capitalised that ‘B’ in ‘RoBot’ which suggests their intended username was already taken or burned from previous scamming work.</p><p>Upon clicking the link in my safe Kali security lab it loaded a Telegram Mini App.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XKtWrGeciJtC30DQZUYo5w.png" /><figcaption>The interface of the Mini App closely resembling the real Fragment auction page, but with subtle differences.</figcaption></figure><p>In the above image you can see that the interface closely matches that of a specific username auction page on Fragment. While all the fields look broken and glitchy here, the clever thing about the extension to their URL ‘<a href="https://t.me/FragmentOffersRoBot/start?startapp=username_menelaus_trojan_price_1000">start?startapp={MY_USERNAME_FOR_SALE}_price_1000</a>&#39; was that it actually populated all the fields correctly in their app with my username and their fantastical bid of 1,000 TON.</p><p>However, the subtle but important difference with their version was that it included that ‘Accept the offer’ button. This is not a feature of a Fragment auction. Normally, the vendor has to wait for the seven day auction period to complete before the highest bidder is awarded your username.</p><p>I can clearly see how this scam would work so well on unsuspecting users, though. Preying on peoples’ greed is a powerful technique. If you’ve already got a bid on there and someone offers you considerably more than the asking price, then suddenly you see the option to accept the offer and close the deal immediately, I’m sure many would jump at the opportunity.</p><h4>Of course, what actually happens is that you connect your TON wallet to their dodgy backend and you are instantly rinsed of all your funds. <a href="https://emojipedia.org/person-facepalming">🤦</a></h4><h3>Digging Deeper</h3><p>Sniffing the network traffic with Burp Suite showed me that the Mini App was being fed from this website:</p><p><a href="http://fragmentauctions.lol/">http://fragmentauctions.lol</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sg2JsxqAzkhiT89cJ40TrQ.png" /><figcaption>What <a href="http://fragmentauctions.lol/">http://fragmentauctions.lol</a> shows when visiting directly from a browser.</figcaption></figure><p>It’s since been removed and when visiting directly from a normal browser you get the standard phishing warning above.</p><p>Their site was hosted with these <a href="https://zomro.com/">Zomro</a> guys currently based here (Fokkerweg 300, 1438 AN Oude Meer, Netherlands).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xujpX-9wuYT6kAxVL1DnTg.png" /><figcaption>The hosts of <a href="http://fragmentauctions.lol/">http://fragmentauctions.lol</a></figcaption></figure><p>A pretty dodgy, B-rate looking hosting company, to be honest. Started in Ukraine, so probably a haven for scams?</p><blockquote>Slava Ukraini, guys!</blockquote><p>The registrant for the domain was clearly a Russian, though:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*kRmBrHoFOiM53Fy0P9chmA.png" /><figcaption>No surprises there!</figcaption></figure><p>The other piece of evidence at this stage that supported the Russian origin was that from my sniffing I could see that the backend of <a href="http://fragmentauctions.lol/">http://fragmentauctions.lol</a> was also talking to another site <a href="http://mamkasubacheva.pics/">http://mamkasubacheva.pics</a> (which throws a 404 when you visit it directly), clearly some sort of Slavic name.</p><h3>Following the Money</h3><p>Turning my attention to the TON crypto wallet that was to be on the receiving end of the scam:</p><p><a href="https://tonscan.org/address/UQB33wP5PbYA5kW9ClswlBF4np5AMaYW59YVRMSCGVsoMjci#tokens">https://tonscan.org/address/UQB33wP5PbYA5kW9ClswlBF4np5AMaYW59YVRMSCGVsoMjci#tokens</a></p><p>I could see that it contains around <strong>$165,000! </strong>spread across various tokens.</p><p>Looking at the history it seems that they aren’t being very smart about covering their tracks, though. They’re clearly using this wallet for all manner of shitcoin trading and ongoing scamming.</p><p>Where it gets interesting, is if you Google the wallet address, the first result that appears is relating to a token for a game launch on DYOR.io.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NqH1sJjQu3nF47xxhPeoiA.png" /><figcaption>Game Hunters token presale on DYOR (<a href="https://dyor.io/presale/gamehunters">https://dyor.io/presale/gamehunters</a>).</figcaption></figure><p>Looks like the first investor in the presale for this token was our scammer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eO8tKSpwaZU67rTqaxrjVQ.png" /></figure><p>I’m not entirely familiar with the workings of DYOR, but typically, the first buyer for a token is the dev. Certainly that’s the case on most platforms for shitcoins. SOL based Pump.fun being a perfect example where the dev gets first dibs.</p><p>Looking into the socials connected to this game we can see on Telegram the principal channel listed is the Russian language version with 12,700 members and they have an English version too with 28,000 members.</p><p>Looking at the X profile for this game (<a href="https://x.com/gh_jetton">https://x.com/gh_jetton</a>), we can see that the publisher is called Ton Ton Games. They’re a relatively recent startup focused on incubating and launching Telegram based games. It’s run by a Russian guy called Daniil Shcherbakov (<a href="https://www.linkedin.com/in/shcherbakovds/">https://www.linkedin.com/in/shcherbakovds</a>) currently living in Cambridge, UK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KlPG40SfAgeXIoRapJltbg.png" /><figcaption><a href="https://tonton.games/">https://tonton.games</a></figcaption></figure><h3>Final Thoughts</h3><p>In conclusion, if it is the case that the first investor for the presale of one of Ton Ton’s first game launches was our scammer and its dev (he’s clearly a fairly sophisticated developer to have built that fraudulent Fragment clone), then Daniil needs to improve his due diligence and vet his team better… or, perhaps he himself has some explaining to do?</p><p>It could of course be a coincidence that the first investor of the Game Hunters token was our scammer — they might have just happened upon the game launch and snapped up the first tranche of tokens right away. It could also be a coincidence that the registrar of tonton.games is the notorious <a href="https://www.nytimes.com/2024/10/09/business/iceland-online-disinformation-identity-theft.html">Kalkofnsvegur 2 of Reykjavik</a>, an organisation infamous for protecting the anonymity of phishing sites and ransomware operators across the globe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ou0_Z5ib8heS_N2TualyUQ.png" /><figcaption>Whois for Ton Ton</figcaption></figure><p>PS. It looks like our scammer has popped up with the same scam on another couple of domains (they haven’t even bothered to use a new TON wallet address! 🤣):</p><p><a href="https://csrt.site/"><strong>https://csrt.site</strong></a><strong><br></strong><a href="https://fragmentcom.shop/"><strong>https://fragmentcom.shop</strong></a></p><p>Hosted with Lithuanian based <a href="https://www.hostinger.com/">Hostinger</a> on the first and Zomro again on the second.</p><p><strong>BE SURE TO READ MY LATEST ARTICLE ON A FOUNDATIONAL APPROACH TO BUILDING TRADING BOTS FOR PUMPFUN</strong>:<br><a href="https://medium.com/@p05h/building-your-first-proper-pumpfun-trading-bot-with-python-a-foundation-for-automated-token-mint-ac65a430cf29">https://medium.com/@p05h/building-your-first-proper-pumpfun-trading-bot-with-python-a-foundation-for-automated-token-mint-ac65a430cf29</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d06334db111" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>