Skip to content

mcwarner5/coinbase-adv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DISCLAIMER

This is a work in progress. You are responsible for any use. APIs may change. You assume all risks.

coinbase-adv

Go implementation for Coinbase Advanced Trading API

  • See /openapi for v3 specification of the models. This is used for model generation only.

  • See /client for actual API calls.

  • See /test for example calls to APIs

  • Supports authentication via API key or via OAuth token.

Install

go get github.com/mcwarner5/[email protected]

Import library

import "github.com/mcwarner5/coinbase-adv/client"

Example code

// ListAccounts Example (/test/list_accounts_test.go)

//devToken := os.Getenv("CB-ACTOKEN")
//creds := client.Credentials{AccessToken: devToken}

creds := client.Credentials{
  ApiKey:      os.Getenv("CB-APIKEY"),
  ApiSKey:     os.Getenv("CB-SKEY"),
  AccessToken: os.Getenv("CB-ACTOKEN"),
}

cln := client.NewClient(&creds)

limit := int32(1)
p := client.ListAccountsParams{
  Limit: &limit,
}

rsp, err := cln.ListAccounts(&p)
if err != nil {
  logrus.Info(err)
  return
}

About

Go implementation for Coinbase Advanced Trading API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%