How to run the code #9
Unanswered
kanekoshoyu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone, I'm really glad to have received a lot of emails with people interested in this project. Top 1 question I get is how to run the code. I'll try explain as much as possible here first before updating on the README.
But before that, just to align the expectation, code is not complete yet. It can look for trading chances, but cannot do trades yet. These chances are risk free only if you can execute on it in time before other players in the market. If you are looking for a ready-to-run crypto bot with clear APR, there are quite a few offered by both the exchanges and other 3rd parties. This project is more like a opensource tool for us to research and build our own trading strategies and algorithm so that we have a full control on how a bot manages our own money. I will eventually add the trade execution part, but my progresses are quite slow as I am squeezing my after-work personal time into this.
1. Install Cargo
First, the code is in Rust and you need cargo to compile the rust code. Luckily cargo makes rust really easy to use compared to C++.
Open a terminal and install with the command below to intall.
curl https://sh.rustup.rs -sSf | sh
To check if cargo is installed properly, type
cargo -V
to check the version. You will use cargo to build, run or test the code.Reference:
2. Copy the KuCoin API Key
You need to logLog into https://kucoin.com, then to go "API Management", then "Create API". It should generate the public and private API keys and a passphrase.
Go back to the project, copy config.ini.example as config.ini, then replace the api_key, secret_key and passphrase with your API keys generated.
Reference:
3. Run the code
In the project root directory (at /kucoin_arbitrade), use
cargo run --bin BINARY_NAME_HERE
to build and run an executable binary. All the executable codes are in src/bin. I have src/bin/event_triangular.rs which looks for triangular arbitrage chance (I'm working on it in branch feature/btc-usdt-triangular).Reference:
Beta Was this translation helpful? Give feedback.
All reactions