mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
types: add FuturesAccountInfo
This commit is contained in:
parent
f5bbe29ac6
commit
c507722745
|
@ -206,6 +206,7 @@ type Account struct {
|
|||
sync.Mutex `json:"-"`
|
||||
|
||||
AccountType AccountType `json:"accountType,omitempty"`
|
||||
FuturesInfo *FuturesAccountInfo
|
||||
|
||||
MakerFeeRate fixedpoint.Value `json:"makerFeeRate,omitempty"`
|
||||
TakerFeeRate fixedpoint.Value `json:"takerFeeRate,omitempty"`
|
||||
|
@ -216,9 +217,30 @@ type Account struct {
|
|||
|
||||
TotalAccountValue fixedpoint.Value `json:"totalAccountValue,omitempty"`
|
||||
|
||||
// Futures fields
|
||||
CanDeposit bool `json:"canDeposit"`
|
||||
CanTrade bool `json:"canTrade"`
|
||||
CanWithdraw bool `json:"canWithdraw"`
|
||||
|
||||
balances BalanceMap
|
||||
}
|
||||
|
||||
type FuturesAccountInfo struct {
|
||||
// Futures fields
|
||||
Assets []FuturesUserAsset `json:"assets"`
|
||||
FeeTier int `json:"feeTier"`
|
||||
MaxWithdrawAmount fixedpoint.Value `json:"maxWithdrawAmount"`
|
||||
Positions PositionMap `json:"positions"`
|
||||
TotalInitialMargin fixedpoint.Value `json:"totalInitialMargin"`
|
||||
TotalMaintMargin fixedpoint.Value `json:"totalMaintMargin"`
|
||||
TotalMarginBalance fixedpoint.Value `json:"totalMarginBalance"`
|
||||
TotalOpenOrderInitialMargin fixedpoint.Value `json:"totalOpenOrderInitialMargin"`
|
||||
TotalPositionInitialMargin fixedpoint.Value `json:"totalPositionInitialMargin"`
|
||||
TotalUnrealizedProfit fixedpoint.Value `json:"totalUnrealizedProfit"`
|
||||
TotalWalletBalance fixedpoint.Value `json:"totalWalletBalance"`
|
||||
UpdateTime int64 `json:"updateTime"`
|
||||
}
|
||||
|
||||
func NewAccount() *Account {
|
||||
return &Account{
|
||||
balances: make(BalanceMap),
|
||||
|
|
Loading…
Reference in New Issue
Block a user