Documentation ¶
Index ¶
- Variables
- type HTTPRequest
- type PortfolioMarginClient
- func (p *PortfolioMarginClient) GenHeaders(t SecurityType) (map[string]string, error)
- func (p *PortfolioMarginClient) GetBaseURL() string
- func (p *PortfolioMarginClient) GetDebug() bool
- func (p *PortfolioMarginClient) GetKey() string
- func (p *PortfolioMarginClient) GetRecvWindow() int
- func (p *PortfolioMarginClient) GetSecret() string
- func (p *PortfolioMarginClient) NeedSignature(t SecurityType) bool
- func (p *PortfolioMarginClient) SendHTTPRequest(ctx context.Context, req HTTPRequest) ([]byte, error)
- type PortfolioMarginClientCfg
- type SecurityType
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultContentType = map[string]string{
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "application/json",
}
View Source
var (
PortfolioMarginBaseURL = "https://papi.binance.com"
)
Functions ¶
This section is empty.
Types ¶
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/pm/en/#endpoint-security-type SecurityType SecurityType BaseURL string Path string Method string Headers map[string]string Query any Body any }
type PortfolioMarginClient ¶
type PortfolioMarginClient struct {
// contains filtered or unexported fields
}
func NewPortfolioMarginClient ¶
func NewPortfolioMarginClient(cfg *PortfolioMarginClientCfg) (*PortfolioMarginClient, error)
func (*PortfolioMarginClient) GenHeaders ¶
func (p *PortfolioMarginClient) GenHeaders(t SecurityType) (map[string]string, error)
func (*PortfolioMarginClient) GetBaseURL ¶
func (p *PortfolioMarginClient) GetBaseURL() string
func (*PortfolioMarginClient) GetDebug ¶
func (p *PortfolioMarginClient) GetDebug() bool
func (*PortfolioMarginClient) GetKey ¶
func (p *PortfolioMarginClient) GetKey() string
func (*PortfolioMarginClient) GetRecvWindow ¶
func (p *PortfolioMarginClient) GetRecvWindow() int
func (*PortfolioMarginClient) GetSecret ¶
func (p *PortfolioMarginClient) GetSecret() string
func (*PortfolioMarginClient) NeedSignature ¶
func (p *PortfolioMarginClient) NeedSignature(t SecurityType) bool
func (*PortfolioMarginClient) SendHTTPRequest ¶
func (p *PortfolioMarginClient) SendHTTPRequest(ctx context.Context, req HTTPRequest) ([]byte, error)
type SecurityType ¶
type SecurityType = string
var ( NONE SecurityType = "NONE" TRADE SecurityType = "TRADE" USER_DATA SecurityType = "USER_DATA" USER_STREAM SecurityType = "USER_STREAM" )
Click to show internal directories.
Click to hide internal directories.