Versions in this module Expand all Collapse all v0 v0.0.2 Nov 13, 2023 Changes in this version + const APIURL + const APIUserAgent + const APIVersion + const BUY + const LIMIT + const MARKET + const MinimumBCH + const MinimumDASH + const MinimumDOGE + const MinimumEOS + const MinimumETC + const MinimumETH + const MinimumGNO + const MinimumICN + const MinimumLTC + const MinimumMLN + const MinimumREP + const MinimumUSDT + const MinimumXBT + const MinimumXLM + const MinimumXMR + const MinimumXRP + const MinimumZEC + const OTLimit + const OTMarket + const OTSettlePosition + const OTStopLoss + const OTStopLossAndLimit + const OTStopLossLimit + const OTStopLossProfit + const OTStopLossProfitLimit + const OTTakeProfi + const OTTakeProfitLimit + const OTTrailingStop + const OTTrailingStopLimit + const SELL + type AddOrderResponse struct + Description OrderDescription + TransactionIds []string + type AssetInfo struct + Altname string + AssetClass string + Decimals int + DisplayDecimals int + type AssetPairInfo struct + Altname string + AssetClassBase string + AssetClassQuote string + Base string + FeeVolumeCurrency string + Fees [][]float64 + FeesMaker [][]float64 + LeverageBuy []float64 + LeverageSell []float64 + Lot string + LotDecimals int + LotMultiplier int + MarginCall int + MarginStop int + PairDecimals int + Quote string + type AssetPairsResponse map[string]AssetPairInfo + type AssetsResponse map[string]AssetInfo + type BalanceResponse map[string]float64 + type CancelOrderResponse struct + Count int + Pending bool + type ClosedOrdersResponse struct + Closed map[string]Order + Count int + type DepositAddressesResponse []struct + type DepthResponse map[string]OrderBook + type FeeInfo struct + Fee float64 + MaxFee float64 + MinFee float64 + NextFee float64 + NextVolume float64 + TierVolume float64 + type Fees map[string]FeeInfo + type KrakenAPI struct + func New(key, secret string) *KrakenAPI + func NewWithClient(key, secret string, httpClient *http.Client) *KrakenAPI + func (api *KrakenAPI) AddOrder(pair string, direction string, orderType string, volume string, ...) (*AddOrderResponse, error) + func (api *KrakenAPI) AssetPairs() (*AssetPairsResponse, error) + func (api *KrakenAPI) Assets() (*AssetsResponse, error) + func (api *KrakenAPI) Balance() (*BalanceResponse, error) + func (api *KrakenAPI) CancelOrder(txid string) (*CancelOrderResponse, error) + func (api *KrakenAPI) ClosedOrders(args map[string]string) (*ClosedOrdersResponse, error) + func (api *KrakenAPI) DepositAddresses(asset string, method string) (*DepositAddressesResponse, error) + func (api *KrakenAPI) Depth(pair string, count int) (*OrderBook, error) + func (api *KrakenAPI) Ledgers(args map[string]string) (*LedgersResponse, error) + func (api *KrakenAPI) OHLC(pair string) (*OHLCResponse, error) + func (api *KrakenAPI) OpenOrders(args map[string]string) (*OpenOrdersResponse, error) + func (api *KrakenAPI) Query(method string, data map[string]string) (interface{}, error) + func (api *KrakenAPI) QueryOrders(txids string, args map[string]string) (*QueryOrdersResponse, error) + func (api *KrakenAPI) Ticker(pairs ...string) (*TickerResponse, error) + func (api *KrakenAPI) Time() (*TimeResponse, error) + func (api *KrakenAPI) TradeBalance(args map[string]string) (*TradeBalanceResponse, error) + func (api *KrakenAPI) TradeVolume(args map[string]string) (*TradeVolumeResponse, error) + func (api *KrakenAPI) Trades(pair string, since int64) (*TradesResponse, error) + func (api *KrakenAPI) TradesHistory(start int64, end int64, args map[string]string) (*TradesHistoryResponse, error) + func (api *KrakenAPI) WithClient(httpClient *http.Client) *KrakenAPI + func (api *KrakenAPI) Withdraw(asset string, key string, amount *big.Float) (*WithdrawResponse, error) + func (api *KrakenAPI) WithdrawInfo(asset string, key string, amount *big.Float) (*WithdrawInfoResponse, error) + type KrakenApi = KrakenAPI + type KrakenResponse struct + Error []string + Result interface{} + type LedgerInfo struct + Aclass string + Amount big.Float + Asset string + Balance big.Float + Fee big.Float + RefID string + Time float64 + Type string + type LedgersResponse struct + Ledger map[string]LedgerInfo + type OHLC struct + Close float64 + Count int + High float64 + Low float64 + Open float64 + Time time.Time + Volume float64 + Vwap float64 + func NewOHLC(input []interface{}) (*OHLC, error) + type OHLCResponse struct + Last float64 + OHLC []*OHLC + Pair string + type OpenOrdersResponse struct + Count int + Open map[string]Order + type Order struct + CloseTime float64 + Cost float64 + Description OrderDescription + ExpireTime float64 + Fee float64 + LimitPrice float64 + Misc string + OpenTime float64 + OrderFlags string + Price float64 + Reason string + ReferenceID string + StartTime float64 + Status string + StopPrice float64 + TransactionID string + UserRef int + Volume string + VolumeExecuted float64 + type OrderBook struct + Asks []OrderBookItem + Bids []OrderBookItem + type OrderBookItem struct + Amount float64 + Price float64 + Ts int64 + func (o *OrderBookItem) UnmarshalJSON(data []byte) error + type OrderDescription struct + AssetPair string + Close string + Leverage string + Order string + OrderType string + PrimaryPrice string + SecondaryPrice string + Type string + type PairTickerInfo struct + Ask []string + Bid []string + Close []string + High []string + Low []string + OpeningPrice float64 + Trades []int + Volume []string + VolumeAveragePrice []string + type QueryOrdersResponse map[string]Order + type TickerResponse map[string]PairTickerInfo + func (v *TickerResponse) GetPairTickerInfo(pair string) PairTickerInfo + type TimeResponse struct + Rfc1123 string + Unixtime int64 + type TradeBalanceResponse struct + CostBasisOP float64 + CurrentValuationOP float64 + Equity float64 + EquivalentBalance float64 + FreeMargin float64 + MarginLevel float64 + MarginOP float64 + TradeBalance float64 + UnrealizedNetProfitLossOP float64 + type TradeHistoryInfo struct + AssetPair string + Cost float64 + Fee float64 + Margin float64 + Misc string + OrderType string + PostxID string + Price float64 + Time float64 + TransactionID string + Type string + Volume float64 + type TradeInfo struct + Buy bool + Limit bool + Market bool + Miscellaneous string + Price string + PriceFloat float64 + Sell bool + Time int64 + Volume string + VolumeFloat float64 + type TradeVolumeResponse struct + Currency string + Fees Fees + FeesMaker Fees + Volume float64 + type TradesHistoryResponse struct + Count int + Trades map[string]TradeHistoryInfo + type TradesResponse struct + Last int64 + Trades []TradeInfo + type WithdrawInfoResponse struct + Amount big.Float + Fee big.Float + Limit big.Float + Method string + type WithdrawResponse struct + RefID string