-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.go
40 lines (32 loc) · 965 Bytes
/
types.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
package pkg
import (
"github.com/shopspring/decimal"
)
type PayloadAction = string
var (
ActionSubmit PayloadAction = "submit"
ActionCancel PayloadAction = "cancel"
ActionCancelWithKey PayloadAction = "cancel_with_key" // this method will not notify to the user
ActionReload PayloadAction = "reload"
ActionNew PayloadAction = "new"
)
type MatchingPayloadMessage struct {
Action PayloadAction `json:"action"`
Order *Order `json:"order"`
Symbol Symbol `json:"symbol"`
Key *OrderKey `json:"key"`
}
type GetDepthPayload struct {
Symbol Symbol `json:"symbol"`
Limit int64 `json:"limit"`
}
type DepthJSON struct {
Asks [][]decimal.Decimal `json:"asks"`
Bids [][]decimal.Decimal `json:"bids"`
Sequence int64 `json:"sequence"`
}
type EnqueueEventKind string
var (
EnqueueEventKindPublic EnqueueEventKind = "public"
EnqueueEventKindPrivate EnqueueEventKind = "private"
)