#exchange #api #cryptocurrency #kraken #command-line-interface #api-bindings #rust

app gambero

🦐 Command-line interface (CLI) for Kraken exchange WebSockets API | Written in Rust

3 releases

0.1.2 Mar 8, 2021
0.1.1 Mar 6, 2021
0.1.0 Mar 6, 2021

#23 in #kraken

MIT license

1MB
96 lines

gambero

🦐 Command-line interface (CLI) for Kraken exchange WebSockets API | Written in Rust

Description

gambero executable offers I/O interop with the Kraken exchange WebSockets API.

NOTE: this is a compound tool built on top of squalo and polipo libraries. Have a look at them if you need detached and/or more application-specific integration capabilities.

Prerequisites

The Kraken exchange allows WebSockets API interaction with both public and private data.

Only for the private one, you need to issue an API-Key and an API-Secret to the gambero executable, in order to generate authentication token for signed subscriptions on WebSockets endpoints.

If you are not familiar with, please have a look at WebSockets API - FAQ for a general overview, or at WebSockets API document.

Installation

By supposing that there's cargo installed on your system, just spawn a console and run:

cargo install gambero

Usage

For Kraken public API interaction, run:

gambero public

For Kraken private API interaction, run:

gambero private <kraken_api_key> <kraken_api_secret>

Input/Output

A spawned gambero instance utilizes both stdin and stdout as data streams.

The crate information and the usage instructions printed out at the very beginning of the execution, comes in plain text.

For any incoming/outgoing data, stringified JSON format is used/expected.

It's up to you to submit/parse payloads accordingly to their shapes.

NOTE: only for the private stream, if both the API Key and the API Secret have been correctly issued, an authentication token will be returned in the compact form as follow:

{"token":"5t+vlXHPfRfb660YUiIeA0m9PESCKpJqO0bH8G+OjMw"}

and it can be used in the envelop of any further message that need it explicitly.

Examples

Public stream

gambero-public-stream

Private stream

gambero-private-stream

Disclaimer

This software comes without any kind of warranties.

I will not be liable for any damages related to the use or the misuse of this software.

You are the sole responsible.

Dependencies

~19–36MB
~664K SLoC