(self, currency: dict)
| 648 | return self.parse_currencies(data) |
| 649 | |
| 650 | def parse_currency(self, currency: dict) -> Currency: |
| 651 | # |
| 652 | # { |
| 653 | # "id": 1, |
| 654 | # "name": "USD", |
| 655 | # "symbol": "USD", |
| 656 | # "description": "USD Collateral", |
| 657 | # "precision": 6, |
| 658 | # "isActive": True, |
| 659 | # "isCollateral": True, |
| 660 | # "starkexId": "0x1", |
| 661 | # "starkexResolution": 1000000, |
| 662 | # "l1Id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", |
| 663 | # "l1Resolution": 1000000, |
| 664 | # "version": 3, |
| 665 | # "createdAt": 1752829532673, |
| 666 | # "type": "SPOT", |
| 667 | # "canBeUsedAsCollateral": True, |
| 668 | # "riskFactors": [], |
| 669 | # "availableForTradeFactors": [] |
| 670 | # } |
| 671 | # |
| 672 | currencyId = self.safe_string(currency, 'symbol') |
| 673 | if (currencyId is not None) and (currencyId.find('SPOT') >= 0): |
| 674 | currencyId = currencyId.replace('SPOT', '') |
| 675 | code = self.safe_currency_code(currencyId) |
| 676 | if currencyId == 'USD': |
| 677 | code = 'USDC' |
| 678 | name = self.safe_string(currency, 'name') |
| 679 | precision = self.safe_integer(currency, 'precision') |
| 680 | isActive = self.safe_bool(currency, 'isActive') |
| 681 | return self.safe_currency_structure({ |
| 682 | 'id': currencyId, |
| 683 | 'code': code, |
| 684 | 'numericId': self.safe_integer(currency, 'id'), |
| 685 | 'name': name, |
| 686 | 'active': isActive, |
| 687 | 'deposit': True, |
| 688 | 'withdraw': True, |
| 689 | 'precision': math.pow(10, precision * -1), |
| 690 | 'type': 'other', |
| 691 | 'margin': self.safe_bool(currency, 'canBeUsedAsCollateral'), |
| 692 | 'info': currency, |
| 693 | }) |
| 694 | |
| 695 | def fetch_ticker(self, symbol: str, params={}) -> Ticker: |
| 696 | """ |
nothing calls this directly
no test coverage detected