Commit 700d726
Changed files (1)
src
price
src/price/coinmarketcap.py
@@ -81,7 +81,7 @@ async def cmc_convert_price(amount: float | str, base: str, quote: str) -> str:
base = base.upper()
quote = quote.upper()
if base not in all_coins or quote not in all_coins:
- return f"不支持转换: {amount} {base} → {quote}"
+ return f"不支持转换: {amount} {base} → {quote}\n支持的发币:\n{', '.join(sorted(cmc_fiat))}"
url = "https://pro-api.coinmarketcap.com/v2/tools/price-conversion"
params = {"amount": float(amount), "symbol": base, "convert": quote}
response = await hx_req(url, params=params, headers=HEADERS, merge_headers=False, proxy=PROXY.CRYPTO, check_has_kv=["data"])