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

Method parse_margin_modification

python/ccxt/ascendex.py:2928–2949  ·  view source on GitHub ↗
(self, data: dict, market: Market = None)

Source from the content-addressed store, hash-verified

2926 })
2927
2928 def parse_margin_modification(self, data: dict, market: Market = None) -> MarginModification:
2929 #
2930 # addMargin/reduceMargin
2931 #
2932 # {
2933 # "code": 0
2934 # }
2935 #
2936 errorCode = self.safe_string(data, 'code')
2937 status = 'ok' if (errorCode == '0') else 'failed'
2938 return {
2939 'info': data,
2940 'symbol': self.safe_string(market, 'symbol'),
2941 'type': None,
2942 'marginMode': 'isolated',
2943 'amount': None,
2944 'total': None,
2945 'code': self.safe_string(market, 'quote'),
2946 'status': status,
2947 'timestamp': None,
2948 'datetime': None,
2949 }
2950
2951 def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
2952 """

Callers 1

modify_margin_helperMethod · 0.95

Calls 1

safe_stringMethod · 0.80

Tested by

no test coverage detected