forked from thrasher-corp/gocryptotrader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manager_types.go
34 lines (29 loc) · 1.09 KB
/
manager_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
package currency
import (
"sync"
"github.com/thrasher-corp/gocryptotrader/exchanges/asset"
)
// PairsManager manages asset pairs
type PairsManager struct {
RequestFormat *PairFormat `json:"requestFormat,omitempty"`
ConfigFormat *PairFormat `json:"configFormat,omitempty"`
UseGlobalFormat bool `json:"useGlobalFormat,omitempty"`
LastUpdated int64 `json:"lastUpdated,omitempty"`
Pairs map[asset.Item]*PairStore `json:"pairs"`
m sync.RWMutex
}
// PairStore stores a currency pair store
type PairStore struct {
AssetEnabled *bool `json:"assetEnabled"`
Enabled Pairs `json:"enabled"`
Available Pairs `json:"available"`
RequestFormat *PairFormat `json:"requestFormat,omitempty"`
ConfigFormat *PairFormat `json:"configFormat,omitempty"`
}
// PairFormat returns the pair format
type PairFormat struct {
Uppercase bool `json:"uppercase"`
Delimiter string `json:"delimiter,omitempty"`
Separator string `json:"separator,omitempty"`
Index string `json:"index,omitempty"`
}