model

package
v2.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 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 ExecutionEventsReq

type ExecutionEventsReq struct {
	model.WebsocketRequestCommon
}

func NewExecutionEventsReq

func NewExecutionEventsReq(command consts.WebSocketCommand, channel consts.WebSocketChannel) ExecutionEventsReq

type ExecutionEventsRes

type ExecutionEventsRes struct {
	model.WebsocketResponseCommon
	OrderID            int64                `json:"orderId"`
	ExecutionID        int64                `json:"executionId"`
	Symbol             consts.Symbol        `json:"symbol"`
	SettleType         consts.SettleType    `json:"settleType"`
	ExecutionType      consts.ExecutionType `json:"executionType"`
	Side               consts.Side          `json:"side"`
	ExecutionPrice     decimal.Decimal      `json:"executionPrice"`
	ExecutionSize      decimal.Decimal      `json:"executionSize"`
	PositionID         int64                `json:"positionId"`
	OrderTimestamp     time.Time            `json:"orderTimestamp"`
	ExecutionTimestamp time.Time            `json:"executionTimestamp"`
	LossGain           decimal.Decimal      `json:"lossGain"`
	Fee                decimal.Decimal      `json:"fee"`
	OrderPrice         decimal.Decimal      `json:"orderPrice"`
	OrderSize          decimal.Decimal      `json:"orderSize"`
	OrderExecutedSize  decimal.Decimal      `json:"orderExecutedSize"`
	TimeInForce        consts.TimeInForce   `json:"timeInForce"`
	MsgType            consts.MsgType       `json:"msgType"`
}

type OrderEventsReq

type OrderEventsReq struct {
	model.WebsocketRequestCommon
}

func NewOrderEventsReq

func NewOrderEventsReq(command consts.WebSocketCommand, channel consts.WebSocketChannel) OrderEventsReq

type OrderEventsRes

type OrderEventsRes struct {
	model.PrivateWebsocketResponseCommon
	OrderID           int64                `json:"orderId"`
	Symbol            consts.Symbol        `json:"symbol"`
	SettleType        consts.SettleType    `json:"settleType"`
	ExecutionType     consts.ExecutionType `json:"executionType"`
	Side              consts.Side          `json:"side"`
	OrderStatus       consts.OrderStatus   `json:"orderStatus"`
	CancelType        consts.CancelType    `json:"cancelType"`
	OrderTimestamp    time.Time            `json:"orderTimestamp"`
	OrderPrice        decimal.Decimal      `json:"orderPrice"`
	OrderSize         decimal.Decimal      `json:"orderSize"`
	OrderExecutedSize decimal.Decimal      `json:"orderExecutedSize"`
	LosscutPrice      decimal.Decimal      `json:"losscutPrice"`
	TimeInForce       consts.TimeInForce   `json:"timeInForce"`
}

type PositionEventsReq

type PositionEventsReq struct {
	model.WebsocketRequestCommon
}

func NewPositionEventsReq

func NewPositionEventsReq(command consts.WebSocketCommand, channel consts.WebSocketChannel) PositionEventsReq

type PositionEventsRes

type PositionEventsRes struct {
	model.PrivateWebsocketResponseCommon
	PositionID   int64           `json:"positionId"`
	Symbol       consts.Symbol   `json:"symbol"`
	Side         consts.Side     `json:"side"`
	Size         decimal.Decimal `json:"size"`
	OrderdSize   decimal.Decimal `json:"orderdSize"`
	Price        decimal.Decimal `json:"price"`
	LossGain     decimal.Decimal `json:"lossGain"`
	Leverage     decimal.Decimal `json:"leverage"`
	LosscutPrice decimal.Decimal `json:"losscutPrice"`
	Timestamp    time.Time       `json:"timestamp"`
}

type PositionSummaryEventsReq

type PositionSummaryEventsReq struct {
	model.WebsocketRequestCommon
	Option string `json:"option,omitempty"`
}

func NewPositionSummaryEventsReq

func NewPositionSummaryEventsReq(command consts.WebSocketCommand, channel consts.WebSocketChannel, isPeriodic bool) PositionSummaryEventsReq

type PositionSummaryEventsRes

type PositionSummaryEventsRes struct {
	model.PrivateWebsocketResponseCommon
	Symbol              consts.Symbol   `json:"symbol"`
	Side                consts.Side     `json:"side"`
	AveragePositionRate decimal.Decimal `json:"averagePositionRate"`
	PositionLossGain    decimal.Decimal `json:"positionLossGain"`
	SumOrderQuantity    decimal.Decimal `json:"sumOrderQuantity"`
	SumPositionQuantity decimal.Decimal `json:"sumPositionQuantity"`
	Timestamp           time.Time       `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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