gomarket

package module
v0.0.0-...-634f968 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2014 License: MIT Imports: 7 Imported by: 0

README

gomarket

Market simulator in go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func NewMarket

func NewMarket() *market

func NewMarketSeeder

func NewMarketSeeder() *marketseeder

func NewRedisConnection

func NewRedisConnection() redis.Conn

func NextOrderId

func NextOrderId(symbol string) int64

Types

type BuyOrder

type BuyOrder struct {
	Order
}

func NewBuyOrder

func NewBuyOrder(s string, q int64) BuyOrder

type Order

type Order struct {
	Symbol   string
	Quantity int64
	OrderId  int64
	Price    int64
	Time     time.Time
}

func (*Order) GetSymbol

func (o *Order) GetSymbol() string

type SellOrder

type SellOrder struct {
	Order
}

func NewSellOrder

func NewSellOrder(s string, q int64, price int64) SellOrder

func (*SellOrder) Record

func (s *SellOrder) Record() error

type Symbol

type Symbol struct {
	Name        string
	Company     string
	Description string
	Listed      bool
}

Jump to

Keyboard shortcuts

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