S SPARKDATA
← Back to data results

Indices

Index Margin

IndexMargin
FreeJSONTry online

Operation explorer

Index Margin

IndexMargin
Manage API keys

Loading account…

The example is prefilled. Choose an API key and run it.

Uses the account’s current access and allowance. Field notes stay separate so copied JSON remains executable.

  • indexObject: 沪深300 · 000300.SH
  • Samples use verified instruments and dictionary values. Records depend on the query range, data updates and the selected key's permissions.
  • The sample requests 5 records; some business aggregates may return more rows, as shown in the actual response.
Example field notes 5
indexObjectstring_array · required
交易市场指数代码,支持一次获取多个品种数据Use an exact name or dictionary code. 沪深300 (3145)
beginDatedate
查询开始日期Use YYYY-MM-DD; wrap array values in a JSON array.
endDatedate
查询结束日期Use YYYY-MM-DD; wrap array values in a JSON array.
pageNonumber
定位分页查询的目标页码,默认1Page numbers start at 1; the sample reads the first page.
pageSizenumber
单页返回的最大记录条数,默认500The sample requests 5 records for a quick preview.
POST /v1/data/operations/IndexMargin

curl example with field notes
# indexObject: string_array (required) — 交易市场指数代码,支持一次获取多个品种数据
# beginDate: date — 查询开始日期
# endDate: date — 查询结束日期
# pageNo: number — 定位分页查询的目标页码,默认1
# pageSize: number — 单页返回的最大记录条数,默认500
curl --silent --show-error --fail-with-body --request POST \
  'https://spark-data.cn/v1/data/operations/IndexMargin' \
  --header "Authorization: Bearer ${SPARKDATA_API_KEY:?Set SPARKDATA_API_KEY first}" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data-binary '{"parameters":{"indexObject":["3145"],"beginDate":"2026-10-15","endDate":"2026-11-14","pageNo":1,"pageSize":5}}'

This API is free. Query it with any API key in your account.

Data description

Use the field names shown below when building requests.

本接口可获取境内股票指数在指定日期下的两融相关统计数据,包括融资余额、融资买入额、融资偿还额、融券余量、融券余额、融券卖出量、融券偿还量、融资融券余额等关键数据。通过该接口,用户可全面监控指数成份股整体杠杆资金动向、多空情绪变化与资金活跃度,为指数择时、资金面分析、策略交易提供重要依据。 典型问法 沪深 300 指数最新的融资余额、融券余额和融资融券余额分别是多少?截至上周五,CS西部的融资融券余额是多少? 使用场景 单指数两融监控输入指数代码、名称或内码,获取指定日期下指数整体融资融券数据,直观判断杠杆资金规模与多空力量。示例:查询沪深 300 最新融资余额、融券余额,判断市场杠杆情绪;获取创业板指截止 2025 年 6 月的融资买入额与融资偿还额。 多指数两融对比批量查询多只指数的两融指标,横向对比不同板块杠杆资金偏好与活跃度差异。示例:对比沪深 300、中证 500、科创 50 的融资融券余额结构;分析上证 50 与创业板指在融资买入、融券卖出上的差异。 指数择时与情绪判断通过融资余额、融券余额、融资买入额、融券卖出量等指标变化,判断指数当前多空情绪,辅助指数择时与波段操作。示例:根据融资余额持续上升判断多头力量增强;依据融券余量变化研判短期空头压力。 策略与资金面研究基于两融数据构建资金面监控模型、杠杆策略或情绪指标,为指数投资、ETF 交易提供数据支撑。示例:跟踪指数融资融券余额趋势变化,辅助判断中期资金方向;结合融资买入、偿还数据分析短线资金进出节奏。

POST /v1/data/operations/IndexMargin · JSON

Input parameters

FieldTypeConstraintDescription and example
indexObject
指数代码
string_array
string_array
Required
Dictionary selection: STOCK_A_INDEX
交易市场指数代码,支持一次获取多个品种数据

Example: ["3145"]

beginDate
开始日期
date
date
Optional查询开始日期

Example: 2026-10-15

endDate
截止日期
date
date
Optional查询结束日期

Example: 2026-11-14

pageNo
页面编号
number
number
Optional定位分页查询的目标页码,默认1

Example: 1

pageSize
页内记录数
number
number
Optional单页返回的最大记录条数,默认500

Example: 5

Response fields

FieldTypeConstraintDescription and example
indexobject
指数内码
string
string
—指数在系统内部的唯一标识

Example: Example text

indexcode
指数代码
string
string
—交易市场通用的指数代码

Example: Example text

indexname
指数名称
string
string
—交易市场通用的指数简称

Example: Example text

enddate
截止日期
string
string
—数据统计日期

Example: Example text

financebalance
融资余额
number
number
—指定日期指数融资余额,即尚未偿还的融资资金总额

Example: 1

financebuyvalue
融资买入额
number
number
—指定日期指数融资买入额

Example: 1

financerepaymentvalue
融资偿还额
number
number
—指定日期指数融资偿还额

Example: 1

securitylendingmargin
融券余量
number
number
—指定日期指数融券余量,即尚未归还的融券股票数量

Example: 1

securitylendingbalance
融券余额
number
number
—指定日期指数融券余额,即尚未偿还的融券资金总额(融券余量 × 标的股价)

Example: 1

securitylendingsellvolume
融券卖出量
number
number
—指定日期指数融券卖出量

Example: 1

securityrefundvolume
融券偿还量
number
number
—指定日期指数融券偿还量

Example: 1

margintradingbalance
融资融券余额
number
number
—指定日期指数融资余额与融券余额的合计值,反映两融整体规模

Example: 1

Request example

Example instruments, required parameters and applicable page limits are prefilled. Open the side drawer for field notes and a live response.

{
  "parameters": {
    "indexObject": [
      "3145"
    ],
    "beginDate": "2026-10-15",
    "endDate": "2026-11-14",
    "pageNo": 1,
    "pageSize": 5
  }
}
  • indexObject: 沪深300 · 000300.SH
  • Samples use verified instruments and dictionary values. Records depend on the query range, data updates and the selected key's permissions.
  • The sample requests 5 records; some business aggregates may return more rows, as shown in the actual response.

Coverage and access boundaries

Run the example to check the securities, dates and fields you need. Available history and content rights vary by endpoint. Requests use your account access and the selected API key.

Follow the parameter notes for minute intervals, price adjustment and time units. A missing field does not mean a zero value.