I configured a crypto trading bot to buy crypto based on Reddit post sentiment from
#1
I configured a crypto trading bot to buy crypto based on Reddit post sentiment from

<!-- SC_OFF --><div class="md"><p>I mainly built this for fun, and as a coding challenge, as I'm not sure how viable it would be to base my investing decisions based on the Reddit hive-mind. But having said that, I will test the tool out and see what it can do - who knows, maybe among all the shills and moon-farmers is where insight truly lives.</p> <p>&#x200B;</p> <p><strong>Here's a little bit about how it works:</strong> </p> <p>It's a trading bot that analyses reddit post sentiment and automatically buys the coins mentioned in the post. So it checks if the post title and body talk positively about x coin, and if that's the case it goes ham on that coin.</p> <p>But it only does this for coins I tell it to look out for: by default it will only check BTC and ETH but you can add any number of keywords. This is built in to discourage shill exploits.</p> <p>&#x200B;</p> <p>It also comes with several customisation options so you can choose how you want to use this:</p> <ol> <li>Which subreddits it should look for (by default it checks <a href="https://www.reddit.com/r/Cryptocurrency/">r/Cryptocurrency</a> and a couple others)</li> <li>How to sort posts (hot by default)</li> <li>How many posts from each sub will be analysed (by default 10)</li> <li>What keywords it should be looking out for (default: Bitcoin and Ethereum)</li> <li>&#x200B;</li> </ol> <p>You can also specify how often to check for posts, as well as the size of each trade placed.</p> <p>I added a test mode so it can just simulate trades, so you can see how it would work in a live market, but without using real funds.</p> <p>&#x200B;</p> <p>I just let it run in test mode now and here's the output:</p> <p><code>New posts detected, fetching new posts...</code></p> <p><code>Found matching keywords with the following sentiments: {'BTC': 0.01482083333333333, 'ADA': 0.0}</code></p> <p><code>BTC sentiment is positive: 0.01482083333333333, preparing to buy...</code></p> <p><code>PLACING TEST ORDER</code></p> <p><code>Order created with 0.000439 on BTC</code></p> <p><code>Sentiment for ADA is negative or ADA is currently in portfolio</code></p> <p>Here's my test order stored locally so that I can track the results. It bought Bitcoin hah.</p> <p><code>{</code></p> <p><code>&quot;BTC&quot;: {</code></p> <p><code>&quot;symbol&quot;: &quot;BTCUSDT&quot;,</code></p> <p><code>&quot;price&quot;: &quot;34170.99000000&quot;,</code></p> <p><code>&quot;volume&quot;: 0.000439,</code></p> <p><code>&quot;time&quot;: 1624904258.977829</code></p> <p><code>}</code></p> <p><code>}</code></p> <p>You can also change the pairing to something other than USDT Wink</p> <p>&#x200B;</p> <p>And here's an example of how posts are being stored:</p> <p><code>{&quot;title&quot;: &quot;SafeDollar \u2018stablecoin\u2019 drops to $0 following $248 million DeFi exploit on Polygon&quot;, &quot;subreddit&quot;: &quot;Cryptocurrency&quot;, &quot;body&quot;: &quot;&quot;},</code></p> <p>It has no body as it's a link. Though you can see that it ignored SafeDollar and only picked BTC and ADA as these are two of the keywords I have chosen for it.</p> <p>&#x200B;</p> <p>The bot will also stop from buying or analysing posts while the same posts are in top/hot, to avoid re-buying on the same signal.</p> <p>&#x200B;</p> <p>Here's the GitHub repo for the project:</p> <p><a href="https://github.com/CyberPunkMetalHead/reddit-cryptocurrency-trading">https://github.com/CyberPunkMetalHead/reddit-cryptocurrency-trading</a></p> <p>And I also made a guide on how to set this up and get it running if you need more info:</p> <p><a href="https://www.cryptomaton.org/2021/06/27/cryptocurrency-binance-trading-bot-that-analyses-reddit-sentiment/">https://www.cryptomaton.org/2021/06/27/cryptocurrency-binance-trading-bot-that-analyses-reddit-sentiment/</a></p> </div><!-- SC_ON --> submitted by <a href="https://www.reddit.com/user/CyberPunkMetalHead"> /u/CyberPunkMetalHead </a> <br/> <span><a href="https://www.reddit.com/r/CryptoCurrency/comments/o9qasc/i_configured_a_crypto_trading_bot_to_buy_crypto/">[link]</a></span> <span><a href="https://www.reddit.com/r/CryptoCurrency/comments/o9qasc/i_configured_a_crypto_trading_bot_to_buy_crypto/">[comments]</a></span>Kind Regards R
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Crypto Biz: PayPal’s stablecoin goes live, Bitstamp seeks capital, and Coinbase’ Dato 0 196 08-12-2023, 06:50 AM
Last Post: Dato
  Troubled Crypto Custodian Prime Trust Might Cut 75% of Jobs: Report Andy 0 272 08-11-2023, 08:10 PM
Last Post: Andy
  5 things crypto must get right for mainstream adoption to happen Dato 0 191 08-11-2023, 08:10 PM
Last Post: Dato
  TradFi shifts perspectives on crypto assets Dato 0 195 08-11-2023, 08:10 PM
Last Post: Dato
  Bitcoin futures open interest at 2023 high while BTC trading volume at yearly low ? Dato 0 121 08-11-2023, 08:10 PM
Last Post: Dato



Users browsing this thread: 1 Guest(s)