Documentation ¶
Index ¶
Constants ¶
View Source
const (
// https://binance-docs.github.io/apidocs/futures/en/#new-order-trade
EndpointNewOrder = "/fapi/v1/order"
)
View Source
const (
// https://binance-docs.github.io/apidocs/futures/en/#query-order-user_data
EndpointQueryOrder = "/fapi/v1/order"
)
Variables ¶
This section is empty.
Functions ¶
func NewOrderData ¶
func NewOrderData(connRest ConnectorRest, parm NewOrderParam) ([]byte, error)
func QueryOrderData ¶
func QueryOrderData(connRest ConnectorRest, parm QueryOrderParam) ([]byte, error)
Types ¶
type NewOrderParam ¶
type NewOrderParam struct { Symbol string `structs:"symbol"` Side OrderSideType `structs:"side"` PositionSide PositionSideType `structs:"positionSide,omitempty"` // optional Type OrderType `structs:"type"` TimeInForce TimeInForceType `structs:"timeInForce,omitempty"` // optional Quantity float64 `structs:"quantity,omitempty"` // optional ReduceOnly string `structs:"reduceOnly,omitempty"` // optional Price float64 `structs:"price,omitempty"` // optional NewClientOrderId string `structs:"newClientOrderId,omitempty"` // optional StopPrice float64 `structs:"stopPrice,omitempty"` // optional ClosePosition string `structs:"closePosition,omitempty"` // optional ActivationPrice float64 `structs:"activationPrice,omitempty"` // optional CallbackRate float64 `structs:"callbackRate,omitempty"` // optional WorkingType WorkingType `structs:"workingType,omitempty"` // optional PriceProtect string `structs:"priceProtect,omitempty"` // optional NewOrderRespType NewOrderRespType `structs:"newOrderRespType,omitempty"` // optional RecvWindow int `structs:"-"` // optional }
type NewOrderResp ¶
type NewOrderResp struct { ClientOrderID string `json:"clientOrderId"` CumQty string `json:"cumQty"` CumQuote string `json:"cumQuote"` ExecutedQty string `json:"executedQty"` OrderID string `json:"orderId"` AvgPrice string `json:"avgPrice"` OrigQty string `json:"origQty"` Price string `json:"price"` ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` PositionSide string `json:"positionSide"` Status string `json:"status"` StopPrice string `json:"stopPrice"` ClosePosition bool `json:"closePosition"` Symbol string `json:"symbol"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` OrigType string `json:"origType"` ActivatePrice string `json:"activatePrice"` PriceRate string `json:"priceRate"` UpdateTime int64 `json:"updateTime"` WorkingType string `json:"workingType"` PriceProtect bool `json:"priceProtect"` }
func NewOrder ¶
func NewOrder(connRest ConnectorRest, parm NewOrderParam) (NewOrderResp, error)
type QueryOrderParam ¶
type QueryOrderResp ¶
type QueryOrderResp struct { AvgPrice string `json:"avgPrice"` ClientOrderID string `json:"clientOrderId"` CumQuote string `json:"cumQuote"` ExecutedQty string `json:"executedQty"` OrderID int `json:"orderId"` OrigQty string `json:"origQty"` OrigType string `json:"origType"` Price string `json:"price"` ReduceOnly bool `json:"reduceOnly"` Side string `json:"side"` PositionSide string `json:"positionSide"` Status string `json:"status"` Time int64 `json:"time"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` ActivatePrice string `json:"activatePrice"` PriceRate string `json:"priceRate"` UpdateTime int64 `json:"updateTime"` WorkingType string `json:"workingType"` PriceProtect bool `json:"priceProtect"` }
func QueryOrder ¶
func QueryOrder(connRest ConnectorRest, parm QueryOrderParam) (QueryOrderResp, error)
Click to show internal directories.
Click to hide internal directories.