kraken

package
v0.0.0-...-85ff41b Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(accessKey, secretKey, proxy string, c gtime.Clock, email string, cfgClient *gconfig.Client) (*Client, error)

email is required in living trading, but not required in kline spider

func (*Client) Borrow

func (ex *Client) Borrow(margin fintypes.Margin, asset string, amount gdecimal.Decimal) error

func (*Client) CancelOrder

func (ex *Client) CancelOrder(id fintypes.OrderId) error

https://www.kraken.com/features/api#cancel-open-order Cancel order by order Id.

func (*Client) GetAccount

func (ex *Client) GetAccount() (*fintypes.Account, error)

Get account balance.

func (*Client) GetBorrowable

func (ex *Client) GetBorrowable(margin fintypes.Margin, asset string) (gdecimal.Decimal, error)

func (*Client) GetCandleSticks

func (ex *Client) GetCandleSticks(market fintypes.Market, target fintypes.Pair, period fintypes.Period, since *time.Time) (*fintypes.CandleSticks, error)

Get candle sticks.

func (*Client) GetClosedOrders

func (ex *Client) GetClosedOrders(market fintypes.Market, target fintypes.Pair, beginTime time.Time, endTime time.Time) ([]fintypes.Order, error)

https://www.kraken.com/features/api#get-closed-orders Get closed orders' info by time range.

func (*Client) GetDepth

func (ex *Client) GetDepth(market fintypes.Market, target fintypes.Pair) (*fintypes.Depth, error)

get max open order books

func (*Client) GetMarketInfo

func (ex *Client) GetMarketInfo(ignorePairsNotFound bool) (*fintypes.MarketInfo, error)

https://www.kraken.com/features/api#get-tradable-pairs Get market details.

func (*Client) GetOrder

func (ex *Client) GetOrder(id fintypes.OrderId) (*fintypes.Order, error)

https://www.kraken.com/features/api#query-orders-info Get order's info by order Id.

func (*Client) GetTicks

func (ex *Client) GetTicks(ignorePairsNotFound bool) (map[fintypes.PairM]fintypes.Tick, error)

get all ticks

func (*Client) Property

func (ex *Client) Property() *fintypes.ExProperty

func (*Client) Repay

func (ex *Client) Repay(margin fintypes.Margin, asset string, amount gdecimal.Decimal) error

func (*Client) Trade

func (ex *Client) Trade(market fintypes.Market, margin fintypes.Margin, leverage int, target fintypes.Pair, side fintypes.OrderSide, orderType fintypes.OrderType, unitAmount, price, stopPrice gdecimal.Decimal) (*fintypes.OrderId, error)

Place an order.

func (*Client) Transfer

func (ex *Client) Transfer(asset string, amount gdecimal.Decimal, from, to fintypes.SubAcc) error

Jump to

Keyboard shortcuts

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