Skip to content

Conversation

c9s
Copy link
Owner

@c9s c9s commented May 21, 2025

No description provided.

@c9s c9s enabled auto-merge May 21, 2025 09:08
// for margin account
if e.MarginSettings.IsMargin {
account.AccountType = types.AccountTypeMargin
account.TotalAccountValue = accounts[0].TotalEquityInUSD

account.BorrowEnabled = types.BoolPtr(accountConfigs[0].EnableSpotBorrow)

// Spot mode could have margin ratio as well
account.MarginRatio = fixedpoint.NewFromFloat(999.99)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you leave a comment about choosing 999.99?

@c9s c9s merged commit 57820df into main May 21, 2025
3 checks passed
@c9s c9s deleted the c9s/okx-margin-level-fix branch May 21, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants