Trading Bot

The Funttastic Labs team has built an open source trading bot template (written in Type Script) for RUJI Trade orderbook DEX:

Instructions

Prerequisites

  • Unix-like operating system (Linux, macOS) or, for Windows, Windows Subsystem for Linux (WSL)

  • Latest version of Bun

  • Keplr wallet and access to your wallet mnemonic or private key from Rujira

  • Funds in the gas payment token (RUNE), and in your desired base and quote tokens (ex.: RUJI/USDC)

  • A Rujira GraphQL API authentication token (see below)

Installation

git clone https://github.com/funttastic/barracuda-hft.git
cd barracuda-hft

./setup

When prompted, provide your wallet mnemonic or your wallet private key, or configure them directly in your resources/configuration/production.yml file.

Running

Review all configurations in resources/configuration (the documentation is present in local there). Pay special attention to the rujira.wallet and strategy sections, and double-check that all parameters are tailored to you.

IMPORTANT: The Rujira GraphQL API has restricted access; you will need an authentication token to use it. Contact the Rujira team at [email protected] or Funttastic via Discord to request one.

Configure it in the rujira.tokens.graphql section of your production.yml configuration file.

Then run:

./start

or

bun run start

Disclaimer: This application is provided as a bootstrap for HFT strategies. You are solely responsible for your trading decisions and financial outcomes. Cryptocurrency trading involves substantial risk, including the potential loss of your entire investment. Funttastic and Rujira are not responsible for any financial losses, bugs, or technical issues. Use at your own risk and only invest what you can afford to lose.

FAQ

Question: How do I resolve an error like GraphQL errors: [{"message":"rate bucket full (5000). bucket drains 500/s.\ncontact [email protected] to increase your limit.\n","path":["node"],"locations":[{"line":3,"column":7}]}]? Answer: You have reached the Rujira GraphQL API rate limit. You will need to wait for it to reset or, preferably, request an authentication token by contacting Rujira at [email protected] or Funttastic via Discord.

Question: How do I reset the strategy state (for example, the initial balances used for comparison and PnL calculations)? Answer: Delete the file resources/database/database.sqlite, which stores the strategy state. Optionally, also delete the log files in the logs folder.

Question: How to contact the Funttastic team? Answer: Join Rujira's Discord and ask for support in the #barracuda-hft-bot dedicated channel.

Last updated