mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
types: remove exchange specific fields
This commit is contained in:
parent
6c1642eed6
commit
df62683313
|
@ -217,7 +217,6 @@ type Account struct {
|
|||
|
||||
TotalAccountValue fixedpoint.Value `json:"totalAccountValue,omitempty"`
|
||||
|
||||
// Futures fields
|
||||
CanDeposit bool `json:"canDeposit"`
|
||||
CanTrade bool `json:"canTrade"`
|
||||
CanWithdraw bool `json:"canWithdraw"`
|
||||
|
@ -227,18 +226,18 @@ type Account struct {
|
|||
|
||||
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"`
|
||||
Assets map[Asset]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 {
|
||||
|
|
|
@ -39,20 +39,9 @@ type Position struct {
|
|||
ExchangeFeeRates map[ExchangeName]ExchangeFee `json:"exchangeFeeRates"`
|
||||
|
||||
// Futures data fields
|
||||
Isolated bool `json:"isolated"`
|
||||
InitialMargin fixedpoint.Value `json:"initialMargin"`
|
||||
MaintMargin fixedpoint.Value `json:"maintMargin"`
|
||||
OpenOrderInitialMargin fixedpoint.Value `json:"openOrderInitialMargin"`
|
||||
PositionInitialMargin fixedpoint.Value `json:"positionInitialMargin"`
|
||||
UnrealizedProfit fixedpoint.Value `json:"unrealizedProfit"`
|
||||
EntryPrice fixedpoint.Value `json:"entryPrice"`
|
||||
MaxNotional fixedpoint.Value `json:"maxNotional"`
|
||||
PositionSide string `json:"positionSide"`
|
||||
PositionAmt fixedpoint.Value `json:"positionAmt"`
|
||||
Notional fixedpoint.Value `json:"notional"`
|
||||
IsolatedWallet fixedpoint.Value `json:"isolatedWallet"`
|
||||
UpdateTime int64 `json:"updateTime"`
|
||||
PositionRisk PositionRisk
|
||||
Isolated bool `json:"isolated"`
|
||||
UpdateTime int64 `json:"updateTime"`
|
||||
PositionRisk *PositionRisk
|
||||
|
||||
sync.Mutex
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user