Elixir client library for Bitstamp HTTP API.
The package can be installed by adding ex_bitstamp
to your list of dependencies in mix.exs
:
def deps do
[
{:ex_bitstamp, "~> 0.1.0"}
]
end
Bitstamp API requires valid API credentials for signature generation when hitting private endpoints. By default, ExBitstamp
will look for credentials in your config file:
config :ex_bitstamp,
creds: %{
customer_id: "customer_id",
key: "key",
secret: "secret"
}
If you plan on using multiple API users and a single, default configuration doesn't work, you can pass a ExBitstamp.Credentials
struct to all functions hitting private API as an optional, last argument:
alias ExBitstamp.{Credentials, CurrencyPair}
creds = %Credentials{
customer_id: "customer_id",
key: "key",
secret: "secret"
}
ExBitstamp.balance(CurrencyPair.btcusd(), creds)
For a complete list of functions you can refer to documentation which can be found at https://hexdocs.pm/ex_bitstamp.
$ mix test
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.