market

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIN1  = "1min"
	MIN5  = "5min"
	MIN15 = "15min"
	MIN30 = "30min"
	MIN60 = "60min"
	HOUR4 = "4hour"
	DAY1  = "1day"
	MON1  = "1mon"
	WEEK1 = "1week"
	YEAR1 = "1year"
)
View Source
const (
	DEPTH_SIZE_FIVE   = 5
	DEPTH_SIZE_TEN    = 10
	DEPTH_SIZE_TWENTY = 20
)
View Source
const (
	STEP0 = "step0"
	STEP1 = "step1"
	STEP2 = "step2"
	STEP3 = "step3"
	STEP4 = "step4"
	STEP5 = "step5"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Candlestick

type Candlestick struct {
	Amount decimal.Decimal `json:"amount"`
	Open   decimal.Decimal `json:"open"`
	Close  decimal.Decimal `json:"close"`
	High   decimal.Decimal `json:"high"`
	Id     int64           `json:"id"`
	Count  int64           `json:"count"`
	Low    decimal.Decimal `json:"low"`
	Vol    decimal.Decimal `json:"vol"`
}

type CandlestickAskBid

type CandlestickAskBid struct {
	Amount  decimal.Decimal   `json:"amount"`
	Open    decimal.Decimal   `json:"open"`
	Close   decimal.Decimal   `json:"close"`
	High    decimal.Decimal   `json:"high"`
	Id      int64             `json:"id"`
	Count   int64             `json:"count"`
	Low     decimal.Decimal   `json:"low"`
	Vol     decimal.Decimal   `json:"vol"`
	Version int64             `json:"version"`
	Bid     []decimal.Decimal `json:"bid"`
	Ask     []decimal.Decimal `json:"ask"`
}

type Depth

type Depth struct {
	Timestamp int64               `json:"ts"`
	Version   int64               `json:"version"`
	Bids      [][]decimal.Decimal `json:"bids"`
	Asks      [][]decimal.Decimal `json:"asks"`
}

type GetAllSymbolsLast24hCandlesticksAskBidResponse

type GetAllSymbolsLast24hCandlesticksAskBidResponse struct {
	Status string              `json:"status"`
	Ts     int64               `json:"ts"`
	Data   []SymbolCandlestick `json:"data"`
}

type GetCandlestickOptionalRequest

type GetCandlestickOptionalRequest struct {
	Period string
	Size   int
}

type GetCandlestickResponse

type GetCandlestickResponse struct {
	Status string        `json:"status"`
	Ch     string        `json:"ch"`
	Ts     int64         `json:"ts"`
	Data   []Candlestick `json:"data"`
}

type GetDepthOptionalRequest

type GetDepthOptionalRequest struct {
	Size int
}

type GetDepthResponse

type GetDepthResponse struct {
	Status string `json:"status"`
	Ch     string `json:"ch"`
	Ts     int64  `json:"ts"`
	Tick   *Depth `json:"tick"`
}

type GetHistoricalTradeOptionalRequest

type GetHistoricalTradeOptionalRequest struct {
	Size int
}

type GetHistoricalTradeResponse

type GetHistoricalTradeResponse struct {
	Status string      `json:"status"`
	Ch     string      `json:"ch"`
	Ts     int64       `json:"ts"`
	Data   []TradeTick `json:"data"`
}

type GetLast24hCandlestick

type GetLast24hCandlestick struct {
	Status string       `json:"status"`
	Ch     string       `json:"ch"`
	Ts     int64        `json:"ts"`
	Tick   *Candlestick `json:"tick"`
}

type GetLast24hCandlestickAskBidResponse

type GetLast24hCandlestickAskBidResponse struct {
	Status string             `json:"status"`
	Ch     string             `json:"ch"`
	Ts     int64              `json:"ts"`
	Tick   *CandlestickAskBid `json:"tick"`
}

type GetLatestTradeResponse

type GetLatestTradeResponse struct {
	Status string     `json:"status"`
	Ch     string     `json:"ch"`
	Ts     int64      `json:"ts"`
	Tick   *TradeTick `json:"tick"`
}

type MarketByPrice

type MarketByPrice struct {
	SeqNum     int64               `json:"seqNum"`
	PrevSeqNum int64               `json:"prevSeqNum"`
	Bids       [][]decimal.Decimal `json:"bids"`
	Asks       [][]decimal.Decimal `json:"asks"`
}

type SubscribeBestBidOfferResponse

type SubscribeBestBidOfferResponse struct {
	base.WebSocketResponseBase
	Tick *struct {
		QuoteTime int64           `json:"quoteTime"`
		Symbol    string          `json:"symbol"`
		Bid       decimal.Decimal `json:"bid"`
		BidSize   decimal.Decimal `json:"bidSize"`
		Ask       decimal.Decimal `json:"ask"`
		AskSize   decimal.Decimal `json:"askSize"`
	}
}

type SubscribeCandlestickResponse

type SubscribeCandlestickResponse struct {
	Tick *Tick
	Data []Tick
	// contains filtered or unexported fields
}

type SubscribeDepthResponse

type SubscribeDepthResponse struct {
	base.WebSocketResponseBase
	Data *Depth
	Tick *Depth
}

type SubscribeLast24hCandlestickResponse

type SubscribeLast24hCandlestickResponse struct {
	base.WebSocketResponseBase
	Data *Candlestick
	Tick *Candlestick
}

type SubscribeMarketByPriceResponse

type SubscribeMarketByPriceResponse struct {
	base.WebSocketResponseBase
	Tick *MarketByPrice
	Data *MarketByPrice
}

type SubscribeTradeResponse

type SubscribeTradeResponse struct {
	base.WebSocketResponseBase
	Data []Trade
	Tick *struct {
		Id        int64 `json:"id"`
		Timestamp int64 `json:"ts"`
		Data      []Trade
	}
}

type SymbolCandlestick

type SymbolCandlestick struct {
	Amount  decimal.Decimal `json:"amount"`
	Open    decimal.Decimal `json:"open"`
	Close   decimal.Decimal `json:"close"`
	High    decimal.Decimal `json:"high"`
	Symbol  string          `json:"symbol"`
	Count   int64           `json:"count"`
	Low     decimal.Decimal `json:"low"`
	Vol     decimal.Decimal `json:"vol"`
	Bid     decimal.Decimal `json:"bid"`
	BidSize decimal.Decimal `json:"bidSize"`
	Ask     decimal.Decimal `json:"ask"`
	AskSize decimal.Decimal `json:"askSize"`
}

type Tick

type Tick struct {
	Id     int64           `json:"id"`
	Amount decimal.Decimal `json:"amount"`
	Count  int             `json:"count"`
	Open   decimal.Decimal `json:"open"`
	Close  decimal.Decimal `json:"close"`
	Low    decimal.Decimal `json:"low"`
	High   decimal.Decimal `json:"high"`
	Vol    decimal.Decimal `json:"vol"`
}

type Trade

type Trade struct {
	TradeId   int64           `json:"tradeId"`
	Amount    decimal.Decimal `json:"amount"`
	Price     decimal.Decimal `json:"price"`
	Timestamp int64           `json:"ts"`
	Direction string          `json:"direction"`
}

type TradeTick

type TradeTick struct {
	Id   int64 `json:"id"`
	Ts   int64 `json:"ts"`
	Data []struct {
		Amount    decimal.Decimal `json:"amount"`
		TradeId   int64           `json:"trade-id"`
		Ts        int64           `json:"ts"`
		Id        decimal.Decimal `json:"id"`
		Price     decimal.Decimal `json:"price"`
		Direction string          `json:"direction"`
	}
}

Jump to

Keyboard shortcuts

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