Cryptozaur saves your time by providing a unified command-line interface for cryptocurrency exchanges:
- Place orders without opening UI.
- Use simple automated trading strategies:
- Accumulate a lowcap altcoin by maintaining small buy orders within price range.
- Optimize your stop-loss by selling off your position in small chunks instead of dumping it immediately.
- List aggregated balances from all exchanges.
- Export trade history to CSV from all exchanges.
- Install Elixir
git clone https://github.com/DenisGorbachev/cryptozaur.git
cd cryptozaur
mix deps.get
mix reset
./cryptozaur add.account [EXCHANGE] [KEY] [SECRET]
Optional: add cryptozaur
directory to PATH
for easy invocation.
Recommended: encrypt ~/.cryptozaur
directory (guide).
First, get your API key & secret on credentials management page.
Second, execute the following commands:
cryptozaur add.account leverex [your_key] [your_secret]
cryptozaur get.deposit.address leverex BTC
BTC: [your_deposit_address]
### Send BTC to [your_deposit_address]
cryptozaur get.deposits leverex BTC
Amount Timestamp Confirmations TXID
0.5 2018-07-17 16:16:00 0 4b1613ae67ee0ebcd6f84d50f6d0d2eb4579e9c7f31c57cf79c333ba9a145c15
cryptozaur await.deposit leverex BTC
### Wait until dialog window appears per https://superuser.com/questions/31917/is-there-a-way-to-show-notification-from-bash-script-in-ubuntu
cryptozaur show.spread leverex LEX:BTC
Ask: 0.00006530 150.0
Bid: 0.00006510 35.5
cryptozaur buy leverex LEX:BTC 0.00006530 20
Buy 20.0 LEX at 0.00006530 BTC = 0.00130600 BTC (Filled 20.0 LEX) (Order ID: 43213253)
cryptozaur withdraw leverex LEX 20.0 0x4fdd5eb2fb260149a3903859043e962ab89d8ed4
Withdraw 20.0 LEX to 0x4fdd5eb2fb260149a3903859043e962ab89d8ed4 (Confirmations: 0) (Withdrawal ID: 138483)
### Wait until withdrawal is processed
cryptozaur show.withdrawal leverex 138483
Withdraw 20.0 LEX to 0x4fdd5eb2fb260149a3903859043e962ab89d8ed4 (Confirmations: 4) (Withdrawal ID: 138483)
Some exchanges have recently implemented "trans-fee mining". It's a profitable (although questionable) way of acquiring native exchange tokens via self-trade.
cryptozaur add.account coinex [your_key] [your_secret]
cryptozaur mine coinex ETH:BTC --single-order-amount 0.1 --budget 0.5
### This command will self-trade on ETH:BTC market by concurrently placing buy & sell orders for 0.1 ETH at the same price until the budget of 0.5 BTC is exhausted
You can automate your trading by running certain commands periodically via task scheduler:
- MacOS and Linux: Cron
- Windows 7 and below: Task Scheduler
- Windows 8 and above: Schtasks
For example, if you want to accumulate a lowcap altcoin, you can add the following line to crontab:
15 * * * * /usr/bin/cryptozaur accumulate --account tradeogre --market MSR:BTC --from-price 0.00005200 --to-price 0.00005800 --full-amount 190000.0 --visible-amount 10000.0 --order-count 10 >> /var/log/MSR.accumulate.log 2>&1
This command will run every 15 minutes, maintaining 10 buy orders summing up to 10000.0 MSR, spreading them evenly between 5200-5800 sats, until it accumulates 190000.0 MSR.
- Cryptozaur stores keys & secrets in
~/.cryptozaur/accounts.json
. We strongly recommend to encrypt~/.cryptozaur
directory! (guide)
account
- API key & secret pair (e.g. "leverex")market
- exchange partition that allows tradingbase
asset againstquote
asset (e.g. "ETH:BTC" spot market or "ETHM18" futures market).symbol
- unique identifier of the trading pair (e.g. "BINANCE:BNB:BTC") (format:"#{exchange}:#{base}:#{quote}"
)base
- asset being bought / sold (e.g. 1ST, AMP, PTOY)quote
- asset used for buying / selling (e.g. BTC, ETH)amount
- quantity of base asset (e.g. AMP)base_diff
- quantity of base asset affected by the order (to handle fees)quote_diff
- quantity of quote asset affected by the order (to handle fees)capital
- quantity of quote asset (e.g. BTC) managed by strategyrange
- prices frombottom
totop
frame
- timestamps fromfrom
toto
tick
- minimum price increment / decrementprecision
- minimum price / amount precision (e.g. "8" for most, but not all ALTBTC pairs, since BTC is divisible by 8 digits) (different fromtick
: e.g.tick = 0.5
,precision = 1
)
MacOS / Linux:
### Setup (run once)
mkdir -p ~/.cryptozaur.encfs ~/.cryptozaur
### Mount (run every time you want to use cryptozaur)
encfs ~/.cryptozaur.encfs ~/.cryptozaur
### Unmount (run after you finished using cryptozaur)
fusermount -u ~/.cryptozaur
Windows:
### Want to contribute? Click "edit" on top of this file.