okx

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthHeaderMap map[string]string = map[string]string{
	"APIKey":     "OK-ACCESS-KEY",
	"Passphrase": "OK-ACCESS-PASSPHRASE",
}
View Source
var ManualAPISchemaMap map[string]parser.Schema = map[string]parser.Schema{
	"/api/v5/public/underlying": {
		Type: parser.ArrayType,
		Items: &parser.Schema{
			Type: parser.StringType,
		},
	},
}

Functions

func WithSamples

func WithSamples(useSamples bool) func(*Parser)

func WithSamplesDir

func WithSamplesDir(samplesDir string) func(*Parser)

Types

type DocumentParser

type DocumentParser struct {
	parser.HTTPDocumentParser
	// contains filtered or unexported fields
}

DocumentParser is a parser for OKX documents

func (*DocumentParser) Parse

func (p *DocumentParser) Parse(r io.Reader, urlEntity *config.URLEntity, protectedEndpoints []string) ([]parser.Endpoint, error)

type EndpointDocumentSection

type EndpointDocumentSection struct {
	Title                   *goquery.Selection
	Description             []*goquery.Selection
	HttpRequest             *goquery.Selection
	RequestMethodAndPath    *goquery.Selection
	RequestParameters       *goquery.Selection
	RequestParametersTable  *goquery.Selection
	ResponseExample         *goquery.Selection
	ResponseParameters      *goquery.Selection
	ResponseParametersTable *goquery.Selection
	ExtraElements           []*goquery.Selection
}

EndpointDocumentSection represents a section of the endpoint document

type OkxAPISubCategory

type OkxAPISubCategory struct {
	CategoryName    string
	SubCategoryName string
	SubCategoryID   string
}

type Parser

type Parser struct {
	parser.HTTPParser
}

Parser implements the parser.Parser interface for OKX

func NewParser

func NewParser(opts ...func(*Parser)) *Parser

NewParser creates a new OKX parser

func (*Parser) CheckVersion

func (p *Parser) CheckVersion(ctx context.Context, doc parser.Documentation) (bool, time.Time, error)

TODO: Implement CheckVersion for OKX

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL