Calamari is a REST API client for Kraken.
Quickstart
The API client comes in two flavors: PublicApiClient and PrivateApiClient.
The former has access to the public methods only, the latter to all endpoints.
This is enforced at compile-time, as all the endpoints are defined statically
in the traits PublicEndpoints and PrivateEndpoints.
use ;
// Note: to run this example you will need to add Tokio to your dependencies:
// tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
async
Each endpoint accepts either zero arguments or a single argument containing all
the request parameters in urlencode format. All endpoints return a String
containing the JSON response from the server, leaving the user with complete
freedom in how they want to handle it.
A PrivateApiClient can be instantiated directly, or created from an existing
PublicApiClient by supplying the API credentials with the set_credentials
method.
use ;
async
Documentation
The complete documentation is available on docs.rs.