Crates.io | kraken-btc |
lib.rs | kraken-btc |
version | 0.1.0 |
source | src |
created_at | 2021-01-14 13:29:38.799686 |
updated_at | 2021-01-14 13:29:38.799686 |
description | An opinionated command line interface for buying Bitcoin on Kraken.com. |
homepage | https://github.com/dnlggr/kraken-btc |
repository | https://github.com/dnlggr/kraken-btc |
max_upload_size | |
id | 341908 |
size | 49,245 |
An opinionated command line interface for buying Bitcoin on Kraken.com. Written in Rust.
This is a simple command line interface for buying Bitcoin on Kraken.com. The idea is to enable setups that make it easy to get your hands on some Bitcoin in an automated way. For example, you could use this in an Auto-DCA script.
I've always wanted to build something in Rust ๐ฆ so this was a good opportunity for me to learn how to do that.
Binaries for macOS are available through Homebrew and GitHub releases. For other platforms, it is recommended to build from source.
$ brew tap dnlggr/tap
$ brew install kraken-btc
$ brew untap dnlggr/tap
$ brew uninstall kraken-btc
You can find binaries for all releases on this repo's releases page.
To build from source, you must have Rust and Cargo installed.
$ cargo install kraken-btc
This will install a binary in your Rust installation root's bin
directory. Typically, this is $HOME/.cargo/bin
.
This is a short example on how to use kraken-btc
to spend 100 Euro on Bitcoin.
$ kraken-btc --api-key <...> --api-secret <...> buy --fiat-currency EUR --fiat-amount 100
You'll get a confirmation of your order that looks something like the one below.
๐ Spending 100 EUR on Bitcoin.
๐ฆ ORDER: buy 0.00531632 XBTEUR @ limit 18810.0
๐ซ TXID: ABCDEF-GHIJK-LMNOPQ
๐ STATUS: Order was placed.
Make sure to double check your orders page on Kraken from time to time make sure everything works as expected.
Tip: Pass the optional --dry-run
flag to the buy
subcommand to test your order without actually placing it.
For more detailed usage information and documentation run kraken-btc help
.
Create the necessary Kraken API here: API settings page.
To be able to place orders, the generated API credentials must have the Modify Orders permission.
On some pages, the API Key might be referred to as API Public Key. Likewise, the API Secret is also known as API Private Key. It is important to keep these credentials safe and never share them with anyone. It's best to not store them in plain text on your computer but to use a password manager. More information on how to create API credentials can be found in Kraken's documentation.