markets

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instrument

type Instrument struct {
	ID       string
	Code     string
	Name     string
	Metadata *types.InstrumentMetadata
	Product  products.Product

	Quote string
}

Instrument represent an instrument used in a market.

func NewInstrument

func NewInstrument(ctx context.Context, log *logging.Logger, pi *types.Instrument, oe products.OracleEngine) (*Instrument, error)

NewInstrument will instantiate a new instrument using a market framework configuration for a instrument.

func (*Instrument) Unsubscribe

func (i *Instrument) Unsubscribe(ctx context.Context)

func (*Instrument) UnsubscribeSettlementData added in v0.58.0

func (i *Instrument) UnsubscribeSettlementData(ctx context.Context)

func (*Instrument) UnsubscribeTradingTerminated added in v0.55.0

func (i *Instrument) UnsubscribeTradingTerminated(ctx context.Context)

type TradableInstrument

type TradableInstrument struct {
	Instrument       *Instrument
	MarginCalculator *types.MarginCalculator
	RiskModel        risk.Model
}

TradableInstrument represent an instrument to be trade in a market.

func NewTradableInstrument

func NewTradableInstrument(ctx context.Context, log *logging.Logger, pti *types.TradableInstrument, oe products.OracleEngine) (*TradableInstrument, error)

NewTradableInstrument will instantiate a new tradable instrument using a market framework configuration for a tradable instrument.

func (*TradableInstrument) UpdateInstrument

Jump to

Keyboard shortcuts

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