forked from shaunmza/dovewallet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathorder.go
53 lines (47 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
44
45
46
47
48
49
50
51
52
53
package dovewallet
import (
"github.com/shopspring/decimal"
)
type OrderResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Result Order `json:"result"`
}
type OpenOrderParams struct {
Market string `json:"market"`
WalletId int64 `json:"walletid"`
}
type LimitOrderParams struct {
Market string `json:"market"`
Quantity decimal.Decimal `json:"quantity"`
Rate decimal.Decimal `json:"rate"`
WalletId int64 `json:"walletid"`
Magic int `json:"magic"`
}
type LimitOrderResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Result OrderId `json:"result"`
}
type OrderId struct {
Uuid int64 `json:"uuid"`
}
type Order struct {
AccountId string `json:"AccountId"`
Uuid string `json:"Uuid"`
OrderUuid string `json:"OrderUuid"`
Exchange string `json:"Exchange"`
TimeStamp jTime `json:"TimeStamp,omitempty"`
OrderType string `json:"OrderType"`
Limit decimal.Decimal `json:"Limit"`
Magic int `json:"Magic"`
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"`
IsConditional bool `json:"IsConditional"`
Opened jTime `json:"Opened,omitempty"`
Closed *jTime `json:"Closed,omitempty"`
IsOpen bool `json:"IsOpen"`
}