fetches margin mode of the user https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#position-information-v3-user_data :param str[] symbols: unified market symbols :param dict [params]: extra parameters specific to the exchange API endpoint
(self, symbols: Strings = None, params={})
| 2881 | } |
| 2882 | |
| 2883 | def fetch_margin_modes(self, symbols: Strings = None, params={}) -> MarginModes: |
| 2884 | """ |
| 2885 | fetches margin mode of the user |
| 2886 | |
| 2887 | https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#position-information-v3-user_data |
| 2888 | |
| 2889 | :param str[] symbols: unified market symbols |
| 2890 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 2891 | :returns dict: a list of `margin mode structures <https://docs.ccxt.com/?id=margin-mode-structure>` |
| 2892 | """ |
| 2893 | self.load_markets_and_sign_in() |
| 2894 | response = self.fapiPrivateGetV3PositionRisk(params) |
| 2895 | # |
| 2896 | # |
| 2897 | # [ |
| 2898 | # { |
| 2899 | # "symbol": "INJUSDT", |
| 2900 | # "positionAmt": "0.0", |
| 2901 | # "entryPrice": "0.0", |
| 2902 | # "markPrice": "0.00000000", |
| 2903 | # "unRealizedProfit": "0.00000000", |
| 2904 | # "liquidationPrice": "0", |
| 2905 | # "leverage": "20", |
| 2906 | # "maxNotionalValue": "25000", |
| 2907 | # "marginType": "cross", |
| 2908 | # "isolatedMargin": "0.00000000", |
| 2909 | # "isAutoAddMargin": "false", |
| 2910 | # "positionSide": "BOTH", |
| 2911 | # "notional": "0", |
| 2912 | # "isolatedWallet": "0", |
| 2913 | # "updateTime": 0 |
| 2914 | # } |
| 2915 | # ] |
| 2916 | # |
| 2917 | # |
| 2918 | return self.parse_margin_modes(response, symbols, 'symbol', 'swap') |
| 2919 | |
| 2920 | def parse_margin_mode(self, marginMode: dict, market=None) -> MarginMode: |
| 2921 | # |
nothing calls this directly
no test coverage detected