bitz

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSpotAPI

func NewSpotAPI(client *http.Client, apikey, secretkey, tradepwd string) SpotAPI

*

  • spot

func NewSpotWebsocket

func NewSpotWebsocket(wsURL, proxyURL string) (sw SpotWebsocket, err error)

Types

type Bitz

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

func (*Bitz) Cancel

func (bitz *Bitz) Cancel(orderId string, pair CurrencyPair) (bool, error)

func (*Bitz) GetAccount

func (bitz *Bitz) GetAccount() (*Account, error)

func (*Bitz) GetAllCurrencyPair

func (bitz *Bitz) GetAllCurrencyPair() (map[string]SymbolSetting, error)

func (*Bitz) GetAllCurrencyStatus

func (bitz *Bitz) GetAllCurrencyStatus() (all map[string]CurrencyStatus, err error)

func (*Bitz) GetAllTicker

func (bitz *Bitz) GetAllTicker() ([]Ticker, error)

func (*Bitz) GetCurrencyStatus

func (bitz *Bitz) GetCurrencyStatus(currency Currency) (CurrencyStatus, error)

func (*Bitz) GetDepth

func (bitz *Bitz) GetDepth(pair CurrencyPair, size int, step int) (*Depth, error)

func (*Bitz) GetExchangeName

func (bitz *Bitz) GetExchangeName() string

func (*Bitz) GetFinishedOrders

func (bitz *Bitz) GetFinishedOrders(pair CurrencyPair) ([]Order, error)

func (*Bitz) GetKlineRecords

func (bitz *Bitz) GetKlineRecords(pair CurrencyPair, period KlinePeriod, size, since int) ([]Kline, error)

倒序

func (*Bitz) GetOrder

func (bitz *Bitz) GetOrder(orderId string, pair CurrencyPair) (*Order, error)

func (*Bitz) GetOrderDeal

func (bitz *Bitz) GetOrderDeal(orderId string, pair CurrencyPair) ([]OrderDeal, error)

func (*Bitz) GetPendingOrders

func (bitz *Bitz) GetPendingOrders(pair CurrencyPair) ([]Order, error)

func (*Bitz) GetTicker

func (bitz *Bitz) GetTicker(pair CurrencyPair) (*Ticker, error)

func (*Bitz) GetTradeFee

func (bitz *Bitz) GetTradeFee(symbols string) (tf *TradeFee, err error)

func (*Bitz) GetTradeFeeMap

func (bitz *Bitz) GetTradeFeeMap() (tfmap map[string]TradeFee, err error)

func (*Bitz) GetTrades

func (bitz *Bitz) GetTrades(pair CurrencyPair, size int) ([]Trade, error)

func (*Bitz) GetURL

func (bitz *Bitz) GetURL() string

func (*Bitz) GetUserTrades

func (bitz *Bitz) GetUserTrades(pair CurrencyPair) ([]Trade, error)

func (*Bitz) LimitBuy

func (bitz *Bitz) LimitBuy(pair CurrencyPair, price, amount string) (*Order, error)

func (*Bitz) LimitSell

func (bitz *Bitz) LimitSell(pair CurrencyPair, price, amount string) (*Order, error)

func (*Bitz) MarketBuy

func (bitz *Bitz) MarketBuy(pair CurrencyPair, amount string) (*Order, error)

func (*Bitz) MarketSell

func (bitz *Bitz) MarketSell(pair CurrencyPair, amount string) (*Order, error)

func (*Bitz) SetURL

func (bitz *Bitz) SetURL(exurl string)

type BitzSpotWs

type BitzSpotWs struct {
	SpotWsBase
	// contains filtered or unexported fields
}

func (*BitzSpotWs) FormatTopicName

func (ws *BitzSpotWs) FormatTopicName(topic string, pair CurrencyPair) string

格式化流名称

func (*BitzSpotWs) FormatTopicSubData

func (ws *BitzSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte

格式化流订阅消息

func (*BitzSpotWs) FormatTopicUnsubData

func (ws *BitzSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte

格式化流取消订阅消息

func (*BitzSpotWs) GetExchangeName

func (ws *BitzSpotWs) GetExchangeName() string

func (*BitzSpotWs) OnMessage

func (ws *BitzSpotWs) OnMessage(data []byte) (err error)

消息解析函数

type TradeFee

type TradeFee struct {
	Symbol          string  `json:"symbol"`
	ActualMakerRate float64 `json:"actualMakerRate,string"` // 挂单手续费
	ActualTakerRate float64 `json:"actualTakerRate,string"` // 吃单手续费
}

"symbol": "btcusdt", "makerFeeRate":"0.002", "takerFeeRate":"0.002", "actualMakerRate": "0.002", "actualTakerRate":"0.002

Jump to

Keyboard shortcuts

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