jbex

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: 9 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 string) SpotAPI

*

  • spot

func NewSpotWebsocket

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

Types

type JBEXWs

type JBEXWs struct {
	SpotWsBase
}

func (*JBEXWs) FormatTopicName

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

格式化流名称

func (*JBEXWs) FormatTopicSubData

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

格式化流订阅消息

func (*JBEXWs) FormatTopicUnsubData

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

格式化流取消订阅消息

func (*JBEXWs) GetExchangeName

func (ws *JBEXWs) GetExchangeName() string

func (*JBEXWs) OnMessage

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

type JbexSpot

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

func (*JbexSpot) Cancel

func (jbex *JbexSpot) Cancel(orderId string, pair CurrencyPair) (bool, error)

func (*JbexSpot) GetAccount

func (jbex *JbexSpot) GetAccount() (*Account, error)

func (*JbexSpot) GetAllCurrencyPair

func (jbex *JbexSpot) GetAllCurrencyPair() (map[string]SymbolSetting, error)

func (*JbexSpot) GetAllCurrencyStatus

func (jbex *JbexSpot) GetAllCurrencyStatus() (all map[string]CurrencyStatus, err error)

func (*JbexSpot) GetAllTicker

func (jbex *JbexSpot) GetAllTicker() ([]Ticker, error)

func (*JbexSpot) GetCurrencyStatus

func (jbex *JbexSpot) GetCurrencyStatus(currency Currency) (CurrencyStatus, error)

func (*JbexSpot) GetDepth

func (jbex *JbexSpot) GetDepth(pair CurrencyPair, size int, step int) (*Depth, error)

func (*JbexSpot) GetExchangeName

func (jbex *JbexSpot) GetExchangeName() string

func (*JbexSpot) GetFinishedOrders

func (jbex *JbexSpot) GetFinishedOrders(pair CurrencyPair) ([]Order, error)

func (*JbexSpot) GetKlineRecords

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

倒序

func (*JbexSpot) GetOrder

func (jbex *JbexSpot) GetOrder(orderId string, pair CurrencyPair) (*Order, error)

func (*JbexSpot) GetOrderDeal

func (jbex *JbexSpot) GetOrderDeal(orderId string, pair CurrencyPair) ([]OrderDeal, error)

func (*JbexSpot) GetPendingOrders

func (jbex *JbexSpot) GetPendingOrders(pair CurrencyPair) ([]Order, error)

func (*JbexSpot) GetTicker

func (jbex *JbexSpot) GetTicker(pair CurrencyPair) (*Ticker, error)

func (*JbexSpot) GetTrades

func (jbex *JbexSpot) GetTrades(pair CurrencyPair, size int) ([]Trade, error)

func (*JbexSpot) GetURL

func (jbex *JbexSpot) GetURL() string

func (*JbexSpot) GetUserTrades

func (jbex *JbexSpot) GetUserTrades(pair CurrencyPair) ([]Trade, error)

func (*JbexSpot) LimitBuy

func (jbex *JbexSpot) LimitBuy(pair CurrencyPair, price, amount string) (*Order, error)

func (*JbexSpot) LimitSell

func (jbex *JbexSpot) LimitSell(pair CurrencyPair, price, amount string) (*Order, error)

func (*JbexSpot) MarketBuy

func (jbex *JbexSpot) MarketBuy(pair CurrencyPair, amount string) (*Order, error)

func (*JbexSpot) MarketSell

func (jbex *JbexSpot) MarketSell(pair CurrencyPair, amount string) (*Order, error)

func (*JbexSpot) SetURL

func (jbex *JbexSpot) SetURL(exurl string)

type TradeFee

type TradeFee struct {
	Maker float64 `json:"maker,string"` // 挂单手续费
	Taker float64 `json:"taker,string"` // 吃单手续费
}

Jump to

Keyboard shortcuts

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