instr

package
v0.0.0-...-8fb26ab Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpotToLowerCaseDashSeparated

func SpotToLowerCaseDashSeparated(pair Spot) string

func SpotToLowerCaseSlashSeparated

func SpotToLowerCaseSlashSeparated(pair Spot) string

func SpotToLowerCaseUnderscoreSeparated

func SpotToLowerCaseUnderscoreSeparated(pair Spot) string

func SpotToUpperCaseDashSeparated

func SpotToUpperCaseDashSeparated(pair Spot) string

func SpotToUpperCaseSlashSeparated

func SpotToUpperCaseSlashSeparated(pair Spot) string

func SpotToUpperCaseUnderscoreSeparated

func SpotToUpperCaseUnderscoreSeparated(pair Spot) string

Types

type Asset

type Asset string
const (
	BTC  Asset = "BTC"
	ETH  Asset = "ETH"
	AVAX Asset = "AVAX"
	ALOT Asset = "ALOT"
	LOST Asset = "LOST"

	STL   Asset = "STL"
	BTCb  Asset = "BTC.b"
	WETHe Asset = "WETH.e"
	USD   Asset = "USD"
	USDC  Asset = "USDC"
	USDT  Asset = "USDT"
	EUROC Asset = "EUROC"
)

func ToInternalAssetName

func ToInternalAssetName(asset string) Asset

type Instrument

type Instrument interface {
	comparable
	BaseAsset() Asset
	TermAsset() Asset
	String() string
	NegativePriceAllowed() bool
}

type Spot

type Spot struct {
	Base Asset
	Term Asset
}

func ToSpotSlashSeparated

func ToSpotSlashSeparated(pair string) (Spot, error)

func ToSpotUnderscoreSeparated

func ToSpotUnderscoreSeparated(pair string) (Spot, error)

func (Spot) BaseAsset

func (s Spot) BaseAsset() Asset

func (Spot) NegativePriceAllowed

func (s Spot) NegativePriceAllowed() bool

func (Spot) String

func (s Spot) String() string

func (Spot) TermAsset

func (s Spot) TermAsset() Asset

Jump to

Keyboard shortcuts

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