Git Product home page Git Product logo

qtrade-api-go's Introduction

Go codecov Go Report Card License: MIT

qTrade API Go qTrade

This is an unofficial Go client for the qTrade.io crypto exchange API.

The client provides helpful methods, data structures, and enums to make the experience of using the qTrade API in Go as seamless as possible.

Features

  • All documented API methods are implemented
  • Automatic HMAC signature generation
  • Automatic API error checking and parsing
  • Enumerated data types for Markets, Currencies, and Order Types
  • Automatic rate limit waiting
  • Configurable retries

Documentation

Instantiating a client and making a request is easy:

package main

import (
	"context"
	"fmt"
	"time"

	"github.com/Henelik/qtrade-api-go/qtrade/v1"
)

func main() {
	config := qtrade.Configuration{
		HMACKeypair: "1:111111111111111111111111111",
		Endpoint:    "https://api.qtrade.io",
		Timeout:     time.Second * 60,
	}

	client, err := qtrade.NewClient(config)
	if err != nil {
		panic(err)
	}

	balances, err := client.GetBalances(context.Background(), nil)
	if err != nil {
		panic(err)
	}
	
	for _, balance := range balances {
		fmt.Printf("Balance for %s: %v", balance.Currency, balance.Balance)
    }
}

Please refer to the official documentation for more information.

Planned Features

  • Helper functions (e.g. cancel all orders on a given market)
  • Improve client documentation

qtrade-api-go's People

Contributors

henelik avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.