types: modify IsolatedMarginAsset from array to map

This commit is contained in:
austin362667 2022-01-13 19:25:09 +08:00
parent 48d968059c
commit cd5d8c7a3f

View File

@ -92,10 +92,10 @@ type MarginUserAsset struct {
// IsolatedMarginAccount defines isolated user assets of margin account
type IsolatedMarginAccount struct {
TotalAssetOfBTC fixedpoint.Value `json:"totalAssetOfBtc"`
TotalLiabilityOfBTC fixedpoint.Value `json:"totalLiabilityOfBtc"`
TotalNetAssetOfBTC fixedpoint.Value `json:"totalNetAssetOfBtc"`
Assets []IsolatedMarginAsset `json:"assets"`
TotalAssetOfBTC fixedpoint.Value `json:"totalAssetOfBtc"`
TotalLiabilityOfBTC fixedpoint.Value `json:"totalLiabilityOfBtc"`
TotalNetAssetOfBTC fixedpoint.Value `json:"totalNetAssetOfBtc"`
Assets IsolatedMarginAssetMap `json:"assets"`
}
// IsolatedMarginAsset defines isolated margin asset information, like margin level, liquidation price... etc