Code Monkey home page Code Monkey logo

jupgrid's Introduction

Jupgrid: Decentralized Grid Trading Bot Version 0.5.2 Beta

GitHub last commit GitHub issues GitHub number of milestones GitHub stars Twitter Follow

JupGrid is a cutting-edge, fully decentralized cryptocurrency grid trading bot designed to operate on the Jupiter Limit Order Book. It runs locally on your machine, offering a secure and personal way to automate a grid trading bot. This bot places 1 buy and 1 sell order at a time, meaning you can be more capital-efficient!

Use of this bot/script is at your own risk. Use of this bot/script can lead to loss of funds, so please exercise proper due diligence and DYOR before continuing.

Table of Contents

Features โœจ

  • Fully Decentralized Trading: Operates on the Jupiter Limit Order Book, ensuring full control over your trading data and strategy. Jupiter Limit Order Book
  • Local Operation: Runs on your own machine or a VPS, providing an additional layer of security and privacy.
  • Simple Grid Strategy: Places one buy order and one sell order based on user-defined parameters, optimizing for market conditions, whilst being capital efficient.
  • Easy Setup: Comes with a straightforward installation and setup process, including auto-creation of necessary user files.
  • User Prompted Parameters: Dynamically prompts the user for trading parameters, allowing for flexible and responsive trading setups.

Installation ๐Ÿ”ง

Download the source code by cloning it:

git clone https://github.com/ARBProtocol/jupgrid
npm install

Usage ๐Ÿš€

  1. Initial Setup: Run Jupgrid for the first time to create the necessary user configuration files:
    node .

This will generate a .env file where you will fill in your secure data.

  1. Configuration: Open the .env file in a text editor and input your Phantom wallet Private Key, and the URL to your RPC.

  2. Encryption: Start Jupgrid with node . again. This time you will be prompted to enter a password to locally encrypt your private key and RPC connection.

  3. Start JupGrid! Start JupGrid a 3rd time with node . and this time you will be prompted to enter the password you entered previously. You will then be show the start-up prompts, which allow you to modify the following parameters:

    • Token A:
    • Token B:
    • Infinity Target Value: (Maximum $ value of Token B you want to hold - Dont set this higher than your TokenA+B value!)
    • Spread (% difference from current market price to orders):
    • Stop Loss ($ value for BOTH Token A and Token B - If your wallet hits this value, the script will stop for safety)
    • Delay (This is used to stop you getting rate-limited by Jupiter API. JupGrid is a "slow" bot, and thus doesnt need information every second).

Jupgrid will then place one buy and one sell order based on the parameters you have set.

Configuration โš™๏ธ

The .env file will need to contain your Phantom Wallet Private Key and URL to your RPC connection. Ensure you fill it out before running the bot for the second time:

  • RPC_URL=YourRPCURLHere
  • PRIVATE_KEY=YourPrivateKeyHere

Once these are encrypted, they are no longer human-readable. Please ensure you have other copies of this information saved elsewhere.

There will also be a userSettings.json file created. This will contain data on the parameters you set during setup.

Contributing ๐Ÿค

We welcome contributions from everyone! To contribute:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Create a new Pull Request
  6. โค๏ธ

Follow us on Twitter: @arbsolana for more updates.

License ๐Ÿ“„

This project is licensed under the MIT License - see the LICENSE file for details.

jupgrid's People

Contributors

arbcaptain avatar ashes1away avatar astroorbis avatar spuddya7x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jupgrid's Issues

Stoploss

Integrate a stoploss feature to prevent users from incurring excessive losses.

Layer Calculation Redesign

Redesign Layer calculations to be created at bot start, and saved locally, rather than dynamically when price shifts. Risk of improper grid trades if price shifts between close/open trades.

Rebalancing

Add a rebalancing function for the bot. After X trades, the market moves a certain direction for too long, or the user runs out of funds to continue trading, rebalance the users funds to 50/50 to continue.

Use portfolio % for orders

Use a percentage of the holdings to place orders rather than a fixed amount. This will allow the bot to scale and grow as the market changes.

Infinity Grid

Create an infinity grid function, where the user sets a lower boundary price, and a fixed value of X token. Balancing the bot will keep the target token at that fixed value, while minimising risk with the lower boundary price. At boundary price, the user will have an option to automatically "abort" and swap all their holdings to a stablecoin.

Limit Token A Selection

Limit token A selection to a few common trade tokens. This will assist with routing, trades and other factors, streamlining the process.

Password error

(node:6597) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use node --trace-warnings ... to show where the warning was created)
(node:6597) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
Env Loaded Successfully.

Enter your password to decrypt your private key (input hidden):
Invalid password. Please ensure you are using the correct password.

SyntaxError: Unexpected identifier - at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)

Hi,
running "node ." I got the following error.
I am not a Java programmer.
Any hint on what might be the reason ?

$ node .
file:///home/palmer/Downloads/EXTRACT/jupgrid/src/jupgrid.js:13
import packageInfo from '../package.json' assert { type: 'json' };
^^^^^^

SyntaxError: Unexpected identifier
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)

Local Encryption

Add a function to encrypt the private key and RPC connection, rather than saving as plaintext.
We all have to do our bit for security! ๐Ÿ˜‰

fail transaktion many !

โœ– Attempt 2 - Error in transaction: failed to send transaction: Transaction simulation failed: Error processing Instruction 2: invalid account data for instruction, Full error: {} many many fails

Token Balance Delta Change

Create a display for token balance delta change.

Create sum of token balance increase or decrease for users to track token change performance.

Refactor

Refactor Jupgrid.js to improve development and future manageability.

Local Webhost Server

Add locally hosted server for remote web access/monitoring (Longer Term Project)

Improper Order Scaling

Stop the exponential growth of orders after one has been taken. Each order is larger than the last, resulting in not having enough tokens to trade eventually.

Add Priority Fees

Add Priority Fees to order placements, allowing them a higher chance of success.

Correct Profit Tracking

Correctly interpret which limit order has closed and retain information of the swap inside to adjust user balances, rather than relying on wallet snapshots.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.