Skip to content

mlewis033/ex_kucoin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExKucoin

KuCoin API client for Elixir.

Build Status

Installation

List the Hex package in your application dependencies.

def deps do
  [{:ex_kucoin, "~> 0.0.5"}]
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

About

KuCoin API client for Elixir

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 99.2%
  • Shell 0.8%