Skip to content

filinvadim/go-bittrex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-bittrex

Signal-R client for Bittrex echange API V3

This version implement V3 Bittrex Signal-R API and the new HMAC authentification.

Installation

go get github.com/filinvadim/go-bittrex

Usage

package main

import (
	"fmt"
	"log"
	"time"
)

func main() {
	client, err := NewClientV3(fmt.Println)
	if err != nil {
		log.Fatal(err)
	}
	client.SetResponseHandler(func(hub, method string, arguments [][]byte) {
		fmt.Println("Message Received: ")
		fmt.Println("HUB: ", hub)
		fmt.Println("METHOD: ", method)
		fmt.Println("ARGUMENTS: ")
		for _, arg := range arguments {
			fmt.Println("    ", string(arg))
		}
	})
	client.SetErrorHandler(func(err error) {
		fmt.Println(err)
	})
	err = client.Authenticate(key, secret)  // your credentials
	if err != nil {
		log.Fatal(err)
	}
	err = client.Subscribe("ticker_BTC-USD")
	if err != nil {
		log.Fatal(err)
	}
	time.Sleep(5*time.Second)
	
  	client.Close()
}

About

Signal-R client for Bittrex echange API V3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages