asset

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Spot                   = Item("spot")
	Margin                 = Item("margin")
	MarginFunding          = Item("marginfunding")
	Index                  = Item("index")
	Binary                 = Item("binary")
	PerpetualContract      = Item("perpetualcontract")
	PerpetualSwap          = Item("perpetualswap")
	Futures                = Item("futures")
	UpsideProfitContract   = Item("upsideprofitcontract")
	DownsideProfitContract = Item("downsideprofitcontract")
)

Const vars for asset package

Variables

This section is empty.

Functions

func IsValid

func IsValid(input Item) bool

IsValid returns whether or not the supplied asset type is valid or not

Types

type Item

type Item string

Item stores the asset type

func (Item) String

func (a Item) String() string

returns an Item to string

type Items

type Items []Item

Items stores a list of assets types

func New

func New(input string) Items

New takes an input of asset types as string and returns an Items array

func Supported

func Supported() Items

Supported returns a list of supported asset types

func (Items) Contains

func (a Items) Contains(i Item) bool

Contains returns whether or not the supplied asset exists in the list of Items

func (Items) JoinToString

func (a Items) JoinToString(separator string) string

JoinToString joins an asset type array and converts it to a string with the supplied separator

func (Items) Strings

func (a Items) Strings() []string

Strings converts an asset type array to a string array

Jump to

Keyboard shortcuts

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