market

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: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

type Exchange interface {
	manager.Bank
	manager.Broker
	manager.Ticker
	exchange.Dealership
	exchange.Auctioner

	Init()                                     // Perform initial setup
	RunID() (uuid.UUID, uint64, exchange.Mode) // Tell the Run identifier, open number, and exchange model.

	AddStock(exchange.Stock)                           // Define a stock
	IPO(exchange.Stock, float32, []exchange.LicenseID) // IPO a stock, volume specified by the exchange.Stock.Number, price by [2], initial holder(s) by [3]. If [3] is empty, the entirety will be given to a random trader.
	List() []exchange.Stock                            // Retrieve the active stock list

	Start(time.Duration, time.Duration, uint) // Run the simulation with a day length of [1] and a day count of [2]
	Open()                                    // Open the market
	Pause()                                   // Stop processing queue items
	Resume()                                  // Continue the queue
	Close(Normal bool) exchange.Summary       // Sound the closing bell. Normal specifies the nature of the closing.

	Status() bool // Are we trading?
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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