-
Notifications
You must be signed in to change notification settings - Fork 2
/
types.go
31 lines (25 loc) · 807 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package orderbook
// Side is a set of types that defines which side the order was executed.
type Side int
const (
BUY Side = 1 + iota
SELL
)
// Price describes the price of a market order.
// To facilitate usage we avoid using float.
// Instead we must store prices as unsigned integers by multiplying it by 100000000.
//
// Example: 1.00000061 should be stored as 100000061
type Price uint64
// Volume describes the bid/ask quantity of a market order.
// To facilitate usage we avoid using float.
// Instead we must store prices as unsigned integers by multiplying it by 100000000.
//
// Example: 1.00000061 should be stored as 100000061
type Volume uint64
// Instrument describes which markets exists.
type Instrument string
var (
BTC_USD Instrument = "btc-usd"
BTC_ETH Instrument = "btc-eth"
)