forked from toorop/go-bittrex
/
order.go
43 lines (40 loc) · 1.65 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
package bittrex
import "github.com/shopspring/decimal"
type Order struct {
OrderUuid string `json:"OrderUuid"`
Exchange string `json:"Exchange"`
TimeStamp jTime `json:"TimeStamp"`
OrderType string `json:"OrderType"`
Limit decimal.Decimal `json:"Limit"`
Quantity decimal.Decimal `json:"Quantity"`
QuantityRemaining decimal.Decimal `json:"QuantityRemaining"`
Commission decimal.Decimal `json:"Commission"`
Price decimal.Decimal `json:"Price"`
PricePerUnit decimal.Decimal `json:"PricePerUnit"`
}
// For getorder
type Order2 struct {
AccountId string
OrderUuid string `json:"OrderUuid"`
Exchange string `json:"Exchange"`
Type string
Quantity decimal.Decimal `json:"Quantity"`
QuantityRemaining decimal.Decimal `json:"QuantityRemaining"`
Limit decimal.Decimal `json:"Limit"`
Reserved decimal.Decimal
ReserveRemaining decimal.Decimal
CommissionReserved decimal.Decimal
CommissionReserveRemaining decimal.Decimal
CommissionPaid decimal.Decimal
Price decimal.Decimal `json:"Price"`
PricePerUnit decimal.Decimal `json:"PricePerUnit"`
Opened string
Closed string
IsOpen bool
Sentinel string
CancelInitiated bool
ImmediateOrCancel bool
IsConditional bool
Condition string
ConditionTarget decimal.Decimal
}