MCPcopy Create free account
hub / github.com/ccxt/ccxt / reduce_margin

Method reduce_margin

python/ccxt/hyperliquid.py:3655–3668  ·  view source on GitHub ↗

https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin remove margin from a position :param str symbol: unified market symbol :param float amount: the amount of margin to remove :param dict [params]: extr

(self, symbol: str, amount: float, params={})

Source from the content-addressed store, hash-verified

3653 return self.modify_margin_helper(symbol, amount, 'add', params)
3654
3655 def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
3656 """
3657
3658 https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
3659
3660 remove margin from a position
3661 :param str symbol: unified market symbol
3662 :param float amount: the amount of margin to remove
3663 :param dict [params]: extra parameters specific to the exchange API endpoint
3664 :param str [params.vaultAddress]: the vault address
3665 :param str [params.subAccountAddress]: sub account user address
3666 :returns dict: a `margin structure <https://docs.ccxt.com/?id=margin-structure>`
3667 """
3668 return self.modify_margin_helper(symbol, amount, 'reduce', params)
3669
3670 def modify_margin_helper(self, symbol: str, amount, type, params={}) -> MarginModification:
3671 self.load_markets()

Callers

nothing calls this directly

Calls 1

modify_margin_helperMethod · 0.95

Tested by

no test coverage detected