-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorder.go
46 lines (40 loc) · 1.11 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
package models
import (
"time"
"gorm.io/gorm"
)
type Order struct {
Op string `json:"op" validate:"required"`
Id string `json:"id" validate:"required"`
Args *OrderArg `json:"args" validate:"required"`
ExpTime string `json:"expTime" validate:"required"`
}
type OrderArg struct {
InstId string `json:"instId" validate:"required"`
TdMode string `json:"tdMode" validate:"required"`
Ccy string `json:"ccy"`
ClOrdId string `json:"clOrdId"`
Tag string `json:"tag"`
Side string `json:"side"`
PosSide string `json:"posSide"`
OrdType string `json:"ordType" validate:"required"`
Sz string `json:"sz"`
Px string `json:"px"`
ReduceOnly bool `json:"reduceOnly"`
TgtCcy string `json:"tgtCcy"`
BanAmend bool `json:"banAmend"`
QuickMgnType string `json:"quickMgnType"`
}
type OrderResponse struct {
Id string
Response string
Vigency time.Time
ValueCurrency string
errorResponse string
}
type OrderEntity struct {
gorm.Model
Request_okx string
Vigency time.Time
Response_okx string
}