/
event.go
34 lines (29 loc) · 853 Bytes
/
event.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
package tinkoff
//Message ...
type Message struct {
TrackingID string `json:"trackingId"`
Payload Payload `json:"payload"`
Status string `json:"status"`
}
//Instruments ...
type Instrument struct {
Figi string `json:"figi"`
Ticker string `json:"ticker"`
MinPriceIncrement float64 `json:"minPriceIncrement"`
Lot int `json:"lot"`
Currency string `json:"currency"`
Name string `json:"name"`
Type string `json:"type"`
}
//Payload ...
type Payload struct {
Instruments []Instrument `json:"instruments"`
Total int `json:"total"`
}
type OrderBook struct {
FIGI string `json:"figi"`
Depth int `json:"depth"`
Bids []PriceQuantity `json:"bids"`
Asks []PriceQuantity `json:"asks"`
}
type PriceQuantity [2]float64