← 金融与货币

加密货币转法币

GET /crypto/convert

使用 CoinGecko 实时价格和 ECB 汇率将任意数量的加密货币转换为 30 种支持的法定货币中的任意一种。返回转换汇率和计算结果。适用于需要以本地货币显示持仓的加密货币投资组合应用、将加密货币转换为法定货币的支付处理商,以及需要快速计算法币等值的交易工具。

参数

coin 必填

Coin ID

to 必填

Target fiat currency

amount 可选 默认: 1

Amount of crypto

请求示例

基本用法
curl "https://nordapi.ee/api/v1/crypto/convert?coin=bitcoin&to=NOK&amount=1"
1 Bitcoin to Norwegian Krone
curl "https://nordapi.ee/api/v1/crypto/convert?coin=bitcoin&to=NOK&amount=1"
10 Ethereum to EUR
curl "https://nordapi.ee/api/v1/crypto/convert?coin=ethereum&to=EUR&amount=10"
1000 Solana to USD
curl "https://nordapi.ee/api/v1/crypto/convert?coin=solana&to=USD&amount=1000"

实时响应

{
  "amount": 1.0,
  "coin": "bitcoin",
  "coin_name": "Bitcoin",
  "rate": 658901.0456397,
  "result": 658901.0456397,
  "success": true,
  "symbol": "BTC",
  "target_currency": "NOK"
}

响应示例

{"success":true,"coin":"bitcoin","symbol":"BTC","target_currency":"NOK","rate":673174.65,"result":673174.65}