This repository has been archived on 2022-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
tacitus/trade.go

27 lines
489 B
Go
Raw Normal View History

2017-09-07 23:04:47 -07:00
package tacitus
import (
"github.com/shopspring/decimal"
"time"
)
type Trade struct {
Id int
TradeId int
Product string
Price decimal.Decimal
Size decimal.Decimal
Buy bool
Sell bool
Timestamp time.Time
}
type TradeService interface {
Trade(id int) (*Trade, error)
TradeByTradeId(id int, prod string) (*Trade, error)
CreateTrade(t *Trade) error
DeleteTrade(id int)
TradesInDateRange(product string, start, end time.Time) ([]Trade, error)
}