mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
types: add account types for futures
This commit is contained in:
parent
0431014867
commit
91f26cc501
|
@ -41,11 +41,11 @@ func (b Balance) String() string {
|
|||
}
|
||||
|
||||
type Asset struct {
|
||||
Currency string `json:"currency"`
|
||||
Total fixedpoint.Value `json:"total"`
|
||||
InUSD fixedpoint.Value `json:"inUSD"`
|
||||
InBTC fixedpoint.Value `json:"inBTC"`
|
||||
Time time.Time `json:"time"`
|
||||
Currency string `json:"currency"`
|
||||
Total fixedpoint.Value `json:"total"`
|
||||
InUSD fixedpoint.Value `json:"inUSD"`
|
||||
InBTC fixedpoint.Value `json:"inBTC"`
|
||||
Time time.Time `json:"time"`
|
||||
}
|
||||
|
||||
type AssetMap map[string]Asset
|
||||
|
@ -181,10 +181,17 @@ func (m BalanceMap) Print() {
|
|||
}
|
||||
}
|
||||
|
||||
type AccountType string
|
||||
|
||||
const (
|
||||
AccountTypeFutures = AccountType("futures")
|
||||
AccountTypeSpot = AccountType("spot")
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
sync.Mutex `json:"-"`
|
||||
|
||||
AccountType string `json:"accountType,omitempty"`
|
||||
AccountType AccountType `json:"accountType,omitempty"`
|
||||
|
||||
MakerFeeRate fixedpoint.Value `json:"makerFeeRate,omitempty"`
|
||||
TakerFeeRate fixedpoint.Value `json:"takerFeeRate,omitempty"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user