go-bittrex

Test Lint codecov Go Report Card GoDoc

go-bittrex is a Go client library for accessing the Bittrex API.

Install

go get github.com/alexjorgef/go-bittrex

Quick Start

package main

import (
	"fmt"
	"log"

	"github.com/alexjorgef/go-bittrex/bittrex"
)

func main() {
	client := bittrex.New("", "")
	currency, err := client.GetCurrency("ETH")
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Printf("%+v\n", currency)
}

Examples

REST API

package main

import (
	"fmt"
	"log"

	"github.com/alexjorgef/go-bittrex/bittrex"
)

func main() {
	client := bittrex.New("", "")
	currency, err := client.GetCurrency("ETH")
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Printf("%+v\n", currency)
}

Websocket

package main

import (
	"fmt"
	"log"

	"github.com/alexjorgef/go-bittrex/bittrex"
)

func main() {
	client := bittrex.New("", "")
	ch := make(chan bittrex.Trade)
	errCh := make(chan error)
	stopCh := make(chan bool)
	go func() {
		errCh <- bt.SubscribeTradeUpdates("BTC-USD", ch, stopCh)
	}()
	select {
	case trade := <-ch:
		fmt.Printf("%+v\n", trade)
	case err := <-errCh:
		fmt.Printf("%+v\n", err)
	}
}

Todos

  • REST API
    • Account
      • GET /account
      • GET /account/fees/fiat
      • GET /account/fees/fiat/{currencySymbol}
      • GET /account/fees/trading
      • GET /account/fees/trading/{marketSymbol}
      • GET /account/volume
      • GET /account/permissions/markets
      • GET /account/permissions/markets/{marketSymbol}
      • GET /account/permissions/currencies
      • GET /account/permissions/cu
    • Addresses
      • GET /addresses
      • POST /addresses
      • GET /addresses/{currencySymb
    • Balances
      • GET /balances
      • HEAD /balances
      • GET /balances/{currencySymbo
    • Batch
      • POST /batch
    • ConditionalOrders
      • GET /conditional-orders/{conditionalOrderId}
      • DELETE /conditional-orders/{conditionalOrderId}
      • GET /conditional-orders/closed
      • GET /conditional-orders/open
      • HEAD /conditional-orders/open
      • POST /conditional-orders
    • Currencies
      • GET /currencies
      • GET /currencies/{symbol}
    • Deposits
      • GET /deposits/open
      • HEAD /deposits/open
      • GET /deposits/closed
      • GET /deposits/ByTxId/{txId}
      • GET /deposits/{depositId}
    • Executions
      • GET /executions/{executionId}
      • GET /executions
      • GET /executions/last-id
      • HEAD /executions/last-id
    • FundsTransferMethods
      • GET /funds-transfer-methods/{fundsTransferMethodId}
    • Markets
      • GET /markets
      • GET /markets/summaries
      • HEAD /markets/summaries
      • GET /markets/tickers
      • HEAD /markets/tickers
      • GET /markets/{marketSymbol}/ticker
      • GET /markets/{marketSymbol}
      • GET /markets/{marketSymbol}/summary
      • GET /markets/{marketSymbol}/orderbook
      • HEAD /markets/{marketSymbol}/orderbook
      • GET /markets/{marketSymbol}/trades
      • HEAD /markets/{marketSymbol}/trade
      • GET /markets/{marketSymbol}/candles/{candleType}/{candleInterval}/recent
      • HEAD /markets/{marketSymbol}/candles/{candleType}/{candleInterval}/recent
      • GET /markets/{marketSymbol}/candles/{candleType}/{candleInterval}/historical/{year}/{month}/{day}
    • Orders
      • GET /orders/closed
      • GET /orders/open
      • DELETE /orders/open
      • HEAD /orders/open
      • GET /orders/{orderId}
      • DELETE /orders/{orderId}
      • GET /orders/{orderId}/executions
      • POST /orders
    • Ping
      • GET /ping
    • Subaccounts
      • GET /subaccounts
      • POST /subaccounts
      • GET /subaccounts/{subaccountId}
      • GET /subaccounts/withdrawals/open
      • GET /subaccounts/withdrawals/closed
      • GET /subaccounts/deposits/open
      • GET /subaccounts/deposits/cl
    • Transfers
      • GET /transfers/sent
      • GET /transfers/received
      • GET /transfers/{transferId}
      • POST /transfers
    • Withdrawals
      • GET /withdrawals/open
      • GET /withdrawals/closed
      • GET /withdrawals/ByTxId/{txId}
      • GET /withdrawals/{withdrawalId}
      • DELETE /withdrawals/{withdrawalId}
      • POST /withdrawals
      • GET /withdrawals/allowed-addr
  • Websocket API
    • Authenticate
    • IsAuthenticated
    • Subscribe
    • Unsubscribe
    • Streams
      • Balance
      • Candle
      • Conditional Order
      • Deposit
      • Execution
      • Heartbeat
      • Market Summaries
      • Market Summary
      • Order
      • Orderbook
      • Tickers
      • Ticker
      • Trade

GitHub

View Github