BUFF sale history is now available - POST /v1/archive/buff returns sale prices and daily total supply since September 2024.

GET /v1/fx

返回当前的 USD 基准汇率。当你请求 USD 以外的货币时,最新价格按这些汇率换算。汇率约每小时更新一次。

访问#

适用于所有套餐。

请求#

GETapi.cs2.sh/v1/fx
curl https://api.cs2.sh/v1/fx \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed

响应#

{
  "base": "USD",
  "updated_at": "2026-09-22T23:00:02Z",
  "collected_at": "2026-09-22T23:00:54.577Z",
  "fresh": true,
  "rates": {
    "AUD": 1.40622087,
    "CAD": 1.40543053,
    "CHF": 0.82058071,
    "CNY": 6.71350215,
    "EUR": 0.87319354,
    "GBP": 0.74932836,
    "JPY": 157.40767305,
    "NZD": 1.74524572,
    "SGD": 1.27536852,
    "USD": 1
  }
}

响应字段#

FXResponse 字段:

字段类型必需描述
basestring是基准货币(始终为 USD)。
updated_atstring (date-time)是汇率提供方发布这些汇率的时间。
collected_atstring (date-time)是cs2.sh 采集这些汇率的时间。
freshboolean是汇率超过 2 小时时为 false。最新价格换算在最长 24 小时内仍会继续使用这些汇率。
ratesRecord<string, number>是每 1 USD 可兑换的各货币数量,以货币代码为键。

错误#

400 validation_error 表示请求包含查询参数。503 service_unavailable 表示汇率不可用。共有错误见请求错误。