This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
forked from toorop/go-bittrex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorder.go
51 lines (48 loc) · 1.67 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
44
45
46
47
48
49
50
51
package bittrex
import (
"github.com/shopspring/decimal"
)
// Order struct
type Order struct {
ID string `json:"id"`
MarketSymbol string `json:"marketSymbol"`
Direction string `json:"direction"`
Type string `json:"type"`
Quantity decimal.Decimal `json:"quantity"`
Limit decimal.Decimal `json:"limit"`
Ceiling decimal.Decimal `json:"ceiling"`
TimeInForce string `json:"timeInForce"`
ClientOrderID string `json:"clientOrderId"`
FillQuantity decimal.Decimal `json:"fillQuantity"`
Commission decimal.Decimal `json:"commission"`
Proceeds decimal.Decimal `json:"proceeds"`
Status string `json:"status"`
CreatedAt jTime `json:"createdAt"`
UpdatedAt *jTime `json:"updatedAt"`
ClosedAt *jTime `json:"closedAt"`
OrderToCancel struct {
Type string `json:"type"`
ID string `json:"id"`
} `json:"orderToCancel"`
}
//OrderUpdate struct
type OrderUpdate struct {
AccountID string `json:"accountId"`
Sequence int `json:"sequence"`
Delta struct {
ID string `json:"id"`
MarketSymbol string `json:"marketSymbol"`
Direction string `json:"direction"`
Type string `json:"type"`
Quantity string `json:"quantity"`
Limit string `json:"limit"`
TimeInForce string `json:"timeInForce"`
FillQuantity string `json:"fillQuantity"`
Commission string `json:"commission"`
Proceeds string `json:"proceeds"`
Status string `json:"status"`
CreatedAt jTime `json:"createdAt"`
UpdatedAt *jTime `json:"updatedAt"`
ClosedAt *jTime `json:"closedAt"`
} `json:"delta"`
}