fetches all available currencies on an exchange https://apidocs.lighter.xyz/reference/assetdetails :param dict [params]: extra parameters specific to the exchange API endpoint :returns dict: an associative dictionary of currencies
(self, params={})
| 1169 | return result |
| 1170 | |
| 1171 | def fetch_currencies(self, params={}) -> Currencies: |
| 1172 | """ |
| 1173 | fetches all available currencies on an exchange |
| 1174 | |
| 1175 | https://apidocs.lighter.xyz/reference/assetdetails |
| 1176 | |
| 1177 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1178 | :returns dict: an associative dictionary of currencies |
| 1179 | """ |
| 1180 | response = self.publicGetAssetDetails(params) |
| 1181 | if self.check_required_credentials(False): |
| 1182 | self.pre_load_lighter_library() |
| 1183 | # |
| 1184 | # { |
| 1185 | # "code": 200, |
| 1186 | # "asset_details": [ |
| 1187 | # { |
| 1188 | # "asset_id": 3, |
| 1189 | # "symbol": "USDC", |
| 1190 | # "l1_decimals": 6, |
| 1191 | # "decimals": 6, |
| 1192 | # "min_transfer_amount": "1.000000", |
| 1193 | # "min_withdrawal_amount": "1.000000", |
| 1194 | # "margin_mode": "enabled", |
| 1195 | # "index_price": "1.000000", |
| 1196 | # "l1_address": "0x95Fd23d5110f9D89A4b0B7d63D78F5B5Ea5074D1" |
| 1197 | # } |
| 1198 | # ] |
| 1199 | # } |
| 1200 | # |
| 1201 | data = self.safe_list(response, 'asset_details', []) |
| 1202 | return self.parse_currencies(data) |
| 1203 | |
| 1204 | def parse_currency(self, rawCurrency: dict) -> Currency: |
| 1205 | id = self.safe_string(rawCurrency, 'asset_id') |
nothing calls this directly
no test coverage detected