Documentation ¶
Index ¶
- Constants
- func AccountInformationData(connRest ConnectorRest, parm AccountInformationParam) ([]byte, error)
- func AccountTradeListData(connRest ConnectorRest, parm AccountTradeListParam) ([]byte, error)
- func NewOrderData(connRest ConnectorRest, parm NewOrderParam) ([]byte, error)
- func QueryOpenOCOData(connRest ConnectorRest, parm QueryOpenOCOParam) ([]byte, error)
- func QueryOrderData(connRest ConnectorRest, parm QueryOrderParam) ([]byte, error)
- func TestNewOrderData(connRest ConnectorRest, parm TestNewOrderParam) ([]byte, error)
- type AccountInformationParam
- type AccountInformationResp
- type AccountTradeListParam
- type AccountTradeListResp
- type NewOrderParam
- type NewOrderResp
- type QueryOpenOCOParam
- type QueryOpenOCOResp
- type QueryOrderParam
- type QueryOrderResp
- type TestNewOrderParam
- type TestNewOrderResp
Constants ¶
View Source
const (
// https://binance-docs.github.io/apidocs/spot/en/#account-information-user_data
EndpointAccountInformation = "/api/v3/account"
)
View Source
const (
// https://binance-docs.github.io/apidocs/spot/en/#account-trade-list-user_data
EndpointAccountTradeList = "/api/v3/myTrades"
)
View Source
const (
// https://binance-docs.github.io/apidocs/spot/en/#new-order-trade
EndpointNewOrder = "/api/v3/order"
)
View Source
const (
// https://binance-docs.github.io/apidocs/spot/en/#query-open-oco-user_data
EndpointQueryOpenOCO = "/api/v3/openOrderList"
)
View Source
const (
// https://binance-docs.github.io/apidocs/spot/en/#query-order-user_data
EndpointQueryOrder = "/api/v3/order"
)
View Source
const EndpointTestNewOrder = "/api/v3/order/test"
https://binance-docs.github.io/apidocs/spot/en/#test-new-order-trade
Variables ¶
This section is empty.
Functions ¶
func AccountInformationData ¶ added in v0.1.0
func AccountInformationData(connRest ConnectorRest, parm AccountInformationParam) ([]byte, error)
func AccountTradeListData ¶ added in v0.1.0
func AccountTradeListData(connRest ConnectorRest, parm AccountTradeListParam) ([]byte, error)
func NewOrderData ¶ added in v0.1.0
func NewOrderData(connRest ConnectorRest, parm NewOrderParam) ([]byte, error)
func QueryOpenOCOData ¶ added in v0.1.0
func QueryOpenOCOData(connRest ConnectorRest, parm QueryOpenOCOParam) ([]byte, error)
func QueryOrderData ¶ added in v0.1.0
func QueryOrderData(connRest ConnectorRest, parm QueryOrderParam) ([]byte, error)
func TestNewOrderData ¶ added in v0.1.0
func TestNewOrderData(connRest ConnectorRest, parm TestNewOrderParam) ([]byte, error)
Types ¶
type AccountInformationParam ¶
type AccountInformationParam struct {
RecvWindow int // optional
}
type AccountInformationResp ¶
type AccountInformationResp struct { MakerCommission int `json:"makerCommission"` TakerCommission int `json:"takerCommission"` BuyerCommission int `json:"buyerCommission"` SellerCommission int `json:"sellerCommission"` CommissionRates struct { Maker string `json:"maker"` Taker string `json:"taker"` Buyer string `json:"buyer"` Seller string `json:"seller"` } `json:"commissionRates"` CanTrade bool `json:"canTrade"` CanWithdraw bool `json:"canWithdraw"` CanDeposit bool `json:"canDeposit"` Brokered bool `json:"brokered"` RequireSelfTradePrevention bool `json:"requireSelfTradePrevention"` UpdateTime int `json:"updateTime"` AccountType string `json:"accountType"` Balances []struct { Asset string `json:"asset"` Free string `json:"free"` Locked string `json:"locked"` } `json:"balances"` Permissions []string `json:"permissions"` }
func AccountInformation ¶
func AccountInformation(connRest ConnectorRest, parm AccountInformationParam) (AccountInformationResp, error)
type AccountTradeListParam ¶
type AccountTradeListParam struct { Symbol string `structs:"symbol"` OrderId int64 `structs:"orderId,omitempty"` // optional StartTime int64 `structs:"startTime,omitempty"` // optional EndTime int64 `structs:"endTime,omitempty"` // optional FromId int64 `structs:"fromId,omitempty"` // optional Limit int64 `structs:"limit,omitempty"` // optional RecvWindow int `structs:"-"` // optional }
type AccountTradeListResp ¶
type AccountTradeListResp []struct { Symbol string `json:"symbol"` ID int `json:"id"` OrderID int `json:"orderId"` OrderListID int `json:"orderListId"` Price string `json:"price"` Qty string `json:"qty"` QuoteQty string `json:"quoteQty"` Commission string `json:"commission"` CommissionAsset string `json:"commissionAsset"` Time int64 `json:"time"` IsBuyer bool `json:"isBuyer"` IsMaker bool `json:"isMaker"` IsBestMatch bool `json:"isBestMatch"` }
func AccountTradeList ¶
func AccountTradeList(connRest ConnectorRest, parm AccountTradeListParam) (AccountTradeListResp, error)
type NewOrderParam ¶
type NewOrderParam struct { Symbol string `structs:"symbol"` Side OrderSideType `structs:"side"` Type OrderType `structs:"type"` TimeInForce TimeInForceType `structs:"timeInForce,omitempty"` // optional Quantity string `structs:"quantity,omitempty"` // optional QuoteOrderQty string `structs:"quoteOrderQty,omitempty"` // optional Price string `structs:"price,omitempty"` // optional NewClientOrderId string `structs:"newClientOrderId,omitempty"` // optional StrategyId int64 `structs:"strategyId,omitempty"` // optional StrategyType int64 `structs:"strategyType,omitempty"` // optional StopPrice float64 `structs:"stopPrice,omitempty"` // optional TrailingDelta float64 `structs:"trailingDelta,omitempty"` // optional IcebergQty float64 `structs:"icebergQty,omitempty"` // optional NewOrderRespType NewOrderRespType `structs:"newOrderRespType,omitempty"` // optional SelfTradePreventionMode SelfTradePreventionModeType `structs:"selfTradePreventionMode,omitempty"` // optional RecvWindow int `structs:"-"` // optional }
type NewOrderResp ¶
type NewOrderResp struct { Symbol string `json:"symbol"` OrderID int `json:"orderId"` OrderListID int `json:"orderListId"` ClientOrderID string `json:"clientOrderId"` TransactTime int64 `json:"transactTime"` Price string `json:"price"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CummulativeQuoteQty string `json:"cummulativeQuoteQty"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` WorkingTime int64 `json:"workingTime"` SelfTradePreventionMode string `json:"selfTradePreventionMode"` Fills []struct { Price string `json:"price"` Qty string `json:"qty"` Commission string `json:"commission"` CommissionAsset string `json:"commissionAsset"` TradeID int `json:"tradeId"` } `json:"fills"` }
func NewOrder ¶
func NewOrder(connRest ConnectorRest, parm NewOrderParam) (NewOrderResp, error)
type QueryOpenOCOParam ¶
type QueryOpenOCOParam struct {
RecvWindow int // optional
}
type QueryOpenOCOResp ¶
type QueryOpenOCOResp []struct { OrderListID int `json:"orderListId"` ContingencyType string `json:"contingencyType"` ListStatusType string `json:"listStatusType"` ListOrderStatus string `json:"listOrderStatus"` ListClientOrderID string `json:"listClientOrderId"` TransactionTime int64 `json:"transactionTime"` Symbol string `json:"symbol"` Orders []struct { Symbol string `json:"symbol"` OrderID int `json:"orderId"` ClientOrderID string `json:"clientOrderId"` } `json:"orders"` }
func QueryOpenOCO ¶
func QueryOpenOCO(connRest ConnectorRest, parm QueryOpenOCOParam) (QueryOpenOCOResp, error)
type QueryOrderParam ¶
type QueryOrderResp ¶
type QueryOrderResp struct { Symbol string `json:"symbol"` OrderID int `json:"orderId"` OrderListID int `json:"orderListId"` ClientOrderID string `json:"clientOrderId"` Price string `json:"price"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CummulativeQuoteQty string `json:"cummulativeQuoteQty"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` StopPrice string `json:"stopPrice"` IcebergQty string `json:"icebergQty"` Time int64 `json:"time"` UpdateTime int64 `json:"updateTime"` IsWorking bool `json:"isWorking"` WorkingTime int64 `json:"workingTime"` OrigQuoteOrderQty string `json:"origQuoteOrderQty"` SelfTradePreventionMode string `json:"selfTradePreventionMode"` }
func QueryOrder ¶
func QueryOrder(connRest ConnectorRest, parm QueryOrderParam) (QueryOrderResp, error)
type TestNewOrderParam ¶
type TestNewOrderParam struct { Symbol string `structs:"symbol"` Side OrderSideType `structs:"side"` Type OrderType `structs:"type"` TimeInForce TimeInForceType `structs:"timeInForce,omitempty"` // optional Quantity float64 `structs:"quantity,omitempty"` // optional QuoteOrderQty float64 `structs:"quoteOrderQty,omitempty"` // optional Price float64 `structs:"price,omitempty"` // optional NewClientOrderId string `structs:"newClientOrderId,omitempty"` // optional StrategyId int64 `structs:"strategyId,omitempty"` // optional StrategyType int64 `structs:"strategyType,omitempty"` // optional StopPrice float64 `structs:"stopPrice,omitempty"` // optional TrailingDelta float64 `structs:"trailingDelta,omitempty"` // optional IcebergQty float64 `structs:"icebergQty,omitempty"` // optional NewOrderRespType NewOrderRespType `structs:"newOrderRespType,omitempty"` // optional SelfTradePreventionMode SelfTradePreventionModeType `structs:"selfTradePreventionMode,omitempty"` // optional RecvWindow int `structs:"-"` // optional }
type TestNewOrderResp ¶
type TestNewOrderResp struct { }
func TestNewOrder ¶
func TestNewOrder(connRest ConnectorRest, parm TestNewOrderParam) (TestNewOrderResp, error)
Click to show internal directories.
Click to hide internal directories.