common

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OrderType_name = map[int32]string{
		0: "OT_MARKET",
		1: "OT_LIMIT",
		2: "OT_IOC",
		3: "OT_POST",
	}
	OrderType_value = map[string]int32{
		"OT_MARKET": 0,
		"OT_LIMIT":  1,
		"OT_IOC":    2,
		"OT_POST":   3,
	}
)

Enum value maps for OrderType.

View Source
var (
	PerpOrderType_name = map[int32]string{
		0: "POT_UNKNOWN",
		1: "POT_MARKET",
		2: "POT_LIMIT",
		3: "POT_TRIGGER_MARKET",
		4: "POT_TRIGGER_LIMIT",
	}
	PerpOrderType_value = map[string]int32{
		"POT_UNKNOWN":        0,
		"POT_MARKET":         1,
		"POT_LIMIT":          2,
		"POT_TRIGGER_MARKET": 3,
		"POT_TRIGGER_LIMIT":  4,
	}
)

Enum value maps for PerpOrderType.

View Source
var (
	PerpPositionSide_name = map[int32]string{
		0: "PS_UNKNOWN",
		1: "PS_LONG",
		2: "PS_SHORT",
	}
	PerpPositionSide_value = map[string]int32{
		"PS_UNKNOWN": 0,
		"PS_LONG":    1,
		"PS_SHORT":   2,
	}
)

Enum value maps for PerpPositionSide.

View Source
var (
	PostOnlyParams_name = map[int32]string{
		0: "PO_NONE",
		1: "PO_MUST_POST_ONLY",
		2: "PO_TRY_POST_ONLY",
	}
	PostOnlyParams_value = map[string]int32{
		"PO_NONE":           0,
		"PO_MUST_POST_ONLY": 1,
		"PO_TRY_POST_ONLY":  2,
	}
)

Enum value maps for PostOnlyParams.

View Source
var (
	MarginContract_name = map[int32]string{
		0: "ALL_SPOTS",
		1: "SOL_SPOT",
		2: "USDC_SPOT",
		3: "MSOL_SPOT",
		4: "WBTC_SPOT",
		5: "WETH_SPOT",
		6: "USDT_SPOT",
	}
	MarginContract_value = map[string]int32{
		"ALL_SPOTS": 0,
		"SOL_SPOT":  1,
		"USDC_SPOT": 2,
		"MSOL_SPOT": 3,
		"WBTC_SPOT": 4,
		"WETH_SPOT": 5,
		"USDT_SPOT": 6,
	}
)

Enum value maps for MarginContract.

View Source
var (
	PerpContract_name = map[int32]string{
		0:  "ALL",
		1:  "SOL_PERP",
		2:  "ETH_PERP",
		3:  "BTC_PERP",
		4:  "APT_PERP",
		5:  "BONK_PERP",
		6:  "MATIC_PERP",
		7:  "ARB_PERP",
		8:  "DOGE_PERP",
		9:  "BNB_PERP",
		10: "SUI_PERP",
		11: "PEPE_PERP",
		12: "OP_PERP",
		13: "RNDR_PERP",
		14: "XRP_PERP",
	}
	PerpContract_value = map[string]int32{
		"ALL":        0,
		"SOL_PERP":   1,
		"ETH_PERP":   2,
		"BTC_PERP":   3,
		"APT_PERP":   4,
		"BONK_PERP":  5,
		"MATIC_PERP": 6,
		"ARB_PERP":   7,
		"DOGE_PERP":  8,
		"BNB_PERP":   9,
		"SUI_PERP":   10,
		"PEPE_PERP":  11,
		"OP_PERP":    12,
		"RNDR_PERP":  13,
		"XRP_PERP":   14,
	}
)

Enum value maps for PerpContract.

View Source
var (
	PerpCollateralType_name = map[int32]string{
		0: "PCT_DEPOSIT",
		1: "PCT_WITHDRAWAL",
		2: "PCT_TRANSFER",
	}
	PerpCollateralType_value = map[string]int32{
		"PCT_DEPOSIT":    0,
		"PCT_WITHDRAWAL": 1,
		"PCT_TRANSFER":   2,
	}
)

Enum value maps for PerpCollateralType.

View Source
var (
	PerpCollateralToken_name = map[int32]string{
		0: "PCTK_USDC",
		1: "PCTK_SOL",
	}
	PerpCollateralToken_value = map[string]int32{
		"PCTK_USDC": 0,
		"PCTK_SOL":  1,
	}
)

Enum value maps for PerpCollateralToken.

View Source
var (
	Infinity_name = map[int32]string{
		0: "INF_NOT",
		1: "INF_POSITIVE",
		2: "INF_NEGATIVE",
	}
	Infinity_value = map[string]int32{
		"INF_NOT":      0,
		"INF_POSITIVE": 1,
		"INF_NEGATIVE": 2,
	}
)

Enum value maps for Infinity.

View Source
var File_common_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Fee

type Fee struct {
	Amount  float32 `protobuf:"fixed32,1,opt,name=amount,proto3" json:"amount,omitempty"`
	Mint    string  `protobuf:"bytes,2,opt,name=mint,proto3" json:"mint,omitempty"`
	Percent float32 `protobuf:"fixed32,3,opt,name=percent,proto3" json:"percent,omitempty"`
	// contains filtered or unexported fields
}

func (*Fee) Descriptor deprecated

func (*Fee) Descriptor() ([]byte, []int)

Deprecated: Use Fee.ProtoReflect.Descriptor instead.

func (*Fee) GetAmount

func (x *Fee) GetAmount() float32

func (*Fee) GetMint

func (x *Fee) GetMint() string

func (*Fee) GetPercent

func (x *Fee) GetPercent() float32

func (*Fee) ProtoMessage

func (*Fee) ProtoMessage()

func (*Fee) ProtoReflect

func (x *Fee) ProtoReflect() protoreflect.Message

func (*Fee) Reset

func (x *Fee) Reset()

func (*Fee) String

func (x *Fee) String() string

type Infinity

type Infinity int32
const (
	Infinity_INF_NOT      Infinity = 0
	Infinity_INF_POSITIVE Infinity = 1
	Infinity_INF_NEGATIVE Infinity = 2
)

func (Infinity) Descriptor

func (Infinity) Descriptor() protoreflect.EnumDescriptor

func (Infinity) Enum

func (x Infinity) Enum() *Infinity

func (Infinity) EnumDescriptor deprecated

func (Infinity) EnumDescriptor() ([]byte, []int)

Deprecated: Use Infinity.Descriptor instead.

func (Infinity) Number

func (x Infinity) Number() protoreflect.EnumNumber

func (Infinity) String

func (x Infinity) String() string

func (Infinity) Type

type MarginContract added in v1.7.0

type MarginContract int32

don't use this in api.proto

const (
	MarginContract_ALL_SPOTS MarginContract = 0 // ALL
	MarginContract_SOL_SPOT  MarginContract = 1 // SOL
	MarginContract_USDC_SPOT MarginContract = 2 // USDC
	MarginContract_MSOL_SPOT MarginContract = 3 // MSOL
	MarginContract_WBTC_SPOT MarginContract = 4 // WBTC
	MarginContract_WETH_SPOT MarginContract = 5 // WETH
	MarginContract_USDT_SPOT MarginContract = 6 // USDT
)

func (MarginContract) Descriptor added in v1.7.0

func (MarginContract) Enum added in v1.7.0

func (x MarginContract) Enum() *MarginContract

func (MarginContract) EnumDescriptor deprecated added in v1.7.0

func (MarginContract) EnumDescriptor() ([]byte, []int)

Deprecated: Use MarginContract.Descriptor instead.

func (MarginContract) Number added in v1.7.0

func (MarginContract) String added in v1.7.0

func (x MarginContract) String() string

func (MarginContract) Type added in v1.7.0

type OrderType added in v1.5.0

type OrderType int32
const (
	OrderType_OT_MARKET OrderType = 0
	OrderType_OT_LIMIT  OrderType = 1 // MARKET and LIMIT are mutually exclusive
	OrderType_OT_IOC    OrderType = 2 // immediate or cancel
	OrderType_OT_POST   OrderType = 3
)

func (OrderType) Descriptor added in v1.5.0

func (OrderType) Descriptor() protoreflect.EnumDescriptor

func (OrderType) Enum added in v1.5.0

func (x OrderType) Enum() *OrderType

func (OrderType) EnumDescriptor deprecated added in v1.5.0

func (OrderType) EnumDescriptor() ([]byte, []int)

Deprecated: Use OrderType.Descriptor instead.

func (OrderType) Number added in v1.5.0

func (x OrderType) Number() protoreflect.EnumNumber

func (OrderType) String added in v1.5.0

func (x OrderType) String() string

func (OrderType) Type added in v1.5.0

type PerpCollateralToken added in v1.5.0

type PerpCollateralToken int32
const (
	PerpCollateralToken_PCTK_USDC PerpCollateralToken = 0
	PerpCollateralToken_PCTK_SOL  PerpCollateralToken = 1
)

func (PerpCollateralToken) Descriptor added in v1.5.0

func (PerpCollateralToken) Enum added in v1.5.0

func (PerpCollateralToken) EnumDescriptor deprecated added in v1.5.0

func (PerpCollateralToken) EnumDescriptor() ([]byte, []int)

Deprecated: Use PerpCollateralToken.Descriptor instead.

func (PerpCollateralToken) Number added in v1.5.0

func (PerpCollateralToken) String added in v1.5.0

func (x PerpCollateralToken) String() string

func (PerpCollateralToken) Type added in v1.5.0

type PerpCollateralType added in v1.5.0

type PerpCollateralType int32
const (
	PerpCollateralType_PCT_DEPOSIT    PerpCollateralType = 0
	PerpCollateralType_PCT_WITHDRAWAL PerpCollateralType = 1
	PerpCollateralType_PCT_TRANSFER   PerpCollateralType = 2
)

func (PerpCollateralType) Descriptor added in v1.5.0

func (PerpCollateralType) Enum added in v1.5.0

func (PerpCollateralType) EnumDescriptor deprecated added in v1.5.0

func (PerpCollateralType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PerpCollateralType.Descriptor instead.

func (PerpCollateralType) Number added in v1.5.0

func (PerpCollateralType) String added in v1.5.0

func (x PerpCollateralType) String() string

func (PerpCollateralType) Type added in v1.5.0

type PerpContract added in v1.5.0

type PerpContract int32
const (
	PerpContract_ALL        PerpContract = 0
	PerpContract_SOL_PERP   PerpContract = 1  // SOL-PERP
	PerpContract_ETH_PERP   PerpContract = 2  // ETH-PERP
	PerpContract_BTC_PERP   PerpContract = 3  // BTC-PERP
	PerpContract_APT_PERP   PerpContract = 4  // APT-PERP
	PerpContract_BONK_PERP  PerpContract = 5  // 1MBONK-PERP
	PerpContract_MATIC_PERP PerpContract = 6  // MATIC-PERP
	PerpContract_ARB_PERP   PerpContract = 7  // ARB-PERP
	PerpContract_DOGE_PERP  PerpContract = 8  // DOGE-PERP
	PerpContract_BNB_PERP   PerpContract = 9  // BNB-PERP
	PerpContract_SUI_PERP   PerpContract = 10 // SUI-PERP
	PerpContract_PEPE_PERP  PerpContract = 11 // PEPE-PERP
	PerpContract_OP_PERP    PerpContract = 12 // OP_PERP
	PerpContract_RNDR_PERP  PerpContract = 13 // RNDR_PERP
	PerpContract_XRP_PERP   PerpContract = 14 // XRP_PERP
)

func (PerpContract) Descriptor added in v1.5.0

func (PerpContract) Enum added in v1.5.0

func (x PerpContract) Enum() *PerpContract

func (PerpContract) EnumDescriptor deprecated added in v1.5.0

func (PerpContract) EnumDescriptor() ([]byte, []int)

Deprecated: Use PerpContract.Descriptor instead.

func (PerpContract) Number added in v1.5.0

func (PerpContract) String added in v1.5.0

func (x PerpContract) String() string

func (PerpContract) Type added in v1.5.0

type PerpOrderType added in v1.5.0

type PerpOrderType int32

perp types : limit, trigger_market, trigger_limit, market, oracle

const (
	PerpOrderType_POT_UNKNOWN        PerpOrderType = 0
	PerpOrderType_POT_MARKET         PerpOrderType = 1
	PerpOrderType_POT_LIMIT          PerpOrderType = 2
	PerpOrderType_POT_TRIGGER_MARKET PerpOrderType = 3
	PerpOrderType_POT_TRIGGER_LIMIT  PerpOrderType = 4
)

func (PerpOrderType) Descriptor added in v1.5.0

func (PerpOrderType) Enum added in v1.5.0

func (x PerpOrderType) Enum() *PerpOrderType

func (PerpOrderType) EnumDescriptor deprecated added in v1.5.0

func (PerpOrderType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PerpOrderType.Descriptor instead.

func (PerpOrderType) Number added in v1.5.0

func (PerpOrderType) String added in v1.5.0

func (x PerpOrderType) String() string

func (PerpOrderType) Type added in v1.5.0

type PerpPositionSide added in v1.5.0

type PerpPositionSide int32
const (
	PerpPositionSide_PS_UNKNOWN PerpPositionSide = 0
	PerpPositionSide_PS_LONG    PerpPositionSide = 1
	PerpPositionSide_PS_SHORT   PerpPositionSide = 2
)

func (PerpPositionSide) Descriptor added in v1.5.0

func (PerpPositionSide) Enum added in v1.5.0

func (PerpPositionSide) EnumDescriptor deprecated added in v1.5.0

func (PerpPositionSide) EnumDescriptor() ([]byte, []int)

Deprecated: Use PerpPositionSide.Descriptor instead.

func (PerpPositionSide) Number added in v1.5.0

func (PerpPositionSide) String added in v1.5.0

func (x PerpPositionSide) String() string

func (PerpPositionSide) Type added in v1.5.0

type PostOnlyParams added in v1.6.0

type PostOnlyParams int32
const (
	PostOnlyParams_PO_NONE           PostOnlyParams = 0
	PostOnlyParams_PO_MUST_POST_ONLY PostOnlyParams = 1
	PostOnlyParams_PO_TRY_POST_ONLY  PostOnlyParams = 2
)

func (PostOnlyParams) Descriptor added in v1.6.0

func (PostOnlyParams) Enum added in v1.6.0

func (x PostOnlyParams) Enum() *PostOnlyParams

func (PostOnlyParams) EnumDescriptor deprecated added in v1.6.0

func (PostOnlyParams) EnumDescriptor() ([]byte, []int)

Deprecated: Use PostOnlyParams.Descriptor instead.

func (PostOnlyParams) Number added in v1.6.0

func (PostOnlyParams) String added in v1.6.0

func (x PostOnlyParams) String() string

func (PostOnlyParams) Type added in v1.6.0

type PriceImpactPercent

type PriceImpactPercent struct {
	Percent  float64  `protobuf:"fixed64,1,opt,name=percent,proto3" json:"percent,omitempty"`
	Infinity Infinity `protobuf:"varint,2,opt,name=infinity,proto3,enum=common.Infinity" json:"infinity,omitempty"`
	// contains filtered or unexported fields
}

func (*PriceImpactPercent) Descriptor deprecated

func (*PriceImpactPercent) Descriptor() ([]byte, []int)

Deprecated: Use PriceImpactPercent.ProtoReflect.Descriptor instead.

func (*PriceImpactPercent) GetInfinity

func (x *PriceImpactPercent) GetInfinity() Infinity

func (*PriceImpactPercent) GetPercent

func (x *PriceImpactPercent) GetPercent() float64

func (*PriceImpactPercent) ProtoMessage

func (*PriceImpactPercent) ProtoMessage()

func (*PriceImpactPercent) ProtoReflect

func (x *PriceImpactPercent) ProtoReflect() protoreflect.Message

func (*PriceImpactPercent) Reset

func (x *PriceImpactPercent) Reset()

func (*PriceImpactPercent) String

func (x *PriceImpactPercent) String() string

type PriceImpactPercentV2 added in v1.8.0

type PriceImpactPercentV2 struct {
	Percent  float64 `protobuf:"fixed64,1,opt,name=percent,proto3" json:"percent,omitempty"`
	Infinity string  `protobuf:"bytes,2,opt,name=infinity,proto3" json:"infinity,omitempty"` // NOT, NEGATIVE, POSITIVE
	// contains filtered or unexported fields
}

func (*PriceImpactPercentV2) Descriptor deprecated added in v1.8.0

func (*PriceImpactPercentV2) Descriptor() ([]byte, []int)

Deprecated: Use PriceImpactPercentV2.ProtoReflect.Descriptor instead.

func (*PriceImpactPercentV2) GetInfinity added in v1.8.0

func (x *PriceImpactPercentV2) GetInfinity() string

func (*PriceImpactPercentV2) GetPercent added in v1.8.0

func (x *PriceImpactPercentV2) GetPercent() float64

func (*PriceImpactPercentV2) ProtoMessage added in v1.8.0

func (*PriceImpactPercentV2) ProtoMessage()

func (*PriceImpactPercentV2) ProtoReflect added in v1.8.0

func (x *PriceImpactPercentV2) ProtoReflect() protoreflect.Message

func (*PriceImpactPercentV2) Reset added in v1.8.0

func (x *PriceImpactPercentV2) Reset()

func (*PriceImpactPercentV2) String added in v1.8.0

func (x *PriceImpactPercentV2) String() string

Jump to

Keyboard shortcuts

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