(self, liquidation, market: Market = None)
| 8152 | return self.parse_liquidations(liquidations, market, since, limit) |
| 8153 | |
| 8154 | def parse_liquidation(self, liquidation, market: Market = None) -> Liquidation: |
| 8155 | # |
| 8156 | # { |
| 8157 | # "symbol": "ETHPERP", |
| 8158 | # "orderType": "Market", |
| 8159 | # "underlyingPrice": "", |
| 8160 | # "orderLinkId": "", |
| 8161 | # "side": "Buy", |
| 8162 | # "indexPrice": "", |
| 8163 | # "orderId": "8c065341-7b52-4ca9-ac2c-37e31ac55c94", |
| 8164 | # "stopOrderType": "UNKNOWN", |
| 8165 | # "leavesQty": "0", |
| 8166 | # "execTime": "1672282722429", |
| 8167 | # "isMaker": False, |
| 8168 | # "execFee": "0.071409", |
| 8169 | # "feeRate": "0.0006", |
| 8170 | # "execId": "e0cbe81d-0f18-5866-9415-cf319b5dab3b", |
| 8171 | # "tradeIv": "", |
| 8172 | # "blockTradeId": "", |
| 8173 | # "markPrice": "1183.54", |
| 8174 | # "execPrice": "1190.15", |
| 8175 | # "markIv": "", |
| 8176 | # "orderQty": "0.1", |
| 8177 | # "orderPrice": "1236.9", |
| 8178 | # "execValue": "119.015", |
| 8179 | # "execType": "Trade", |
| 8180 | # "execQty": "0.1" |
| 8181 | # } |
| 8182 | # |
| 8183 | marketId = self.safe_string(liquidation, 'symbol') |
| 8184 | timestamp = self.safe_integer(liquidation, 'execTime') |
| 8185 | contractsString = self.safe_string(liquidation, 'execQty') |
| 8186 | contractSizeString = self.safe_string(market, 'contractSize') |
| 8187 | priceString = self.safe_string(liquidation, 'execPrice') |
| 8188 | baseValueString = Precise.string_mul(contractsString, contractSizeString) |
| 8189 | quoteValueString = Precise.string_mul(baseValueString, priceString) |
| 8190 | return self.safe_liquidation({ |
| 8191 | 'info': liquidation, |
| 8192 | 'symbol': self.safe_symbol(marketId, market, None, 'contract'), |
| 8193 | 'contracts': self.parse_number(contractsString), |
| 8194 | 'contractSize': self.parse_number(contractSizeString), |
| 8195 | 'price': self.parse_number(priceString), |
| 8196 | 'baseValue': self.parse_number(baseValueString), |
| 8197 | 'quoteValue': self.parse_number(quoteValueString), |
| 8198 | 'timestamp': timestamp, |
| 8199 | 'datetime': self.iso8601(timestamp), |
| 8200 | }) |
| 8201 | |
| 8202 | def get_leverage_tiers_paginated(self, symbol: Str = None, params={}): |
| 8203 | self.load_markets() |
nothing calls this directly
no test coverage detected