期货基础资料
期货基础资料提供品种目录与单个合约的详细信息。
通用约定
- Base URL:
https://fuyao.aicubes.cn。 - 必需请求头:
X-api-key;认证与权限错误通过业务code表达。 - 期货合约使用完整
thscode,品种代码使用大写形式;接口返回统一ApiResponse信封。 - ISO 日期按
Asia/Shanghai解释,Unix 时间戳为毫秒。金融数值与日期来源缺失时可为null,列表无数据时返回[]。
期货品种资料
GET /api/futures/varieties/list
MCP Tool:get_futures_varieties_list
请求参数
无业务参数。
| 参数 | 类型 | 必需 | 默认值 | 说明 |
|---|---|---|---|---|
| — | — | — | — | 无业务参数。 |
请求示例
curl 'https://fuyao.aicubes.cn/api/futures/varieties/list' \
-H 'X-api-key: <your-api-key>'
响应示例
{
"code": 0,
"message": "success",
"request_id": "request-id",
"data": {
"timestamp": 1789036800000,
"item": [
{
"variety_code": "CU",
"quote_code": "CU",
"name": "沪铜",
"exchange_code": "SHFE",
"exchange_name": "上海期货交易所",
"has_night_session": true,
"margin_rate": 0.12,
"main_contract_thscode": "CU2601.SHF",
"trade_amount": 120000000,
"price_coefficient": 1,
"price_unit": "元/吨",
"trade_unit": "手",
"tick_size": 10,
"contract_multiplier": 5,
"capital_flow": null,
"long_short_ratio": null,
"transaction_fee": null,
"transaction_fee_rate": null,
"trade_sessions": []
}
]
}
}
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
timestamp | long | 数据时间,毫秒时间戳。 |
item[] | array | 品种列表。 |
item[].variety_code / quote_code / name | string | null | 品种代码、行情代码与名称。 |
item[].exchange_code / exchange_name | string | null | 交易所代码与名称。 |
item[].has_night_session | boolean | null | 是否包含夜盘。 |
item[].margin_rate / trade_amount / capital_flow / long_short_ratio | number | null | 保证金率、成交额、资金流与多空比。 |
item[].price_coefficient / tick_size / contract_multiplier | number | null | 价格系数、最小变动价位与合约乘数。 |
item[].price_unit / trade_unit / main_contract_thscode | string | null | 价格单位、交易单位与主力合约代码。 |
item[].transaction_fee / transaction_fee_rate | number | null | 手续费与手续费率。 |
item[].trade_sessions[] | array | 交易时段;每项含 start_time、end_time、session_type。 |
期货合约详情
GET /api/futures/contracts/detail
MCP Tool:get_futures_contracts_detail
请求参数
| 参数 | 类型 | 必需 | 默认值 | 说明 |
|---|---|---|---|---|
thscode | string | 是 | — | 期货合约完整同花顺代码。 |
请求示例
curl 'https://fuyao.aicubes.cn/api/futures/contracts/detail?thscode=CU2601.SHF' \
-H 'X-api-key: <your-api-key>'
响应示例
{
"code": 0,
"message": "success",
"request_id": "request-id",
"data": {
"timestamp": 1789036800000,
"thscode": "CU2601.SHF",
"ticker": "CU2601",
"name": "沪铜2601",
"variety_code": "CU",
"variety_name": "沪铜",
"exchange_code": "SHFE",
"list_date": "2025-01-01",
"end_date": "2026-01-15",
"last_trade_date": "2026-01-15",
"last_delivery_date": "2026-01-20"
}
}
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
timestamp | long | 数据时间,毫秒时间戳。 |
thscode / ticker / name | string | null | 完整代码、纯代码与合约名称。 |
variety_code / variety_name / exchange_code | string | null | 品种代码、品种名称与交易所代码。 |
list_date / end_date / last_trade_date / last_delivery_date | string | null | ISO 日期;来源缺失时为 null。 |