Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ type UpdateLeverageAction struct {

// UpdateIsolatedMarginAction represents isolated margin update
type UpdateIsolatedMarginAction struct {
Type string `json:"type" msgpack:"type"`
Asset int `json:"asset" msgpack:"asset"`
IsBuy bool `json:"isBuy" msgpack:"isBuy"`
Ntli float64 `json:"ntli" msgpack:"ntli"`
Type string `json:"type" msgpack:"type"`
Asset int `json:"asset" msgpack:"asset"`
IsBuy bool `json:"isBuy" msgpack:"isBuy"`
Ntli int64 `json:"ntli" msgpack:"ntli"`
}

// OrderWire represents the wire format for orders with deterministic field ordering
Expand Down
4 changes: 2 additions & 2 deletions actions_easyjson.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/leverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestUpdateLeverage(t *testing.T) {
func TestUpdateIsolatedMargin(t *testing.T) {
exchange := newTestExchange(t)

amount := 1000.0 // Amount in USD
amount := 100.2 // Amount in USD
name := "BTC"

resp, err := exchange.UpdateIsolatedMargin(context.TODO(), amount, name)
Expand Down
2 changes: 1 addition & 1 deletion exchange_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (e *Exchange) UpdateIsolatedMargin(
Type: "updateIsolatedMargin",
Asset: asset,
IsBuy: amount > 0,
Ntli: abs(amount),
Ntli: int64(amount * 1000000),
}

var result UserState
Expand Down