vniche / novadax-go

Go HTTP client for NOVADAX API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

novadax-go

GoDoc

novadax-go is a Go client library for accessing the NovaDAX API v1.

Usage

import "github.com/vniche/novadax-go"

Construct a new NovaDAX client, then use the various services on the client to access different parts of the NovaDAX API. For example:

// LISTING SYMBOLS (PUBLIC ENDPOINT)

import (
    novadax "github.com/vniche/novadax-go"
)

client := novadax.Default()

// list all symbols available at NovaDAX
symbols, err := client.ListSymbols()
// LISTING ORDERS (PRIVATE ENDPOINT, THUS REQUIRE ACCESS AND SECRET KEYS)

import (
    novadax "github.com/vniche/novadax-go"
)

/*
* This configuration is also possible via environment variables, eg.:
* NOVADAX_ACCESS_KEY="5388359-538583-5i9593-3596e0-6ca252484934aa4"
* NOVADAX_SECRET_KEY="nl3KVXiOp4JN74482h4nkahiu5jDKWkKhnMumMy"
*/

// novadax.New("ACCESS_KEY", "PRIVATE_KEY")
client := novadax.New("5388359-538583-5i9593-3596e0-6ca252484934aa4", "nl3KVXiOp4JN74482h4nkahiu5jDKWkKhnMumMy") // fake credentials here, just maintained a similar pattern to the actual data

// list all symbols available at NovaDAX
symbols, err := client.ListOreders()

Rate Limiting

NovaDAX imposes a rate limit on all API clients. Public endpoints are limited to 60 requests per second, while private endpoints can be invoked up to 20 requests per second.

Learn more about NovaDAX rate limiting at https://doc.novadax.com/pt-BR/#comunicacao-com-a-api.

Integration Tests

TODO: implement tests

Contributing

I would like to cover the entire NovaDAX API and contributions are of course always welcome. The calling pattern is pretty well established, so adding new methods is relatively straightforward.

TODO: Contribution doc.

License

This library is distributed under the GPLv3 license found in the LICENSE file.

About

Go HTTP client for NOVADAX API

License:GNU General Public License v3.0


Languages

Language:Go 100.0%