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

Method reduce_margin

python/ccxt/lighter.py:3011–3022  ·  view source on GitHub ↗

remove margin from a position :param str symbol: unified market symbol :param float amount: the amount of margin to remove :param dict [params]: extra parameters specific to the exchange API endpoint :returns dict: a `margin structure <https://docs.ccxt.com/?

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

Source from the content-addressed store, hash-verified

3009 return self.set_margin(symbol, amount, self.extend(request, params))
3010
3011 def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
3012 """
3013 remove margin from a position
3014 :param str symbol: unified market symbol
3015 :param float amount: the amount of margin to remove
3016 :param dict [params]: extra parameters specific to the exchange API endpoint
3017 :returns dict: a `margin structure <https://docs.ccxt.com/?id=reduce-margin-structure>`
3018 """
3019 request = {
3020 'direction': 0,
3021 }
3022 return self.set_margin(symbol, amount, self.extend(request, params))
3023
3024 def set_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
3025 """

Callers

nothing calls this directly

Calls 2

set_marginMethod · 0.95
extendMethod · 0.45

Tested by

no test coverage detected