Categorygithub.com/alexeykaravan/go-bittrex
modulepackage
1.0.0
Repository: https://github.com/alexeykaravan/go-bittrex.git
Documentation: pkg.go.dev

# README

go-bittrex GoDoc

go-bittrex is an implementation of the Bittrex API (public and private) in Golang.

This version implement V1.1 Bittrex API and the new HMAC authentification.

Import

import "github.com/toorop/go-bittrex"

Usage

In order to use the client with go's default http client settings you can do:

package main

import (
	"fmt"
	"github.com/toorop/go-bittrex"
)

const (
	API_KEY    = "YOUR_API_KEY"
	API_SECRET = "YOUR_API_SECRET"
)

func main() {
	// Bittrex client
	bittrex := bittrex.New(API_KEY, API_SECRET)

	// Get markets
	markets, err := bittrex.GetMarkets()
	fmt.Println(err, markets)
}

In order to use custom settings for the http client do:

package main

import (
	"fmt"
	"net/http"
	"time"
	"github.com/toorop/go-bittrex"
)

const (
	API_KEY    = "YOUR_API_KEY"
	API_SECRET = "YOUR_API_SECRET"
)

func main() {
	httpClient := &http.Client{
		Timeout: time.Second * 10,
	}

	// Bittrex client
	bittrex := bittrex.NewWithCustomHttpClient(API_KEY, API_SECRET, httpClient)

	// Get markets
	markets, err := bittrex.GetMarkets()
	fmt.Println(err, markets)
}

See "Examples" folder for more... examples

Documentation

GoDoc

Stay tuned

Follow me on Twitter

Donate

Donation QR

1HgpsmxV52eAjDcoNpVGpYEhGfgN7mM1JB

# Packages

No description provided by the author

# Functions

New returns an instantiated bittrex struct.
NewClient return a new Bittrex HTTP client.
NewClientWithCustomHTTPConfig returns a new Bittrex HTTP client using the predefined http client.
NewClientWithCustomTimeout returns a new Bittrex HTTP client with custom timeout.
NewWithCustomHTTPClient returns an instantiated bittrex struct with custom http client.
NewWithCustomTimeout returns an instantiated bittrex struct with custom timeout.

# Constants

APIBASE Bittrex API endpoint.
APIVERSION api version.
AUTHEXPIRED const.
HEARTBEAT const.
ORDER const.
ORDERBOOK const.
TICKER const.
TIMEFORMAT const.
TRADE const.
WSBASE Bittrex WS API endpoint.
WSHUB SignalR main hub.

# Variables

CANDLEINTERVALS variable.

# Structs

Address struct.
Balance struct.
BalanceD struct.
Bittrex represent a Bittrex client.
Client struct.
Currency struct.
Deposit struct.
Distribution struct.
Market struct.
MarketSummary struct.
NewOrder struct.
Order struct.
OrderBook struct.
OrderBook2 struct.
OrderDelta struct.
OrderUpdate struct.
No description provided by the author
Responce struct.
Ticker struct.
Trade Used in getmarkethistory.
No description provided by the author