ExKucoin View Source
KuCoin API client for Elixir.
Installation
List the Hex package in your application dependencies.
def deps do
[{:ex_kucoin, "~> 0.1.0"}]
end
Run mix deps.get
to install.
Configuration
Static API Key is the key you setup once and would never change. And this is what we need for most cases.
Add the following configuration variables in your config/config.exs file:
use Mix.Config
config :ex_kucoin, api_key: {:system, "KUCOIN_API_KEY"},
api_secret: {:system, "KUCOIN_API_SECRET"},
api_passphrase: {:system, "KUCOIN_API_PASSPHRASE"}
Alternatively to hard coding credentials, the recommended approach is to use environment variables as follows:
use Mix.Config
config :ex_kucoin, api_key: System.get_env("KUCOIN_API_KEY"),
api_secret: System.get_env("KUCOIN_API_SECRET"),
api_passphrase: System.get_env("KUCOIN_API_PASSPHRASE")
Websocket
During the setup you can pass the access keys as argument. Ex:
defmodule WsWrapper do
@moduledoc false
require Logger
use ExKucoin.WebSocket
end
Usage
TODO
License
MIT