-
-
Notifications
You must be signed in to change notification settings - Fork 294
/
futures_get_account_balance_request.go
39 lines (28 loc) · 1.23 KB
/
futures_get_account_balance_request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package binanceapi
import (
"github.com/c9s/requestgen"
"github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/types"
)
type FuturesBalance struct {
AccountAlias string `json:"accountAlias"`
Asset string `json:"asset"`
// Balance - wallet balance
Balance fixedpoint.Value `json:"balance"`
CrossWalletBalance fixedpoint.Value `json:"crossWalletBalance"`
// CrossUnPnL unrealized profit of crossed positions
CrossUnPnl fixedpoint.Value `json:"crossUnPnl"`
AvailableBalance fixedpoint.Value `json:"availableBalance"`
// MaxWithdrawAmount - maximum amount for transfer out
MaxWithdrawAmount fixedpoint.Value `json:"maxWithdrawAmount"`
// MarginAvailable - whether the asset can be used as margin in Multi-Assets mode
MarginAvailable bool `json:"marginAvailable"`
UpdateTime types.MillisecondTimestamp `json:"updateTime"`
}
//go:generate requestgen -method GET -url "/fapi/v2/balance" -type FuturesGetAccountBalanceRequest -responseType []FuturesBalance
type FuturesGetAccountBalanceRequest struct {
client requestgen.AuthenticatedAPIClient
}
func (c *FuturesRestClient) NewFuturesGetAccountBalanceRequest() *FuturesGetAccountBalanceRequest {
return &FuturesGetAccountBalanceRequest{client: c}
}