Skip to content

A Go API client for the Kraken cryptocurrency exchange

License

Notifications You must be signed in to change notification settings

danmrichards/gokraken

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Kraken GoDoc License Go Report Card Build Status

A Go API client for the Kraken cryptocurrency exchange

Usage

Public API

package main

import (
	"context"
	"fmt"
	"log"
	
	"github.com/danmrichards/gokraken"
)

func main() {
	kraken := gokraken.New()
	
	res, err := kraken.Market.Time(context.Background())
	if err != nil {
		log.Fatal(err)
	}
	
	fmt.Printf("server unix time: %d\n", res.UnixTime)
	fmt.Printf("service rfc1123 time: %s\n", res.Rfc1123)
}

Private API

package main

import (
	"context"
	"fmt"
	"log"
	
	"github.com/danmrichards/gokraken"
)

func main() {
	kraken := gokraken.NewWithAuth("API_KEY", "PRIVATE_KEY")
	
	res, err := kraken.UserData.Balance(context.Background())
	if err != nil {
		log.Fatal(err)
	}
	
	for currency, balance := range res {
	    fmt.Printf("%s: %f'n", currency, balance)
	}
}

Roadmap

  • Base repo structure
  • Public API calls working
  • Private API calls working
  • Travis CI
  • Implement public market data endpoints
  • Implement private user data endpoints
  • Implement private user trading endpoints
  • Implement private user funding endpoints
  • Test all the things!