Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/volumefi/twap_bot_python_script
https://github.com/volumefi/twap_bot_python_script
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/volumefi/twap_bot_python_script
- Owner: VolumeFi
- License: apache-2.0
- Created: 2023-03-13T16:05:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-28T19:38:14.000Z (5 months ago)
- Last Synced: 2024-08-28T21:18:48.259Z (5 months ago)
- Language: Python
- Size: 2.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PancakeSwap Bot
This repository contains scripts to interact with decentralized exchanges such as PancakeSwap, Uniswap, and Apeswap. The scripts utilize `web3` and `paloma_sdk` to connect with the blockchain and perform specific tasks.
## Setup
1. **Clone the repository** `git clone https://github.com/your-github-username/pancakeswap-bot.git`
2. **Navigate to the cloned directory** `cd pancakeswap-bot`
3. **Install dependencies** `pip install -r requirements.txt`## Environment Variables
The scripts rely on certain environment variables. To set them up, create a `.env` file in the project root with the following entries:
```
PALOMA_LCD=
PALOMA_CHAIN_ID=
PALOMA_KEY=
```Replace ``, ``, and `` with actual values.
## Network Configuration
The scripts use a `networks.json` file for network-specific configurations. This file should contain an array of objects, each representing a network. The networks are cycled through when the scripts are run.
Here's the structure of a network configuration:
```json
[{
"NODE": "",
"ABI": "",
"ADDRESS": "",
"JOB_ID": "",
"CHAIN_TYPE": "",
"CHAIN_REFERENCE_ID": "",
"COINGECKO_CHAIN_ID": "",
"NETWORK_NAME": "",
"WETH": "",
"FROM_BLOCK": "",
"CW": "",
"DEX": ""
}]
```
Replace the placeholders with actual values.## Running the Scripts
The following scripts are available:
bot_execute.py: Runs the PancakeSwap bot.
bot_init.py: Calls the triggerable deposit function and performs swaps if applicable.
bot_set_paloma.py: Executes a set_paloma command.To run a script, use the following command:
`python .py`