types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	Asset []struct {
		Asset         string `json:"asset"`
		MarginBalance string `json:"marginBalance"`
		Equity        string `json:"equity"`
		Available     string `json:"available"`
		Locked        string `json:"locked"`
		UnrealizedPNL string `json:"unrealizedPNL"`
	} `json:"asset"`
	Greek []struct {
		Underlying string `json:"underlying"`
		Delta      string `json:"delta"`
		Gamma      string `json:"gamma"`
		Theta      string `json:"theta"`
		Vega       string `json:"vega"`
	} `json:"greek"`
	Time int64 `json:"time"`
}

type CancelAllOrdersByUnderlyingParam

type CancelAllOrdersByUnderlyingParam struct {
	Underlying string `url:"underlying" validate:"required"`
}

type CancelAllOrdersByUnderlyingParams

type CancelAllOrdersByUnderlyingParams struct {
	CancelAllOrdersByUnderlyingParam
	bnutils.DefaultParam
}

type CancelAllOrdersParam

type CancelAllOrdersParam struct {
	Symbol string `url:"symbol" validate:"required"`
}

type CancelAllOrdersParams

type CancelAllOrdersParams struct {
	CancelAllOrdersParam
	bnutils.DefaultParam
}

type CancelOrderParam

type CancelOrderParam struct {
	Symbol        string `url:"symbol" validate:"required"`
	OrderID       int64  `url:"orderId,omitempty" validate:"omitempty"`
	ClientOrderID string `url:"clientOrderId,omitempty" validate:"omitempty"`
}

type CancelOrderParams

type CancelOrderParams struct {
	CancelOrderParam
	bnutils.DefaultParam
}

type ExerciseRecord

type ExerciseRecord struct {
	ID            string `json:"id"`
	Currency      string `json:"currency"`
	Symbol        string `json:"symbol"`
	ExercisePrice string `json:"exercisePrice"`
	MarkPrice     string `json:"markPrice"`
	Quantity      string `json:"quantity"`
	Amount        string `json:"amount"`
	Fee           string `json:"fee"`
	CreateDate    int64  `json:"createDate"`
	PriceScale    int    `json:"priceScale"`
	QuantityScale int    `json:"quantityScale"`
	OptionSide    string `json:"optionSide"`
	PositionSide  string `json:"positionSide"`
	QuoteAsset    string `json:"quoteAsset"`
}

type FundingFlow

type FundingFlow struct {
	ID         string `json:"id"`
	Asset      string `json:"asset"`
	Amount     string `json:"amount"`
	Type       string `json:"type"`
	CreateDate int64  `json:"createDate"`
}

type GetAccountInfoResp

type GetAccountInfoResp struct {
	Http *utils.ApiResponse
	Body *AccountInfo
}

type GetCurrentOpenOrdersParam

type GetCurrentOpenOrdersParam struct {
	Symbol    string `url:"symbol,omitempty" validate:"omitempty"`
	OrderID   int64  `url:"orderId,omitempty" validate:"omitempty"`
	StartTime int64  `url:"startTime,omitempty" validate:"omitempty"`
	EndTime   int64  `url:"endTime,omitempty" validate:"omitempty"`
	Limit     int    `url:"limit,omitempty" validate:"omitempty,max=1000"`
}

type GetCurrentOpenOrdersParams

type GetCurrentOpenOrdersParams struct {
	GetCurrentOpenOrdersParam
	bnutils.DefaultParam
}

type GetExerciseRecordParam

type GetExerciseRecordParam struct {
	Symbol    string `url:"symbol,omitempty" validate:"omitempty"`
	FromID    int64  `url:"fromId,omitempty" validate:"omitempty"`
	StartTime int64  `url:"startTime,omitempty" validate:"omitempty"`
	EndTime   int64  `url:"endTime,omitempty" validate:"omitempty"`
	Limit     int    `url:"limit,omitempty" validate:"omitempty,max=1000"`
}

type GetExerciseRecordParams

type GetExerciseRecordParams struct {
	GetExerciseRecordParam
	bnutils.DefaultParam
}

type GetFundingFlowParam

type GetFundingFlowParam struct {
	Currency  string `url:"currency" validate:"required"`
	RecordID  int64  `url:"recordId,omitempty" validate:"omitempty"`
	StartTime int64  `url:"startTime,omitempty" validate:"omitempty"`
	EndTime   int64  `url:"endTime,omitempty" validate:"omitempty"`
	Limit     int    `url:"limit,omitempty" validate:"omitempty,max=1000"`
}

type GetFundingFlowParams

type GetFundingFlowParams struct {
	GetFundingFlowParam
	bnutils.DefaultParam
}

type GetFundingFlowResp

type GetFundingFlowResp struct {
	Http *utils.ApiResponse
	Body []*FundingFlow
}

type GetOrderHistoryParam

type GetOrderHistoryParam struct {
	Symbol    string `url:"symbol" validate:"required"`
	OrderID   int64  `url:"orderId,omitempty" validate:"omitempty"`
	StartTime int64  `url:"startTime,omitempty" validate:"omitempty"`
	EndTime   int64  `url:"endTime,omitempty" validate:"omitempty"`
	Limit     int    `url:"limit,omitempty" validate:"omitempty,max=1000"`
}

type GetOrderHistoryParams

type GetOrderHistoryParams struct {
	GetOrderHistoryParam
	bnutils.DefaultParam
}

type GetPositionInfoParam

type GetPositionInfoParam struct {
	Symbol string `url:"symbol,omitempty" validate:"omitempty"`
}

type GetPositionInfoParams

type GetPositionInfoParams struct {
	GetPositionInfoParam
	bnutils.DefaultParam
}

type GetPositionInfoResp

type GetPositionInfoResp struct {
	Http *utils.ApiResponse
	Body []*Position
}

type GetSingleOrderParam

type GetSingleOrderParam struct {
	Symbol        string `url:"symbol" validate:"required"`
	OrderID       int64  `url:"orderId,omitempty" validate:"omitempty"`
	ClientOrderID string `url:"clientOrderId,omitempty" validate:"omitempty"`
}

type GetSingleOrderParams

type GetSingleOrderParams struct {
	GetSingleOrderParam
	bnutils.DefaultParam
}

type GetTradeListParam

type GetTradeListParam struct {
	Symbol    string `url:"symbol,omitempty" validate:"omitempty"`
	FromID    int64  `url:"fromId,omitempty" validate:"omitempty"`
	StartTime int64  `url:"startTime,omitempty" validate:"omitempty"`
	EndTime   int64  `url:"endTime,omitempty" validate:"omitempty"`
	Limit     int    `url:"limit,omitempty" validate:"omitempty,max=1000"`
}

type GetTradeListParams

type GetTradeListParams struct {
	GetTradeListParam
	bnutils.DefaultParam
}

type GetTradeListResp

type GetTradeListResp struct {
	Http *utils.ApiResponse
	Body []*UserTrade
}

type NewOrderParam

type NewOrderParam struct {
	Symbol           string                   `url:"symbol" validate:"required"`
	Side             eoutils.OrderSide        `url:"side" validate:"required,oneof=BUY SELL"`
	Type             eoutils.OrderType        `url:"type" validate:"required"`
	Quantity         float64                  `url:"quantity" validate:"required"`
	Price            float64                  `url:"price,omitempty" validate:"omitempty"`
	TimeInForce      eoutils.TimeInForce      `url:"timeInForce,omitempty" validate:"omitempty"`
	ReduceOnly       bool                     `url:"reduceOnly,omitempty" validate:"omitempty"`
	PostOnly         bool                     `url:"postOnly,omitempty" validate:"omitempty"`
	NewOrderRespType eoutils.NewOrderRespType `url:"newOrderRespType,omitempty" validate:"omitempty"`
	ClientOrderID    string                   `url:"clientOrderId,omitempty" validate:"omitempty"`
	IsMmp            bool                     `url:"isMmp,omitempty" validate:"omitempty"`
}

type NewOrderParams

type NewOrderParams struct {
	NewOrderParam
	bnutils.DefaultParam
}

type Order

type Order struct {
	OrderID       int64  `json:"orderId"`
	Symbol        string `json:"symbol"`
	Price         string `json:"price"`
	Quantity      string `json:"quantity"`
	ExecutedQty   string `json:"executedQty"`
	Fee           string `json:"fee"`
	Side          string `json:"side"`
	Type          string `json:"type"`
	TimeInForce   string `json:"timeInForce"`
	ReduceOnly    bool   `json:"reduceOnly"`
	PostOnly      bool   `json:"postOnly"`
	CreateTime    int64  `json:"createTime"`
	UpdateTime    int64  `json:"updateTime"`
	Status        string `json:"status"`
	AvgPrice      string `json:"avgPrice"`
	Source        string `json:"source,omitempty"`
	ClientOrderID string `json:"clientOrderId"`
	PriceScale    int    `json:"priceScale"`
	QuantityScale int    `json:"quantityScale"`
	OptionSide    string `json:"optionSide"`
	QuoteAsset    string `json:"quoteAsset"`
	Mmp           bool   `json:"mmp"`
}

type OrderResp

type OrderResp struct {
	Http *utils.ApiResponse
	Body *Order
}

type OrdersResp

type OrdersResp struct {
	Http *utils.ApiResponse
	Body []*Order
}

type Position

type Position struct {
	EntryPrice    string `json:"entryPrice"`
	Symbol        string `json:"symbol"`
	Side          string `json:"side"`
	Quantity      string `json:"quantity"`
	ReducibleQty  string `json:"reducibleQty"`
	MarkValue     string `json:"markValue"`
	Ror           string `json:"ror"`
	UnrealizedPNL string `json:"unrealizedPNL"`
	MarkPrice     string `json:"markPrice"`
	StrikePrice   string `json:"strikePrice"`
	PositionCost  string `json:"positionCost"`
	ExpiryDate    int64  `json:"expiryDate"`
	PriceScale    int    `json:"priceScale"`
	QuantityScale int    `json:"quantityScale"`
	OptionSide    string `json:"optionSide"`
	QuoteAsset    string `json:"quoteAsset"`
}

type UserTrade

type UserTrade struct {
	ID             int64  `json:"id"`
	TradeID        int64  `json:"tradeId"`
	OrderID        int64  `json:"orderId"`
	Symbol         string `json:"symbol"`
	Price          string `json:"price"`
	Quantity       string `json:"quantity"`
	Fee            string `json:"fee"`
	RealizedProfit string `json:"realizedProfit"`
	Side           string `json:"side"`
	Type           string `json:"type"`
	Volatility     string `json:"volatility"`
	Liquidity      string `json:"liquidity"`
	QuoteAsset     string `json:"quoteAsset"`
	Time           int64  `json:"time"`
	PriceScale     int    `json:"priceScale"`
	QuantityScale  int    `json:"quantityScale"`
	OptionSide     string `json:"optionSide"`
}

Jump to

Keyboard shortcuts

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