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

Method parse_margin_modification

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

Source from the content-addressed store, hash-verified

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

Callers 1

modify_margin_helperMethod · 0.95

Calls 1

safe_stringMethod · 0.80

Tested by

no test coverage detected