/price2forex/{fiatPair}

获取法币汇率。

Parameters

  • {fiatPair} [必须] 法币,如: USDEURUSDGBPUSDSGDUSDCNYUSDJPYUSDKRW等。

Request

  • 请将 YOUR-API-KEY 替换您的 API-KEY

curl -X GET https://api.solarpath.io/v1/YOUR-API-KEY/price2forex/usdsgd

Response

{
  "code": 200,
  "msg": "successful",
  "status": "success",
  "result": {
    "symbol": "USDSGD",
    "price": "1.33135",      // 当前最新价
    "change": "-0.01952524",
    "changeAbs": "-0.00026",
    "bid": "1.33137",        // 当前买入价
    "ask": "1.33156",        // 当前卖出价
    "high": "1.3329",        // 当天最高价
    "low": "1.329",          // 当天最低价
    "type": "forex",
    "description": "U.S. DOLLAR / SINGAPORE DOLLAR",
    "time": 1570684543470    // 更新时间
  }
}

API每3~5分钟自动刷新。

最后更新于