StarkShift is an arbitrage bot for the StarkNet ecosystem, designed to take advantage of price differences between centralised and decentralised exchanges.
There are two methods to install and run StarkShift:
StarkShift uses the starknet.py library, which has some external dependencies.
Before proceeding with the installation, please refer to the starknet.py
installation
guide to ensure
all prerequisites are met.
- Ensure you have Python 3.12+ and Poetry are installed
- Clone the repository:
git clone https://github.com/Oghma/StarkShift.git cd starkshift
- Install project dependencies:
For MACOS users, add the flags before the command:poetry installCFLAGS=-I`brew --prefix gmp`/include LDFLAGS=-L`brew --prefix gmp`/lib poetry install
- Ensure you have Docker installed on your system.
- Clone the repository:
git clone https://github.com/Oghma/StarkShift.git cd starkshift
- Build the Docker image:
docker build -t starkshift .
Before running StarkShift, you need to configure it:
- Edit config.yamlwith your specific settings:- Set your StarkNet node URL (node_url)
- Configure your base and quote tokens
- Set your exchange API keys (api_key,secret_key)
- Configure your StarkNet account (account_address,signer_key)
- Adjust trading parameters:
- max_amount_trade: maximum amount the bot is allowed to trade
- min_amount_trade: minimum amount the bot is allowed to trade
- spread_threshold: Threshold spread must exceed to consider trade profitable
 
 
- Set your StarkNet node URL (
- Run the bot:
poetry run python -m starkshift [path_to_config]
- Run the Docker container, mounting your configuration file:
docker run -v $(pwd)/config.yaml:/app/config.yaml starkshift
This command mounts your local config.yaml file into the Docker container,
ensuring that your configuration is used when running the bot.