Skip to content

Commit

Permalink
chore: a few adjustment (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokisan authored Oct 24, 2024
1 parent ff860cf commit 2eb25e1
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,39 +1,61 @@
{
"list": [
{
"totalEquity": "0.00009475",
"accountIMRate": "0",
"totalMarginBalance": "0.00009475",
"totalInitialMargin": "0",
"accountType": "UNIFIED",
"totalAvailableBalance": "0.00009475",
"accountLTV": "0",
"accountIMRate": "0",
"accountMMRate": "0",
"totalEquity": "79207.48963775",
"totalWalletBalance": "78429.79924861",
"totalMarginBalance": "78429.79924861",
"totalAvailableBalance": "78429.79924861",
"totalPerpUPL": "0",
"totalWalletBalance": "0.00009475",
"accountLTV": "0",
"totalInitialMargin": "0",
"totalMaintenanceMargin": "0",
"coin": [
{
"availableToBorrow": "",
"bonus": "0",
"coin": "BTC",
"equity": "1.16350244",
"usdValue": "77769.03891392",
"walletBalance": "1.16350244",
"free": "",
"locked": "0",
"spotHedgingQty": "0",
"borrowAmount": "0.000000000000000000",
"availableToWithdraw": "1.16350244",
"accruedInterest": "0",
"availableToWithdraw": "0.0000948",
"totalOrderIM": "0",
"equity": "0.0000948",
"totalPositionIM": "0",
"totalPositionMM": "0",
"usdValue": "0.00009475",
"unrealisedPnl": "0",
"cumRealisedPnl": "0",
"bonus": "0",
"marginCollateral": true,
"collateralSwitch": true,
"availableToBorrow": ""
},
{
"coin": "USDT",
"equity": "1439.61537267",
"usdValue": "1438.45072383",
"walletBalance": "1439.61537267",
"free": "",
"locked": "100",
"spotHedgingQty": "0",
"borrowAmount": "0.000000000000000000",
"availableToWithdraw": "1339.61537267",
"accruedInterest": "0",
"totalOrderIM": "0",
"totalPositionIM": "0",
"walletBalance": "0.0000948",
"cumRealisedPnl": "-43291.2691172",
"locked": "0",
"totalPositionMM": "0",
"unrealisedPnl": "0",
"cumRealisedPnl": "-1217.67369263",
"bonus": "0",
"marginCollateral": true,
"coin": "USDT"
"collateralSwitch": true,
"availableToBorrow": ""
}
]
}
]
}
}
2 changes: 1 addition & 1 deletion v5_account_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type V5WalletBalanceCoin struct {
Equity string `json:"equity"`
UsdValue string `json:"usdValue"`
WalletBalance string `json:"walletBalance"`
Free string `json:"free,omitempty"`
Free string `json:"free"`
Locked string `json:"locked"`
SpotHedgingQuantity string `json:"spotHedgingQty"`
BorrowAmount string `json:"borrowAmount"`
Expand Down
1 change: 1 addition & 0 deletions v5_account_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func TestV5Account_GetWalletBalance(t *testing.T) {
"borrowAmount": "0",
"totalPositionIM": "0",
"walletBalance": "0.805994",
"free": "",
"locked": "",
"cumRealisedPnl": "0",
"marginCollateral": true,
Expand Down

0 comments on commit 2eb25e1

Please sign in to comment.