Skip to content

Instantly share code, notes, and snippets.

@inhies
Created April 6, 2013 03:31
Show Gist options
  • Save inhies/5324634 to your computer and use it in GitHub Desktop.
Save inhies/5324634 to your computer and use it in GitHub Desktop.
// Package trade provides generic interfaces and helper functions for working
// with assets.
package trade
import (
"time"
)
// A single order that has been placed, with timestamp if available
type Order struct {
Amount float64
Price float64
Timestamp time.Time
}
// All buy and sell orders
type OrderBook struct {
Buy []Order
Sell []Order
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment