This is a Node.js application that interacts with Binance Smart Chain (BSC) and Paloma Chain to automatically execute limit orders. It makes use of the PancakeSwap and Uniswap V3 protocols for creating and managing these limit orders.
- Clone this repository:
git clone https://github.com/VolumeFi/limit-order-bot-script
- Navigate into the project directory:
cd limit-order-bot-script
- Install the dependencies:
npm install
You will need to set the following environment variables:
PALOMA_KEY
: The private key of the Paloma walletPALOMA_LCD
: The URL of the Paloma LCDPALOMA_CHAIN_ID
: The ID of the Paloma chainLOB_CW_CODE_ID
: The code id of the Limit Order Bot CosmWasmSLIPPAGE
: The slippage rateSENTRY
TELEGRAM_ID
: The ID of the Telegram botPORT
COINGECKO_API_KEY
And you will need to set configuration in networks.json
:
NODE
: The URL of the EVM chain nodeABI
: The ABI for the Limit Order Bot contractVYPER
: The address of the Limit Order Bot contractJOB_ID
: The job id of the Paloma jobCHAIN_TYPE
: Chain type. "evm" for EVM chainsCHAIN_REFERENCE_ID
: Chain reference id in PalomaCOINGECKO_CHAIN_ID
: Chain identifier in Coingecko APINETWORK_NAME
: Network name on which the limit order botWETH
: Wrapped basecoin ERC20 token addressFROM_BLOCK
: The starting block of the Limit Order Bot contractCW
: The address of the Limit Order Bot CosmWasm
Run the program: node index.js
The Telegram bot notifies users when their swaps are completed.
The application also provides an API endpoint (/robots
) which returns all the limit orders in the system.
This application uses SQLite to store and manage limit orders and users.
This Python application uses the Paloma SDK to interact with the Binance Smart Chain (BSC) and PancakeSwap to automatically execute limit orders. It makes use of the PancakeSwap's Limit Order Bot for creating and managing these limit orders.
You need Python 3.8 or above installed on your machine.
pip install -r requirements.txt
After setting the environment variables, you can run the bot using the following command:
python3 main.py
The bot will initialize, create a job on PancakeSwap's Limit Order Bot, and then instantiate a contract to execute the limit order job. The result of each operation will be printed to the console.
This bot uses the asyncio and uvloop libraries for asynchronous execution, and the web3 library for interacting with the Ethereum-based BSC. It also uses the os and dotenv libraries to read environment variables and the json library to parse the ABI.