(self, content)
| 2048 | return re.sub('(?!^)([A-Z]+)', r'_\1', str).lower() |
| 2049 | |
| 2050 | def fix_stringified_json_members(self, content): |
| 2051 | # when stringified json has members with their values also stringified, like: |
| 2052 | # '{"code":0, "data":{"order":{"orderId":1742968678528512345,"symbol":"BTC-USDT", "takeProfit":"{\"type\":\"TAKE_PROFIT\",\"stopPrice\":43320.1}","reduceOnly":false}}}' |
| 2053 | # we can fix with below manipulations |
| 2054 | # @ts-ignore |
| 2055 | modifiedContent = content.replace('\\', '') |
| 2056 | modifiedContent = modifiedContent.replace('"{', '{') |
| 2057 | modifiedContent = modifiedContent.replace('}"', '}') |
| 2058 | return modifiedContent |
| 2059 | |
| 2060 | def extend_exchange_options(self, newOptions): |
| 2061 | self.options = self.extend(self.options, newOptions) |
no test coverage detected