kraken

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BASE_URL   = "https://api.kraken.com"
	API_V0     = "/0/"
	API_DOMAIN = BASE_URL + API_V0
	PUBLIC     = "public/"
	PRIVATE    = "private/"
)

Functions

This section is empty.

Types

type BaseResponse

type BaseResponse struct {
	Error  []string    `json:"error"`
	Result interface{} `json:"result"`
}

type Kraken

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

func New

func New(client *http.Client, accesskey, secretkey string) *Kraken

func (*Kraken) CancelOrder

func (k *Kraken) CancelOrder(orderId string, currency CurrencyPair) (bool, error)

func (*Kraken) GetAccount

func (k *Kraken) GetAccount() (*Account, error)

func (*Kraken) GetDepth

func (k *Kraken) GetDepth(size int, currency CurrencyPair) (*Depth, error)

func (*Kraken) GetExchangeName

func (k *Kraken) GetExchangeName() string

func (*Kraken) GetKlineRecords

func (k *Kraken) GetKlineRecords(currency CurrencyPair, period, size, since int) ([]Kline, error)

func (*Kraken) GetOneOrder

func (k *Kraken) GetOneOrder(orderId string, currency CurrencyPair) (*Order, error)

func (*Kraken) GetOrderHistorys

func (k *Kraken) GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error)

func (*Kraken) GetOrderInfos

func (k *Kraken) GetOrderInfos(txids ...string) ([]Order, error)

func (*Kraken) GetTicker

func (k *Kraken) GetTicker(currency CurrencyPair) (*Ticker, error)

func (*Kraken) GetTrades

func (k *Kraken) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error)

非个人,整个交易所的交易记录

func (*Kraken) GetUnfinishOrders

func (k *Kraken) GetUnfinishOrders(currency CurrencyPair) ([]Order, error)

func (*Kraken) LimitBuy

func (k *Kraken) LimitBuy(amount, price string, currency CurrencyPair) (*Order, error)

func (*Kraken) LimitSell

func (k *Kraken) LimitSell(amount, price string, currency CurrencyPair) (*Order, error)

func (*Kraken) MarketBuy

func (k *Kraken) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error)

func (*Kraken) MarketSell

func (k *Kraken) MarketSell(amount, price string, currency CurrencyPair) (*Order, error)

type NewOrderResponse

type NewOrderResponse struct {
	Description interface{} `json:"descr"`
	TxIds       []string    `json:"txid"`
}

Jump to

Keyboard shortcuts

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