Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zauberstuhl/go-coinbase
Coinbase Golang APIv2 Library
https://github.com/zauberstuhl/go-coinbase
apiv2 coinbase golang
Last synced: 3 months ago
JSON representation
Coinbase Golang APIv2 Library
- Host: GitHub
- URL: https://github.com/zauberstuhl/go-coinbase
- Owner: zauberstuhl
- License: gpl-3.0
- Created: 2017-01-23T19:42:26.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-09T22:40:02.000Z (over 4 years ago)
- Last Synced: 2024-10-04T13:08:12.019Z (4 months ago)
- Topics: apiv2, coinbase, golang
- Language: Go
- Homepage:
- Size: 62.5 KB
- Stars: 23
- Watchers: 4
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Coinbase Golang API Library
[![Build Status](https://travis-ci.org/Zauberstuhl/go-coinbase.svg?branch=master)](https://travis-ci.org/Zauberstuhl/go-coinbase)
[![GoDoc](https://godoc.org/github.com/Zauberstuhl/go-coinbase?status.svg)](http://godoc.org/github.com/Zauberstuhl/go-coinbase)
[![Codecov](https://codecov.io/gh/Zauberstuhl/go-coinbase/branch/master/graph/badge.svg)](https://codecov.io/gh/Zauberstuhl/go-coinbase)The library was tested against coinbase.com APIv2
## Installation
go get github.com/Zauberstuhl/go-coinbase
# or use gopkg for specific versions
go get gopkg.in/Zauberstuhl/go-coinbase.v1.0.0## Supported API Calls
* Wallet Endpoints
- [x] Users
- [x] Accounts
- [x] Addresses
- [x] Transactions
- [x] Buys
- [x] Sells
- [x] Deposits
- [x] Withdrawals
- [x] Payment methods
* Data Endpoints
- [x] Currencies
- [x] Exchange rates
- [x] Prices
- [x] Time## Example
import "github.com/Zauberstuhl/go-coinbase"
c := coinbase.APIClient{
Key: "123",
Secret: "123456",
}acc, err := c.Accounts()
if err != nil {
fmt.Println(err)
return
}for _, acc := range acc.Data {
fmt.Printf("ID: %s\nName: %s\nType: %s\nAmount: %f\nCurrency: %s\n",
acc.Id, acc.Name, acc.Type,
acc.Balance.Amount, acc.Balance.Currency)
}# sample output
ID: 1234-12-1234-1232
Name: Test Wallet
Type: BTC
Amount: 0.0
Currency: EUR
[...]## Unit Tests
Run all available unit tests via:
go test
Most of the tests require a internet connection!