orders

package
v0.0.0-...-b8e8dbd Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Orders []*Order

Orders variable holds an array of pointers to order structs

Functions

func DeleteOrder

func DeleteOrder(orderID int) bool

DeleteOrder deletes orders by ID and returns state

func NewOrder

func NewOrder(Exchange string, amount, price float64) int

NewOrder creates a new order and returns a an orderID

Types

type Order

type Order struct {
	OrderID  int
	Exchange string
	Type     int
	Amount   float64
	Price    float64
}

Order struct holds order values

func GetOrderByOrderID

func GetOrderByOrderID(orderID int) *Order

GetOrderByOrderID returns order pointer by ID

func GetOrdersByExchange

func GetOrdersByExchange(exchange string) []*Order

GetOrdersByExchange returns order pointer grouped by exchange

Jump to

Keyboard shortcuts

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