constant

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ASK = "ask"
	BID = "bid"

	BUY  = "BUY"
	SELL = "SELL"
)
View Source
const (
	SPOT = "SPOT"
	PERP = "PERP"
)
View Source
const (
	EVENT_BOOKTICKER = "eBookTicker."
	EVENT_TICK       = "eTick."
	EVENT_TRADE      = "eTrade."
	EVENT_ORDER      = "eOrder."
	EVENT_POSITION   = "ePosition."
	EVENT_ACCOUNT    = "eAccount."
	EVENT_QUOTE      = "eQuote."
	EVENT_CONTRACT   = "eContract."
	EVENT_LOG        = "eLog"
)
View Source
const (
	Exchange_PionexSpot  = "pionexSpot"
	Exchange_OkxV5Spot   = "okxV5Spot"
	Exchange_OkxV5Future = "okxV5Future"
	Exchange_OkxV5Swap   = "okxV5Swap"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeType

type ExchangeType int
const (
	PionexSpot ExchangeType = iota
	OkxV5Spot
	OkxV5Future
	OkxV5Swap
)

func MustConverToExchangeType

func MustConverToExchangeType(name string) ExchangeType

func (ExchangeType) Name

func (e ExchangeType) Name() string

type OrderSide

type OrderSide int

ORDER SIDE

const (
	OrderBuy OrderSide = iota
	OrderSell
)

func (OrderSide) Name

func (s OrderSide) Name() string

type OrderStatus

type OrderStatus int

ORDER STATUS

const (
	OrderSubmit OrderStatus = iota
	OrderComfirmed
	OrderPartialFilled
	OrderFilled
	OrderFailed
	OrderCanceled
	OrderClosed
)

func (OrderStatus) IsOver

func (s OrderStatus) IsOver() bool

func (OrderStatus) Name

func (s OrderStatus) Name() string

type OrderType

type OrderType int

ORDER TYPE

const (
	OrderTypeLimit OrderType = iota
	OrderTypeMarket
	OrderTypeIoc
)

func (OrderType) Name

func (t OrderType) Name() string

type RestApi

type RestApi string
var (
	API_DEBUG1               RestApi = "apiDebug1"
	API_DEBUG2               RestApi = "apiDebug2"
	API_FETCH_BALANCE        RestApi = "fetchBalance"
	API_FETCH_POSITION       RestApi = "fetchPosition"
	API_GET_TICKER           RestApi = "getTicker"
	API_GET_TICKERS          RestApi = "getTickers"
	API_GET_FUNDINGRATE      RestApi = "getFundingRate"
	API_GET_KLINE            RestApi = "getKline"
	API_PLACE_SPOT_ORDER     RestApi = "placeSpotOrder"
	API_PLACE_FUTURE_ORDER   RestApi = "placeFutureOrder"
	API_RPC_PLACE_SPOT_ORDER RestApi = "placeRpcSpotOrder"
	API_QUERY_ORDER          RestApi = "placeQueryOrder"
)

type RoleType

type RoleType int
const (
	Taker RoleType = iota
	Maker
)

func (RoleType) Name

func (e RoleType) Name() string

Jump to

Keyboard shortcuts

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