mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 16:21:09 +00:00
all: add AccountTypeIsolatedMargin
This commit is contained in:
parent
98a696a7d0
commit
a1c9bd7ec8
|
@ -326,7 +326,7 @@ func (e *Exchange) queryIsolatedMarginAccount(ctx context.Context) (*types.Accou
|
|||
}
|
||||
|
||||
a := &types.Account{
|
||||
AccountType: types.AccountTypeMargin,
|
||||
AccountType: types.AccountTypeIsolatedMargin,
|
||||
IsolatedMarginInfo: toGlobalIsolatedMarginAccountInfo(marginAccount), // In binance GO api, Account define marginAccount info which mantain []*AccountAsset and []*AccountPosition.
|
||||
}
|
||||
|
||||
|
|
|
@ -230,9 +230,10 @@ func (m BalanceMap) Print() {
|
|||
type AccountType string
|
||||
|
||||
const (
|
||||
AccountTypeFutures = AccountType("futures")
|
||||
AccountTypeMargin = AccountType("margin")
|
||||
AccountTypeSpot = AccountType("spot")
|
||||
AccountTypeFutures = AccountType("futures")
|
||||
AccountTypeMargin = AccountType("margin")
|
||||
AccountTypeIsolatedMargin = AccountType("isolated_margin")
|
||||
AccountTypeSpot = AccountType("spot")
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
|
@ -251,8 +252,8 @@ type Account struct {
|
|||
MarginLevel fixedpoint.Value `json:"marginLevel,omitempty"`
|
||||
MarginTolerance fixedpoint.Value `json:"marginTolerance,omitempty"`
|
||||
|
||||
BorrowEnabled bool `json:"borrowEnabled,omitempty"`
|
||||
TransferEnabled bool `json:"transferEnabled,omitempty"`
|
||||
BorrowEnabled bool `json:"borrowEnabled,omitempty"`
|
||||
TransferEnabled bool `json:"transferEnabled,omitempty"`
|
||||
|
||||
// isolated margin related fields
|
||||
// LiquidationPrice is only used when account is in the isolated margin mode
|
||||
|
|
Loading…
Reference in New Issue
Block a user