go get -d -u github.com/Reclyptor/go-coinbase
package main
import (
"fmt"
"github.com/Reclyptor/go-coinbase"
)
func main() {
// Create An API Client
client := coinbase.NewCoinbaseClient()
// Retrieve An Asset's Market Price
price := client.Price.GetSpotPrice(coinbase.CurrencyPairs.BTC_USD)
fmt.Printf("%+v\n", price)
}
The official API documentation can be found on the Coinbase developer portal. (Base | Pro)
The endpoints supported by the client are listed below.
- Formal Testing
- Godoc
- Proper Error Handling and Propagation
- Websocket Feed
- Support for Private Endpoints
2020 August 03
- Laid out the initial groundwork for WebSocket support. Currently, only the Heartbeat channel is subscribable.
2020 August 02
- This initial version of the client only supports the use of the public data endpoints, which do not require any form of authentication.
- Note that these endpoints are throttled by Coinbase at a rate of roughly 2 requests per second.