kraken

package
v0.0.0-...-f501dc8 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: MIT Imports: 12 Imported by: 1

README

Kraken

Env File

KRAKEN_URL=
KRAKEN_KEY=
KRAKEN_SECRET=

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultClient

func DefaultClient() (client.C, error)

func ServerTimePath

func ServerTimePath(args client.EndpointArgs) string

Get the server's time.

func SystemStatusPath

func SystemStatusPath(args client.EndpointArgs) string

Get the current system status or trading mode.

Types

type C

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

C is the kraken client

func (*C) Connect

func (kraken *C) Connect() error

Connect creats a new client instance

func (*C) Do

func (kraken *C) Do(creq client.Request) (*http.Response, error)

func (*C) Identifier

func (kraken *C) Identifier() string

Identifier identifies requests

type Endpoint

type Endpoint int

* This is a generated file, do not edit

const (
	ServerTimeEndpoint Endpoint
	SystemStatusEndpoint
)

func (Endpoint) Path

func (endpoint Endpoint) Path(args client.EndpointArgs) string

Get takes an endpoint const and endpoint arguments to parse the URL endpoint path.

type MarketData

type MarketData struct {
	client.Parent
	// contains filtered or unexported fields
}

MarketData is a structure used to maintain state while querying on kraken market data

func NewMarketData

func NewMarketData(conn client.Connector) *MarketData

NewMarketData will return a new MarketDAta struct to query market data on

func (*MarketData) ServerTime

func (marketData *MarketData) ServerTime() (m *model.KrakenServerTime, err error)

Get the server's time.

* source: https://docs.kraken.com/rest/#operation/getServerTime

func (*MarketData) SystemStatus

func (marketData *MarketData) SystemStatus() (m *model.KrakenSystemStatus, err error)

Get the current system status or trading mode.

* source: https://docs.kraken.com/rest/#operation/getSystemStatus

Jump to

Keyboard shortcuts

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