Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Scripts for adding liquidity and making swaps on raydium.io

NotificationsYou must be signed in to change notification settings

Tee-py/raydium-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This script facilitates the swapping of tokens and adding liquidity to markets on the Raydium.io decentralized exchange. It's designed to work with the Raydium pools and liquidity markets.

Prerequisites

  • Node.js installed on your machine
  • ts-node installed
  • A valid JavaScript environment

Setup

  1. Clone the repository:

    git clone<repository-url>cd<repository-directory>
  2. Install dependencies:

    npm install
  3. Generate Keys for buying and adding liquidity to thekeys/ folder in this repository

  4. Edit theMARKET_ID constant in of thesrc/fetchMarketInfo.ts file with the appropriate market ID for the pool on raydium

  5. runnpm run fetchMarket to download the market data atpool_info/<market_id>.json

  6. Configure your script by editing the script file (src/main.ts). Update the following variables at the beginning of the script:

    constTOKEN_TO_BUY_MINT="<TOKEN MINT ADDRESS TO BUY>";constSWAP_AMOUNT="<AMOUNT OF TOKEN TO SWAP>";constSWAP_SLIPPAGE="SLIPPAGE TOLERANCE FOR SWAP";constLIQUIDITY_INPUT_TOKEN_MINT="<INPUT TOKEN MINT ADDRESS FOR LIQUIDITY>";constLIQUIDITY_INPUT_TOKEN_AMOUNT="<LIQUIDITY TOKEN INPUT AMOUNT>";constLIQUIDITY_SLIPPAGE="<LIQUIDITY SLIPPAGE>";constPOOL_MARKET_ID="<MARKET ID OF THE POOL ON RAYDIUM>";

Usage

To execute the script:

npm run script

The script will connect to the Raydium mainnet RPC, perform the specified swap and liquidity addition, and log the result.

Important Note

  • Ensure that your wallet and necessary private keys are securely configured in the environment where the script is run.
  • Be cautious when adjusting slippage values, as they affect the likelihood of transaction success.
  • Double-check token mints and market IDs to match your specific use case.

Happy Hacking 🇳🇬🚀🤖

About

Scripts for adding liquidity and making swaps on raydium.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp