forked from jyap808/go-poloniex
-
Notifications
You must be signed in to change notification settings - Fork 2
/
order.go
32 lines (28 loc) · 812 Bytes
/
order.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
32
package poloniex
import "github.com/shopspring/decimal"
type OrderBook struct {
Asks [][]decimal.Decimal `json:"asks"`
Bids [][]decimal.Decimal `json:"bids"`
IsFrozen int `json:"isFrozen,string"`
Error string `json:"error"`
Seq int `json:"seq"`
}
// This can probably be implemented using UnmarshalJSON
/*
type OrderBook struct {
Bids []Orderb `json:"bids"`
Asks []Orderb `json:"asks"`
IsFrozen int `json:"isFrozen,string"`
}
type Orderb struct {
Rate string
Quantity float64
}
*/
type OpenOrder struct {
OrderNumber int `json:"orderNumber,string"`
Type string `json:"type"`
Rate float64 `json:"rate,string"`
Amount float64 `json:"amount,string"`
Total float64 `json:"total,string"`
}