v1

package
v0.0.0-...-6165795 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2015 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MkLog = log15.New("module", "market", "version", "v1")

Functions

func NewMarket1

func NewMarket1() market.Exchange

Types

type Auctioner

type Auctioner struct {
	// contains filtered or unexported fields
}

func (*Auctioner) Ask

func (m *Auctioner) Ask(a x.Auction) (x.AuctionID, error)

func (*Auctioner) Auction

func (m *Auctioner) Auction(a x.AuctionID) (x.Auction, error)

func (*Auctioner) Auctions

func (m *Auctioner) Auctions() (a []x.Auction)

func (*Auctioner) Bid

func (m *Auctioner) Bid(b x.Bid) (x.BidID, error)

func (*Auctioner) Cancel

func (m *Auctioner) Cancel(a x.AuctionID) error

func (*Auctioner) Finish

func (m *Auctioner) Finish(a x.AuctionID) error

type Dealer

type Dealer struct{}

func (*Dealer) Dealers

func (_ *Dealer) Dealers() []x.Dealer

func (*Dealer) RegisterDealer

func (_ *Dealer) RegisterDealer(x.Dealer)

func (*Dealer) Resolve

func (_ *Dealer) Resolve(x.Symbol) []x.Dealer

type Market1

type Market1 struct {
	Auctioner
	Dealer
	Ticker
	// contains filtered or unexported fields
}

func (*Market1) AddBroker

func (m *Market1) AddBroker(b broker.Broker)

func (*Market1) AddStock

func (m *Market1) AddStock(s x.Stock)

func (Market1) Bank

func (m Market1) Bank() bank.Bank

func (*Market1) Brokers

func (m *Market1) Brokers() []broker.Broker

func (*Market1) Close

func (m *Market1) Close(normal bool) x.Summary

func (*Market1) CreateTrader

func (m *Market1) CreateTrader(ty string, lid x.LicenseID)

func (*Market1) IPO

func (m *Market1) IPO(x.Stock, float32, []x.LicenseID)

func (*Market1) Init

func (m *Market1) Init()

func (*Market1) Licensee

func (m *Market1) Licensee(lid x.LicenseID) trader.Trader

func (*Market1) List

func (m *Market1) List() (ret []x.Stock)

func (*Market1) Open

func (m *Market1) Open()

func (*Market1) Pause

func (m *Market1) Pause()

func (*Market1) RegisterBank

func (m *Market1) RegisterBank(_ string, b bank.Bank)

func (*Market1) RegisterBroker

func (m *Market1) RegisterBroker(string, manager.BrokerMaker)

func (*Market1) RegisterTrader

func (m *Market1) RegisterTrader(s string, t manager.TraderMaker)

func (*Market1) Resume

func (m *Market1) Resume()

func (*Market1) Retire

func (m *Market1) Retire(x.LicenseID)

func (*Market1) RunID

func (m *Market1) RunID() (uuid.UUID, uint64, x.Mode)

func (*Market1) SetCount

func (m *Market1) SetCount(tc ...manager.TraderCfg)

func (*Market1) SpawnTraders

func (m *Market1) SpawnTraders()

func (*Market1) Start

func (m *Market1) Start(daylen, pauselen time.Duration, weeklen uint)

func (*Market1) Status

func (m *Market1) Status() bool

func (*Market1) Traders

func (m *Market1) Traders() (t []trader.Trader)

type Ticker

type Ticker struct{}

func (*Ticker) RegisterTicker

func (_ *Ticker) RegisterTicker(string, ticker.Ticker)

func (*Ticker) Tickers

func (_ *Ticker) Tickers() []ticker.Ticker

Jump to

Keyboard shortcuts

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