kraken

package module
v0.0.0-...-9814909 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2021 License: MIT Imports: 17 Imported by: 0

README

go-kraken

golang package for interfacing with kraken crypto exchange

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitOnError

func ExitOnError(err error)

func Wrap

func Wrap(err error) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(key, secret string) Client

func (Client) OHLC

func (c Client) OHLC(pair string, interval int64, since time.Time) (OHLCResponse, error)

OHLC returns OHLC entries based on market pair, interval and start time

func (Client) OpenOrder

func (c Client) OpenOrder(o Order) (string, error)

func (Client) ServerTime

func (c Client) ServerTime() (ServerTimeResponse, error)

type KrakenErrors

type KrakenErrors []string

func (KrakenErrors) Errors

func (ke KrakenErrors) Errors() error

type OHLC

type OHLC struct {
	Timestamp  int64
	Open       float64
	High       float64
	Low        float64
	Close      float64
	VWAP       float64
	Volume     float64
	TradeCount int64
}

type OHLCResponse

type OHLCResponse struct {
	LastTimestamp int64
	Current       OHLC
	History       []OHLC
}

type Order

type Order struct {
	OrderType string
	Direction string
	Amount    float64
	Pair      string
	Price     float64
	Leverage  string
	Validate  bool
}

type ServerTimeResponse

type ServerTimeResponse struct {
	Error  KrakenErrors
	Result ServerTimeResult
}

type ServerTimeResult

type ServerTimeResult struct {
	UnixTime int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL