kraken

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENDPOINT = "https://api.kraken.com"
	API_V1   = "/0/public/"

	KLINE_URI = "OHLC"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Kraken

type Kraken struct {
	Spot *Spot
	// contains filtered or unexported fields
}

func New

func New(config *APIConfig) *Kraken

func (*Kraken) DoRequest

func (k *Kraken) DoRequest(httpMethod, uri, reqBody string, response interface{}) ([]byte, error)

func (*Kraken) GetExchangeName

func (k *Kraken) GetExchangeName() string

type Spot

type Spot struct {
	*Kraken
}

func (*Spot) CancelOrder

func (s *Spot) CancelOrder(order *Order) ([]byte, error)

func (*Spot) GetAccount

func (s *Spot) GetAccount() (*Account, []byte, error)

func (*Spot) GetDepth

func (s *Spot) GetDepth(pair Pair, size int) (*Depth, []byte, error)

func (*Spot) GetKlineRecords

func (s *Spot) GetKlineRecords(pair Pair, period, size, since int) ([]*Kline, []byte, error)

func (*Spot) GetOHLCs

func (s *Spot) GetOHLCs(symbol string, period, size, since int) ([]*OHLC, []byte, error)

func (*Spot) GetOrder

func (s *Spot) GetOrder(order *Order) ([]byte, error)

func (*Spot) GetOrders

func (s *Spot) GetOrders(pair Pair) ([]*Order, error)

func (*Spot) GetTicker

func (s *Spot) GetTicker(pair Pair) (*Ticker, []byte, error)

func (*Spot) GetTrades

func (s *Spot) GetTrades(pair Pair, since int64) ([]*Trade, error)

func (*Spot) GetUnFinishOrders

func (s *Spot) GetUnFinishOrders(pair Pair) ([]*Order, []byte, error)

func (*Spot) KeepAlive

func (s *Spot) KeepAlive()

func (*Spot) PlaceOrder

func (s *Spot) PlaceOrder(order *Order) ([]byte, error)

Jump to

Keyboard shortcuts

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