fetcher

package
v0.0.0-...-275a4fb Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetInfo

type AssetInfo struct {
	Aclass          string `json:"aclass"`
	Altname         string `json:"altname"`
	Decimals        int    `json:"decimals"`
	DisplayDecimals int    `json:"display_decimals"`
	Status          string `json:"status"`
}

type AssetsResponse

type AssetsResponse struct {
	Error  []any                `json:"error"`
	Result map[string]AssetInfo `json:"result"`
}

type Fetcher

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

func New

func New(label, key, secret string) (*Fetcher, error)

func (*Fetcher) Ledger

func (f *Fetcher) Ledger(lastFetched time.Time) ([]g.LedgerRec, error)

func (*Fetcher) LoadAssets

func (f *Fetcher) LoadAssets() error

func (*Fetcher) LoadPairs

func (f *Fetcher) LoadPairs() error

func (*Fetcher) Trades

func (f *Fetcher) Trades(lastFetched time.Time, ledgerRecs []g.LedgerRec) error

type PairInfo

type PairInfo struct {
	Altname           string      `json:"altname"`
	Wsname            string      `json:"wsname"`
	AclassBase        string      `json:"aclass_base"`
	Base              string      `json:"base"`
	AclassQuote       string      `json:"aclass_quote"`
	Quote             string      `json:"quote"`
	Lot               string      `json:"lot"`
	CostDecimals      int         `json:"cost_decimals"`
	PairDecimals      int         `json:"pair_decimals"`
	LotDecimals       int         `json:"lot_decimals"`
	LotMultiplier     int         `json:"lot_multiplier"`
	LeverageBuy       []any       `json:"leverage_buy"`
	LeverageSell      []any       `json:"leverage_sell"`
	Fees              [][]float64 `json:"fees"`
	FeesMaker         [][]float64 `json:"fees_maker"`
	FeeVolumeCurrency string      `json:"fee_volume_currency"`
	MarginCall        int         `json:"margin_call"`
	MarginStop        int         `json:"margin_stop"`
	Ordermin          string      `json:"ordermin"`
	Costmin           string      `json:"costmin"`
	TickSize          string      `json:"tick_size"`
	Status            string      `json:"status"`
}

type PairResponse

type PairResponse struct {
	Error  []any               `json:"error"`
	Result map[string]PairInfo `json:"result"`
}

type ProxyApi

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

func NewProxyApi

func NewProxyApi(label, key, secret string) *ProxyApi

func (*ProxyApi) Ledgers

func (a *ProxyApi) Ledgers(args map[string]string) (map[string]g.LedgerInfoDoc, error)

func (*ProxyApi) TradesHistory

func (a *ProxyApi) TradesHistory(start int64, end int64, args map[string]string) (*krakenapi.TradesHistoryResponse, error)

Jump to

Keyboard shortcuts

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