Versions in this module Expand all Collapse all v1 v1.0.0 Dec 26, 2023 Changes in this version + const Futures + const Margin + const Option + const Spot + const Swap + var AWSPrivateWsURL = "wss://wsaws.okx.com:8443/ws/v5/private" + var AWSPublicWsURL = "wss://wsaws.okx.com:8443/ws/v5/public" + var AWSRestURL = "https://aws.okx.com" + var PrivateWsURL = "wss://ws.okx.com:8443/ws/v5/private" + var PublicWsURL = "wss://ws.okx.com:8443/ws/v5/public" + var RestURL = "https://www.okx.com" + type InstrumentType = string + type OKXRestClient struct + func NewOKXRestClient(cfg *OKXRestClientCfg) (*OKXRestClient, error) + 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 struct + BaseURL string + Debug bool + Key string + Logger *slog.Logger + Passphrase string + Secret string + type Response struct + Code string + Message string