types: remove exchange specific fields

This commit is contained in:
austin362667 2021-12-23 23:16:20 +08:00
parent 6c1642eed6
commit df62683313
2 changed files with 15 additions and 27 deletions

View File

@ -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,7 +226,7 @@ type Account struct {
type FuturesAccountInfo struct {
// Futures fields
Assets []FuturesUserAsset `json:"assets"`
Assets map[Asset]FuturesUserAsset `json:"assets"`
FeeTier int `json:"feeTier"`
MaxWithdrawAmount fixedpoint.Value `json:"maxWithdrawAmount"`
Positions PositionMap `json:"positions"`

View File

@ -40,19 +40,8 @@ type Position struct {
// 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
PositionRisk *PositionRisk
sync.Mutex
}