Documentation
¶
Index ¶
- Variables
- type Item
- func (a Item) IsCoinMargined() bool
- func (a Item) IsDerivative() bool
- func (a Item) IsFunding() bool
- func (a Item) IsFutures() bool
- func (a Item) IsMargin() bool
- func (a Item) IsMultiLeg() bool
- func (a Item) IsOptions() bool
- func (a Item) IsStablecoinMargined() bool
- func (a Item) IsValid() bool
- func (a Item) MarshalJSON() ([]byte, error)
- func (a Item) String() string
- func (a *Item) UnmarshalJSON(d []byte) error
- func (a Item) Upper() string
- type Items
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotSupported = errors.New("unsupported asset type") ErrNotEnabled = errors.New("asset type not enabled") ErrInvalidAsset = errors.New("asset is invalid") )
Public errors related to assets
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item uint32
Item stores the asset type
const ( Empty Item = iota Spot Margin CrossMargin MarginFunding Index Binary Futures PerpetualContract PerpetualSwap DeliveryFutures UpsideProfitContract DownsideProfitContract CoinMarginedFutures USDTMarginedFutures USDCMarginedFutures FutureCombo LinearContract Spread Options OptionCombo // All asset const must come immediately after all valid assets for method `IsValid` All )
Supported Assets
func (Item) IsCoinMargined ¶
IsCoinMargined checks if the futures asset type is coin margined
func (Item) IsDerivative ¶
IsDerivative checks if the asset type is a futures or options contract based asset
func (Item) IsMultiLeg ¶
IsMultiLeg checks if the asset type requires multi-leg handling
func (Item) IsStablecoinMargined ¶
IsStablecoinMargined checks if the futures asset type is margined by a stablecoin
func (Item) MarshalJSON ¶
MarshalJSON conforms type to the marshaller interface
func (*Item) UnmarshalJSON ¶
UnmarshalJSON conforms type to the unmarshaler interface
Click to show internal directories.
Click to hide internal directories.