ws

package
v0.0.0-...-a4f9000 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountResponse

type AccountResponse struct {
	base.WsBaseResponse
	Data AccountVo `json:"data"`
}

type AccountVo

type AccountVo account.AccountVo

type Depth1Message

type Depth1Message struct {
	InstrumentId string      `json:"instrument_id"`
	Bids         [][2]string `json:"bids"` // [[<price>, <qty>]]
	Asks         [][2]string `json:"asks"`
}

type Depth1Response

type Depth1Response struct {
	base.WsBaseResponse
	Data Depth1Message `json:"data"`
}

type DepthSnapshotMessage

type DepthSnapshotMessage struct {
	Type         string      `json:"type,omitempty"`
	InstrumentId string      `json:"instrument_id"`
	Sequence     int64       `json:"sequence"`
	Bids         [][2]string `json:"bids"` // [[<price>, <qty>]]
	Asks         [][2]string `json:"asks"`
}

type DepthSnapshotResponse

type DepthSnapshotResponse struct {
	base.WsBaseResponse
	Data DepthSnapshotMessage `json:"data"`
}

type DepthUpdateMessage

type DepthUpdateMessage struct {
	Type         string      `json:"type"`
	InstrumentId string      `json:"instrument_id"`
	Sequence     int64       `json:"sequence"`
	PrevSequence int64       `json:"prev_sequence"`
	Changes      [][3]string `json:"changes"` // [[<side>, <price>, <qty>]]
}

type DepthUpdateResponse

type DepthUpdateResponse struct {
	base.WsBaseResponse
	Data DepthUpdateMessage `json:"data"`
}

type GetWsAuthTokenResponse

type GetWsAuthTokenResponse struct {
	base.RestBaseResponse
	Data WsToken `json:"data"`
}

type IndexMessage

type IndexMessage struct {
	IndexName  string `json:"index_name"`
	IndexPrice string `json:"index_price"`
}

type IndexPriceResponse

type IndexPriceResponse struct {
	base.WsBaseResponse
	Data IndexMessage `json:"data"`
}

type KlineMessage

type KlineMessage struct {
	InstrumentId string `json:"instrument_id"`
	Tick         int64  `json:"tick"`
	Open         string `json:"open"`
	Close        string `json:"close"`
	High         string `json:"high"`
	Low          string `json:"low"`
	Volume       string `json:"volume"`
}

type KlineResponse

type KlineResponse struct {
	base.WsBaseResponse
	Data KlineMessage `json:"data"`
}

type MarkPriceMessage

type MarkPriceMessage struct {
	InstrumentId string `json:"instrument_id"`
	MarkPrice    string `json:"mark_price"`
	Sigma        string `json:"sigma"`
	Delta        string `json:"delta"`
	Vega         string `json:"vega"`
	Theta        string `json:"theta"`
	Gama         string `json:"gama"`
}

type MarkPriceResponse

type MarkPriceResponse struct {
	base.WsBaseResponse
	Data MarkPriceMessage `json:"data"`
}

type MarketTradeResponse

type MarketTradeResponse struct {
	base.WsBaseResponse
	Data []TradeMessage `json:"data"`
}

type OrderBookMessage

type OrderBookMessage struct {
	InstrumentId string      `json:"instrument_id"`
	Sequence     int64       `json:"sequence"`
	Bids         [][2]string `json:"bids"` // [[<price>, <qty>]]
	Asks         [][2]string `json:"asks"`
}

type OrderBookResponse

type OrderBookResponse struct {
	base.WsBaseResponse
	Data OrderBookMessage `json:"data"`
}

type OrderResponse

type OrderResponse struct {
	base.WsBaseResponse
	Data []OrderVo `json:"data"`
}

type OrderVo

type OrderVo order.OrderActionVo

type PingMessage

type PingMessage struct {
	Ping int64 `json:"ping"`
}

type PositionResponse

type PositionResponse struct {
	base.WsBaseResponse
	Data []PositionVo `json:"data"`
}

type PositionVo

type PositionVo account.PositionVo

type SubscriptionFailMessage

type SubscriptionFailMessage struct {
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

type SubscriptionFailResponse

type SubscriptionFailResponse struct {
	base.WsBaseResponse
	Data SubscriptionFailMessage `json:"data"`
}

type SubscriptionSuccessMessage

type SubscriptionSuccessMessage struct {
	Code         int64    `json:"code"`
	Subscription []string `json:"subscription"`
}

type SubscriptionSuccessResponse

type SubscriptionSuccessResponse struct {
	base.WsBaseResponse
	Data SubscriptionSuccessMessage `json:"data"`
}

type TickerMessage

type TickerMessage market.TickerVo

type TickerResponse

type TickerResponse struct {
	base.WsBaseResponse
	Data TickerMessage `json:"data"`
}

type TradeMessage

type TradeMessage struct {
	InstrumentId string `json:"instrument_id"`
	TradeId      string `json:"trade_id"`
	Price        string `json:"price"`
	Qty          string `json:"qty"`
	Side         string `json:"side"`
	Sigma        string `json:"sigma"`
	OptionType   string `json:"option_type"`
	IsBlockTrade bool   `json:"is_block_trade"`
	CreatedAt    int64  `json:"created_at"`
}

type TradeResponse

type TradeResponse struct {
	base.WsBaseResponse
	Data []TradeMessage `json:"data"`
}

type TradeVo

type TradeVo order.TradeVo

type UpdateCtrlMessage

type UpdateCtrlMessage struct {
	Type string
	Data interface{}
}

type UserTradeResponse

type UserTradeResponse struct {
	base.WsBaseResponse
	Data []TradeVo `json:"data"`
}

type WsToken

type WsToken struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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