github.com/0intro/bitstamp

A client implementation of the Bitstamp HTTP API, written in Go.


License
BSD-3-Clause
Install
go get github.com/0intro/bitstamp

Documentation

Build Status

Bitstamp

Package bitstamp implements the Bitstamp HTTP API. For full documentation, see the godoc page.

Examples

Ticker (unauthenticated)

	conn, err := bitstamp.NewConn()
	if err != nil {
		return err
	}
	defer conn.Close()

	ticker, err := conn.GetTicker(currencyPair)
	if err != nil {
		return err
	}
	fmt.Printf("%+v\n", ticker)

Account Balance (authenticated)

	conn, err := bitstamp.NewAuthConn(apiKey, apiSecret, customerID)
	if err != nil {
		return err
	}
	defer conn.Close()

	balance, err := conn.PostBalance(currencyPair)
	if err != nil {
		return err
	}
	fmt.Printf("%+v\n", balance)