PeakeBot + Trading Bot Update w/ NectarEngine

in #peakecoin3 days ago

We’ve pushed a fresh batch of updates to the PeakeCoin backend — focused on automation, transparency, and decentralized deployment. So I'm a just show you what I've had going on.

With all this work I'm still having issues with the canceling of orders so new ones can be filled. I may need some eyes @thecrazygm but it may take me a few days.


✅ Code Changes & Feature Additions

peake_bot.py

  • ➕ Added: SPREAD_PERCENT = 1.0

    • Controls buy/sell distance from the market price.
    • Dynamically calculated:
      buy_price = round(last_price * (1 - SPREAD_PERCENT / 100), 4)
      sell_price = round(last_price * (1 + SPREAD_PERCENT / 100), 4)
      
  • 🪵 Logging Implemented

    • Logs every trade decision and response:

      logging.info(f"Market Price: {last_price} | Buy: {buy_price} | Sell: {sell_price}")
      logging.info(f"Buy Order Response: {buy_order}")
      logging.info(f"Sell Order Response: {sell_order}")
      
    • Output goes to trade_log.txt for each loop.

  • 🌐 FTP Upload

    • After each trade cycle, logs are pushed to GeoCities:
      upload_to_ftp("trade_log.txt", "trade_log.txt")
      

ftp_upload.py

  • 📂 Directory Target Changed

    • Upload destination switched to:
      FTP_TARGET_DIR = "/xlaswap"
      
  • 🛠️ Recursive Directory Creation

    • The script now ensures the target folder exists before upload:
      ensure_ftp_directory(ftp, ftp_dir)
      
  • Passive Mode Set

    • Fixes common connection issues by using:
      ftp.set_pasv(True)
      

🧠 Why This Update Matters

  • This makes PeakeBot’s market activity public and visible, with logs uploaded after every trade.
  • The system is headless and automatic — no manual login or confirmation needed.
  • Every part runs on a Raspberry Pi and uploads to GeoCities for full transparency.

🔮 What’s Coming Next

  • [ ] cancel_all_orders() — clean up stale orders before new ones
  • [ ] Multi-token rotation — auto-trade SWAP.LTC, PIMP, and PEK
  • [ ] In-game shop_watcher.js to link PEK trades to game purchases
  • [ ] Post daily trading summaries directly from PeakeBot to Hive
Sort:  

Upvoted! Thank you for supporting witness @jswit.