Documentation ¶
Index ¶
- Variables
- type ContractType
- type HTTPRequest
- type KlineInterval
- type NewOrderRespType
- type OptionsClient
- func (o *OptionsClient) GenHeaders(t usdmutils.SecurityType) (map[string]string, error)
- func (o *OptionsClient) GetBaseURL() string
- func (o *OptionsClient) GetDebug() bool
- func (o *OptionsClient) GetKey() string
- func (o *OptionsClient) GetRecvWindow() int
- func (o *OptionsClient) GetSecret() string
- func (o *OptionsClient) NeedSignature(t usdmutils.SecurityType) bool
- func (o *OptionsClient) SendHTTPRequest(ctx context.Context, req HTTPRequest) ([]byte, error)
- type OptionsClientCfg
- type OrderSide
- type OrderStatus
- type OrderType
- type PositionSide
- type TimeInForce
Constants ¶
This section is empty.
Variables ¶
View Source
var (
OptionsBaseURL = "https://eapi.binance.com"
)
Functions ¶
This section is empty.
Types ¶
type ContractType ¶
type ContractType = string
var ( CALL ContractType = "CALL" PUT ContractType = "PUT" )
type HTTPRequest ¶
type HTTPRequest struct { // SecurityType each endpoint has a security type that determines how you will interact with it // docs: https://binance-docs.github.io/apidocs/voptions/en/#endpoint-security-type SecurityType usdmutils.SecurityType BaseURL string Path string Method string Headers map[string]string Query any Body any }
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" Hour12 KlineInterval = "12h" Day1 KlineInterval = "1d" Day3 KlineInterval = "3d" Week1 KlineInterval = "1w" )
type NewOrderRespType ¶
type NewOrderRespType = string
var ( ACK NewOrderRespType = "ACK" RESULT NewOrderRespType = "RESULT" )
type OptionsClient ¶
type OptionsClient struct {
// contains filtered or unexported fields
}
func NewOptionsClient ¶
func NewOptionsClient(cfg *OptionsClientCfg) (*OptionsClient, error)
func (*OptionsClient) GenHeaders ¶
func (o *OptionsClient) GenHeaders(t usdmutils.SecurityType) (map[string]string, error)
func (*OptionsClient) GetBaseURL ¶
func (o *OptionsClient) GetBaseURL() string
func (*OptionsClient) GetDebug ¶
func (o *OptionsClient) GetDebug() bool
func (*OptionsClient) GetKey ¶
func (o *OptionsClient) GetKey() string
func (*OptionsClient) GetRecvWindow ¶
func (o *OptionsClient) GetRecvWindow() int
func (*OptionsClient) GetSecret ¶
func (o *OptionsClient) GetSecret() string
func (*OptionsClient) NeedSignature ¶
func (o *OptionsClient) NeedSignature(t usdmutils.SecurityType) bool
func (*OptionsClient) SendHTTPRequest ¶
func (o *OptionsClient) SendHTTPRequest(ctx context.Context, req HTTPRequest) ([]byte, error)
type OptionsClientCfg ¶
type OrderStatus ¶
type OrderStatus = string
var ( Accepted OrderStatus = "ACCEPTED" Rejected OrderStatus = "REJECTED" PartiallyFilled OrderStatus = "PARTIALLY_FILLED" Filled OrderStatus = "FILLED" Canceled OrderStatus = "CANCELED" )
type PositionSide ¶
type PositionSide = string
var ( Long PositionSide = "LONG" Short PositionSide = "SHORT" )
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" )
Click to show internal directories.
Click to hide internal directories.