types: add FuturesUserAsset

This commit is contained in:
austin362667 2021-12-21 23:57:59 +08:00
parent c507722745
commit cc13ae2aab

View File

@ -28,6 +28,19 @@ func (s *FuturesSettings) UseIsolatedFutures(symbol string) {
s.IsolatedFuturesSymbol = symbol
}
// FuturesUserAsset define cross/isolated futures account asset
type FuturesUserAsset struct {
Asset string `json:"asset"`
InitialMargin fixedpoint.Value `json:"initialMargin"`
MaintMargin fixedpoint.Value `json:"maintMargin"`
MarginBalance fixedpoint.Value `json:"marginBalance"`
MaxWithdrawAmount fixedpoint.Value `json:"maxWithdrawAmount"`
OpenOrderInitialMargin fixedpoint.Value `json:"openOrderInitialMargin"`
PositionInitialMargin fixedpoint.Value `json:"positionInitialMargin"`
UnrealizedProfit fixedpoint.Value `json:"unrealizedProfit"`
WalletBalance fixedpoint.Value `json:"walletBalance"`
}
type MarginExchange interface {
UseMargin()
UseIsolatedMargin(symbol string)