types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Spot    = "SPOT"
	Swap    = "SWAP"
	Futures = "FUTURES"
	Option  = "OPTION"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GetInstrumentsParam

type GetInstrumentsParam struct {
	InstType   okxutils.InstrumentType `url:"instType" validate:"required,oneof=SPOT MARGIN SWAP FUTURES OPTION"`
	Uly        string                  `url:"uly,omitempty"`
	InstFamily string                  `url:"instFamily,omitempty"`
	InstId     string                  `url:"instId,omitempty"`
}

type GetMarketTickersParam

type GetMarketTickersParam struct {
	InstType   InstrumentType `url:"instType,omitempty" validate:"omitempty,oneof=SPOT SWAP FUTURES OPTION"`
	Uly        string         `url:"uly,omitempty"`
	InstFamily string         `url:"instFamily,omitempty"`
}

type GetMarketTickersResp

type GetMarketTickersResp struct {
	okxutils.Response
	Data []*MarketTicker `json:"data"`
}

type Instrument

type Instrument struct {
	Alias        string `json:"alias"`
	BaseCcy      string `json:"baseCcy"`
	Category     string `json:"category"`
	CtMult       string `json:"ctMult"`
	CtType       string `json:"ctType"`
	CtVal        string `json:"ctVal"`
	CtValCcy     string `json:"ctValCcy"`
	ExpTime      string `json:"expTime"`
	InstFamily   string `json:"instFamily"`
	InstID       string `json:"instId"`
	InstType     string `json:"instType"`
	Lever        string `json:"lever"`
	ListTime     string `json:"listTime"`
	LotSz        string `json:"lotSz"`
	MaxIcebergSz string `json:"maxIcebergSz"`
	MaxLmtSz     string `json:"maxLmtSz"`
	MaxMktSz     string `json:"maxMktSz"`
	MaxStopSz    string `json:"maxStopSz"`
	MaxTriggerSz string `json:"maxTriggerSz"`
	MaxTwapSz    string `json:"maxTwapSz"`
	MinSz        string `json:"minSz"`
	OptType      string `json:"optType"`
	QuoteCcy     string `json:"quoteCcy"`
	SettleCcy    string `json:"settleCcy"`
	State        string `json:"state"`
	Stk          string `json:"stk"`
	TickSz       string `json:"tickSz"`
	Uly          string `json:"uly"`
}

type InstrumentType

type InstrumentType = string

type Instruments

type Instruments struct {
	okxutils.Response
	Data []Instrument `json:"data"`
}

type MarketTicker

type MarketTicker struct {
	InstType  string `json:"instType,string"`
	InstID    string `json:"instId"`
	Last      string `json:"last"`
	LastSz    string `json:"lastSz"`
	AskPx     string `json:"askPx"`
	AskSz     string `json:"askSz"`
	BidPx     string `json:"bidPx"`
	BidSz     string `json:"bidSz"`
	Open24h   string `json:"open24h"`
	High24h   string `json:"high24h"`
	Low24h    string `json:"low24h"`
	VolCcy24h string `json:"volCcy24h"`
	Vol24h    string `json:"vol24h"`
	SodUtc0   string `json:"sodUtc0"`
	SodUtc8   string `json:"sodUtc8"`
	TS        string `json:"ts"`
}

Jump to

Keyboard shortcuts

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