baibaratsky / go-btce

BTC-E API Go Client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Go Report Card GoDoc Coverage Status

BTC-E API Go Client

Native Go client for interacting with BTC-E Public API v3 and Trading API.

Usage

package main

import (
	"fmt"
	btc "github.com/onuryilmaz/go-btce"
)

func main() {

	api := btc.API{}

	ticker, err := api.Public.Ticker([]string{"btc_usd"})
	if err == nil {
		fmt.Printf("BTC buy price: %.3f \n", ticker["btc_usd"].Buy)
		fmt.Printf("BTC sell price: %.3f \n", ticker["btc_usd"].Sell)
	}

	info, err := api.Trade.GetInfoAuth("API_KEY", "API_SECRET")
	if err == nil {
		fmt.Printf("BTC amount: %.3f \n", info.Funds["btc"])
	}
}

About

BTC-E API Go Client

License:Mozilla Public License 2.0


Languages

Language:Go 100.0%