Documentation ¶
Index ¶
- Constants
- Variables
- type InstrumentType
- type OKXRestClient
- func (o *OKXRestClient) GenAuthHeaders(req utils.HTTPRequest) (map[string]string, error)
- func (o *OKXRestClient) GenPubHeaders() (map[string]string, error)
- func (o *OKXRestClient) GetBaseURL() string
- func (o *OKXRestClient) GetDebug() bool
- func (o *OKXRestClient) GetKey() string
- func (o *OKXRestClient) GetPassphrase() string
- func (o *OKXRestClient) GetSecret() string
- func (o *OKXRestClient) SendHTTPRequest(ctx context.Context, req utils.HTTPRequest) (*utils.ApiResponse, error)
- type OKXRestClientCfg
- type Response
Constants ¶
View Source
const ( Spot = "SPOT" Margin = "MARGIN" Swap = "SWAP" Futures = "FUTURES" Option = "OPTION" Cash = "cash" Isolated = "isolated" Cross = "cross" Buy = "buy" Sell = "sell" Market = "market" Limit = "limit" PostOnly = "post_only" FOK = "fok" IOC = "ioc" Index = "index" )
Variables ¶
View Source
var ( RestURL = "https://www.okx.com" PublicWsURL = "wss://ws.okx.com:8443/ws/v5/public" PrivateWsURL = "wss://ws.okx.com:8443/ws/v5/private" AWSRestURL = "https://aws.okx.com" AWSPublicWsURL = "wss://wsaws.okx.com:8443/ws/v5/public" AWSPrivateWsURL = "wss://wsaws.okx.com:8443/ws/v5/private" )
Functions ¶
This section is empty.
Types ¶
type InstrumentType ¶
type InstrumentType = string
type OKXRestClient ¶
type OKXRestClient struct {
// contains filtered or unexported fields
}
func NewOKXRestClient ¶
func NewOKXRestClient(cfg *OKXRestClientCfg) (*OKXRestClient, error)
func (*OKXRestClient) GenAuthHeaders ¶
func (o *OKXRestClient) GenAuthHeaders(req utils.HTTPRequest) (map[string]string, error)
func (*OKXRestClient) GenPubHeaders ¶
func (o *OKXRestClient) GenPubHeaders() (map[string]string, error)
func (*OKXRestClient) GetBaseURL ¶
func (o *OKXRestClient) GetBaseURL() string
func (*OKXRestClient) GetDebug ¶
func (o *OKXRestClient) GetDebug() bool
func (*OKXRestClient) GetKey ¶
func (o *OKXRestClient) GetKey() string
func (*OKXRestClient) GetPassphrase ¶
func (o *OKXRestClient) GetPassphrase() string
func (*OKXRestClient) GetSecret ¶
func (o *OKXRestClient) GetSecret() string
func (*OKXRestClient) SendHTTPRequest ¶
func (o *OKXRestClient) SendHTTPRequest(ctx context.Context, req utils.HTTPRequest) (*utils.ApiResponse, error)
type OKXRestClientCfg ¶
Click to show internal directories.
Click to hide internal directories.