Documentation ¶
Index ¶
- Variables
- type ContractType
- type KlineInterval
- type MarginType
- type NewOrderRespType
- type OrderSide
- type OrderStatus
- type OrderType
- type PositionSide
- type SecurityType
- type TimeInForce
- type USDMarginedClient
- func (u *USDMarginedClient) GenHeaders(t SecurityType) (map[string]string, error)
- func (u *USDMarginedClient) GetBaseURL() string
- func (u *USDMarginedClient) GetDebug() bool
- func (u *USDMarginedClient) GetKey() string
- func (u *USDMarginedClient) GetRecvWindow() int
- func (u *USDMarginedClient) GetSecret() string
- func (u *USDMarginedClient) NeedSignature(t SecurityType) bool
- func (u *USDMarginedClient) SendHTTPRequest(ctx context.Context, req utils.HTTPRequest) (*utils.ApiResponse, error)
- type USDMarginedClientCfg
Constants ¶
This section is empty.
Variables ¶
View Source
var (
USDMarginedBaseURL = "https://fapi.binance.com"
)
Functions ¶
This section is empty.
Types ¶
type ContractType ¶
type ContractType = string
var ( Perpetual ContractType = "PERPETUAL" CurrentMonth ContractType = "CURRENT_MONTH" NextMonth ContractType = "NEXT_MONTH" CurrentQuarter ContractType = "CURRENT_QUARTER" NextQuarter ContractType = "NEXT_QUARTER" PerpetualDelivering ContractType = "PERPETUAL_DELIVERING" )
type KlineInterval ¶
type KlineInterval = string
var ( Minute1 KlineInterval = "1m" Minute3 KlineInterval = "3m" Minute5 KlineInterval = "5m" Minute15 KlineInterval = "15m" Minute30 KlineInterval = "30m" Hour1 KlineInterval = "1h" Hour2 KlineInterval = "2h" Hour4 KlineInterval = "4h" Hour6 KlineInterval = "6h" Hour8 KlineInterval = "8h" Hour12 KlineInterval = "12h" Day1 KlineInterval = "1d" Day3 KlineInterval = "3d" Week1 KlineInterval = "1w" Month1 KlineInterval = "1M" )
type MarginType ¶
type MarginType = string
var ( ISOLATED MarginType = "ISOLATED" CROSSED MarginType = "CROSSED" )
type NewOrderRespType ¶
type NewOrderRespType = string
var ( ACK NewOrderRespType = "ACK" RESULT NewOrderRespType = "RESULT" )
type OrderStatus ¶
type OrderStatus = string
var ( New OrderStatus = "NEW" PartiallyFilled OrderStatus = "PARTIALLY_FILLED" Filled OrderStatus = "FILLED" Canceled OrderStatus = "CANCELED" Rejected OrderStatus = "REJECTED" Expired OrderStatus = "EXPIRED" )
type PositionSide ¶
type PositionSide = string
var ( Both PositionSide = "BOTH" Long PositionSide = "LONG" Short PositionSide = "SHORT" )
type SecurityType ¶
type SecurityType = string
var ( NONE SecurityType = "NONE" TRADE SecurityType = "TRADE" USER_DATA SecurityType = "USER_DATA" USER_STREAM SecurityType = "USER_STREAM" MARKET_DATA SecurityType = "MARKET_DATA" )
type TimeInForce ¶
type TimeInForce = string
var ( // GTC - Good Till Cancel GTC TimeInForce = "GTC" // IOC - Immediate or Cancel IOC TimeInForce = "IOC" // FOK - Fill or Kill FOK TimeInForce = "FOK" // GTX - Good Till Crossing (Post Only) GTX TimeInForce = "GTX" )
type USDMarginedClient ¶
type USDMarginedClient struct {
// contains filtered or unexported fields
}
func NewUSDMarginedClient ¶
func NewUSDMarginedClient(cfg *USDMarginedClientCfg) (*USDMarginedClient, error)
func (*USDMarginedClient) GenHeaders ¶
func (u *USDMarginedClient) GenHeaders(t SecurityType) (map[string]string, error)
func (*USDMarginedClient) GetBaseURL ¶
func (u *USDMarginedClient) GetBaseURL() string
func (*USDMarginedClient) GetDebug ¶
func (u *USDMarginedClient) GetDebug() bool
func (*USDMarginedClient) GetKey ¶
func (u *USDMarginedClient) GetKey() string
func (*USDMarginedClient) GetRecvWindow ¶
func (u *USDMarginedClient) GetRecvWindow() int
func (*USDMarginedClient) GetSecret ¶
func (u *USDMarginedClient) GetSecret() string
func (*USDMarginedClient) NeedSignature ¶
func (u *USDMarginedClient) NeedSignature(t SecurityType) bool
func (*USDMarginedClient) SendHTTPRequest ¶
func (u *USDMarginedClient) SendHTTPRequest(ctx context.Context, req utils.HTTPRequest) (*utils.ApiResponse, error)
Click to show internal directories.
Click to hide internal directories.