yajirobe is a script to rebalance cryptocurrency assets. Amount of fiat and cryptocurency are adjusted to 50%.
Liquid by FTX- bitbank
- GMO Coin
This repository uses Github Actions to run rebalancing script regularly.
-
Fork this repository to your account.
-
Add secrets for Github Actions (Settings -> Secrets -> Actions).
SECRET NAME OPTIONAL CONTENT API_KEY No Your API key of the exchange you want to rebalance. API_SECRET No Your API secret of the exchange you want to rebalance. SLACK_WEBHOOK_URL Yes Slack Webhook URL. Set value if you need to send a notification about result of process. -
Edit rebalance.yml to setup a rebalance job.
a. Change a running schedule. The execution schedule can be specified in cron format. Default setting is to run script every hours.
on: schedule: - cron: '0 */1 * * *'
-
Edit a command to run script according to your needs.
- name: Run run: pipenv run rebalance -e EXCHANGE -s SYMBOL
EXCHANGE
is exchange's name such as gmo, bitbank.SYMBOL
must be specified by two coin names with slash in between such asBTC/JPY
. Symbols can be specified depend on each exchange.e.g.
# Rebalancing 'BTC/JPY' on GMO Coin. - name: Run run: pipenv run rebalance -e gmo -s 'BTC/JPY'
-
Clone this repository.
-
Create .env file and add secrets into file.
-
Run pipenv rebalance.
pipenv run rebalance -e EXCHANGE -s SYMBOL
If you want to regulary run scirpt on your local machine, you need to use job management system such as cron.