Skip to content

πŸ” A Go-based tool for tracking BRC20 collections on Unisat. Monitors floor prices, detects changes, and sends Discord notifications for potential trading opportunities.

Notifications You must be signed in to change notification settings

zeroaddresss/unisat-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ Unisat Monitor

Table of Contents

πŸš€ Introduction

This project is an enhanced, Go-implemented version of the unisat-monitor repository.

This tool is designed to track the status of BRC20 collections on Unisat, by monitoring the floor price of collections and detecting price changes. It can offer competitive advantages for trading activities, by sending Discord webhook notifications when the bot detects a listing priced significantly below the current floor.

I rewrote the NodeJS codebase from scratch in Go to gain proficiency in Golang programming. Indeed, this project has been a great practice to understand Go's coding philosophy, core language constructs, and idiomatic Go practices.

πŸ” Project Overview

Developed in April, during a period of high interest in trading BRC20 collections on Bitcoin, this tool has proven valuable in detecting and capitalizing on pricing errors (listings mistakenly priced too low) ahead of other traders. Initially, the ultimate goal of this project was to evolve it by:

  1. Extending support to the highly anticipated Runes protocol
  2. Creating a sniper bot that would automatically purchase mispriced listings, without the need for any user interaction to manually purchase them

However, the interest in BRC20 tokens quickly faded, and I decided to stop because the product did not meet any market needs. Nonetheless, pull requests for implementing the mentioned functionalities are welcome and greatly appreciated.

✨ Features

This Go-based version offers enhanced functionality compared to its NodeJS counterpart:

  • Parallel monitoring of multiple collections leveraging goroutines
  • Improved logging
  • Enhanced error handling
  • Cleaner and well-structured codebase

🏁 Getting Started

Prerequisites

  • Golang installed on your system
  • Unisat API key(s)

πŸ”‘ API Key Information

The program relies on the Unisat API to retrieve data. While it's technically possible to make the bot work without API keys (using web scraping), this project uses official Unisat API keys for ethical and legal reasons.

Indeed, one or more API keys are required for proper functionality. Unisat's free tier allows up to 10,000 requests per day. If multiple API keys are provided, the bot will shuffle and use them alternately to distribute requests evenly across the available keys. To obtain an API key, you can contact Unisat via email or Telegram.

βš™οΈ Configuration

Before running the bot, user must populate the config.json file with the desired monitoring parameters, according to their preference.

πŸ“¦ Installation and Usage

  1. Verify that Go is correctly installed on your machine:

    go version
  2. Clone the repository:

    git clone https://github.com/zeroaddresss/unisat-monitor.git
    cd unisat-monitor
  3. Run the program:

    make run

    This uses the shortcut defined in the Makefile. Alternatively, you can use:

    go run cmd/unisat-monitor/main.go
  4. (Optional) Create a binary executable:

    make build
    ./bin/unisat-monitor
  5. (Optional) Clear the bin directory:

    make clean

πŸŽ₯ Demo

demo

The bot can catch opportunities with great profit margins: over multiple days of monitoring, the greatest opportunity recorded (in terms of %) was the following, with a listing mistakenly placed at a price 90% lower than the floor price:

Screenshot 2024-07-03 alle 14 23 48

🀝 Contributing

Contributions to improve the tool are welcome. Please feel free to submit pull requests or open issues for bugs and feature requests.

⚠️ Disclaimer

This tool is for educational and research purposes only. Users are responsible for ensuring their use complies with Unisat's terms of service and all applicable laws and regulations.

About

πŸ” A Go-based tool for tracking BRC20 collections on Unisat. Monitors floor prices, detects changes, and sends Discord notifications for potential trading opportunities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published