SSPARKDATAAPI
REFERENCEv1.5.0STABLE

OPENAPI 3.1 · CONTRACT FIRST

Every call, with its
boundaries made explicit.

Authentication, parameters, and streaming responses are generated from the current OpenAPI contract. This page is for fast reading; the YAML remains the machine-readable source of truth.

32OPERATIONS
20PATHS
42SCHEMAS
QUICK STARTHTTPS

Your first trustworthy quote

Tenant keys use Bearer authentication. Response metadata carries source, cache state, and generation time with the data.

curl --request GET \
+  'https://test.spark-data.cn/v1/market-data/quotes/latest?symbols=XSHG%3A600570' \
+  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
Download OpenAPI YAML

00 / Authentication

Two keys. Deliberately separate powers.

Market requests use a tenant API key beginning with spk_. Tenant, quota, and key administration uses an operator key held only in the service Secret. Public health checks require no authentication.

Authorization: Bearer YOUR_API_KEY
01

System

Kubernetes liveness and dependency readiness.

2 OPS
GET/health/liveCheck process liveness
Operation ID
getLiveness
Auth
Public

Parameters

This operation has no parameters.

Responses

200

Process is alive

application/json · Health
cURL
curl --request GET \
  'https://test.spark-data.cn/health/live'
GET/health/readyCheck MySQL and Redis readiness
Operation ID
getReadiness
Auth
Public

Parameters

This operation has no parameters.

Responses

200

Dependencies are ready

application/json · Health
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/health/ready'
02

Control Plane

Operator-only tenant, quota, and API-key management.

7 OPS
GET/v1/admin/tenantsList tenants
Operation ID
listTenants
Auth
Admin API key

Parameters

This operation has no parameters.

Responses

200

Tenant list

application/json · TenantsResponse
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/admin/tenants' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/admin/tenantsCreate a tenant with service limits
Operation ID
createTenant
Auth
Admin API key

Parameters

This operation has no parameters.

Request body

Required

application/json · CreateTenant

Responses

201

Tenant created

application/json · TenantResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
409

Resource state prevents the operation

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/admin/tenants' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/admin/tenants/{tenant_id}Get a tenant
Operation ID
getTenant
Auth
Admin API key

Parameters

tenant_idpath
string<uuid>Required

Responses

200

Tenant found

application/json · TenantResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/admin/tenants/TENANT_ID' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
PATCH/v1/admin/tenants/{tenant_id}Update tenant status or limits
Operation ID
updateTenant
Auth
Admin API key

Parameters

tenant_idpath
string<uuid>Required

Request body

Required

application/json · UpdateTenant

Responses

200

Tenant updated

application/json · TenantResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
409

Resource state prevents the operation

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request PATCH \
  'https://test.spark-data.cn/v1/admin/tenants/TENANT_ID' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/admin/tenants/{tenant_id}/api-keysList API-key metadata without secrets
Operation ID
listApiKeys
Auth
Admin API key

Parameters

tenant_idpath
string<uuid>Required

Responses

200

API-key metadata list

application/json · ApiKeysResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/admin/tenants/TENANT_ID/api-keys' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/admin/tenants/{tenant_id}/api-keysIssue an API key; plaintext is returned once
Operation ID
createApiKey
Auth
Admin API key

Parameters

tenant_idpath
string<uuid>Required

Request body

Required

application/json · CreateApiKey

Responses

201

API key issued

application/json · IssuedApiKeyResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
409

Resource state prevents the operation

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/admin/tenants/TENANT_ID/api-keys' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
DELETE/v1/admin/tenants/{tenant_id}/api-keys/{api_key_id}Revoke an API key immediately
Operation ID
revokeApiKey
Auth
Admin API key

Parameters

tenant_idpath
string<uuid>Required

api_key_idpath
string<uuid>Required

Responses

204

API key revoked

400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request DELETE \
  'https://test.spark-data.cn/v1/admin/tenants/TENANT_ID/api-keys/API_KEY_ID' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
03

Instruments

Normalized equity, ETF, and index security-master resources.

1 OPS
GET/v1/instruments/{instrument_id}Get a normalized equity, ETF, or index
Operation ID
getInstrument
Auth
Tenant API key

Parameters

instrument_idpath
InstrumentIdRequired

Example: XSHG:600570

Responses

200

Instrument found

application/json · InstrumentResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/instruments/XSHG:600570' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
04

Market Data

Cached quotes, bars, and best-effort streams.

3 OPS
GET/v1/market-data/barsQuery equity, ETF, or index OHLCV bars across complete timeframes

Uses an inclusive `start` and exclusive `end`. JSON is the default. Send `Accept: application/x-ndjson` for one bar per line followed by a `stream_end` control record. Intraday bars are derived from upstream sampled cumulative quotes and are explicitly marked `snapshot_derived`; daily bars come from upstream OHLCV endpoints. Longer equity bars come from upstream period endpoints; longer ETF and index bars are aggregated from upstream daily bars and marked `daily_derived`.

Operation ID
listBars
Auth
Tenant API key

Parameters

symbolsquery
InstrumentId[]Required

Comma-separated canonical IDs; tenant limits apply.Example: ["XSHG:600570","XSHE:000001"]

startquery
string<date-time>Required

Inclusive UTC timestamp.

endquery
string<date-time>Required

Exclusive UTC timestamp; tenant range limits apply.

timeframequery
BarTimeframeOptional

adjustmentquery
raw | forward | backwardOptional

ETF and index bars accept `raw` only.Example: raw

feedquery
auto | realtime | delayedOptionalDeprecated

Compatibility routing hint; the currently deployed source exposes one feed.Example: auto

sortquery
asc | descOptional

Example: asc

Responses

200

Bars or an NDJSON bar stream

application/json · BarsResponse / application/x-ndjson · BarStreamRecord
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/market-data/bars?symbols=XSHG%3A600570%2CXSHE%3A000001&start=2026-07-01T00%3A00%3A00Z&end=2026-08-01T00%3A00%3A00Z' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
GET/v1/market-data/quotes/latestGet latest quotes for multiple equities, ETFs, or indexes
Operation ID
getLatestQuotes
Auth
Tenant API key

Parameters

symbolsquery
InstrumentId[]Required

Comma-separated canonical IDs; tenant limits apply.Example: ["XSHG:600570","XSHE:000001"]

feedquery
auto | realtime | delayedOptionalDeprecated

Compatibility routing hint; the currently deployed source exposes one feed.Example: auto

Responses

200

Latest quotes

application/json · QuotesResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/market-data/quotes/latest?symbols=XSHG%3A600570%2CXSHE%3A000001' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
GET/v1/market-data/streamStream best-effort latest quotes with SSE

Emits `quote`, `heartbeat`, and `reconnect` events. This MVP deliberately provides neither durability nor replay. A new connection starts from the current quote. The regular OpenAPI HTTP operation describes both transports; a separate AsyncAPI contract is unnecessary for this unidirectional SSE API.

Operation ID
streamMarketData
Auth
Tenant API key

Parameters

symbolsquery
InstrumentId[]Required

Comma-separated canonical IDs; tenant limits apply.Example: ["XSHG:600570","XSHE:000001"]

feedquery
auto | realtime | delayedOptionalDeprecated

Compatibility routing hint; the currently deployed source exposes one feed.Example: auto

heartbeat_secondsquery
integerOptional

Example: 20

Responses

200

SSE quote stream

text/event-stream · MarketEvent
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/market-data/stream?symbols=XSHG%3A600570%2CXSHE%3A000001' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
05

Agent Context

Agent-oriented compound views assembled from reusable cached resources.

1 OPS
GET/v1/agent/context/{instrument_id}Get a comprehensive cached context for one equity, ETF, or index

Combines the company profile, latest quote, and requested bars in one agent-friendly response. The operation does not create a monolithic cache entry: it reuses canonical per-instrument quote and time-partitioned bar fragments, so overlapping requests from different users share cache hits. When `start` and `end` are both omitted, the service returns up to the last 365 calendar days, capped by the tenant's bar-range limit. Provider data is included verbatim beside normalized fields. Both dates must be supplied together when overriding the default range.

Operation ID
getAgentContext
Auth
Tenant API key

Parameters

instrument_idpath
InstrumentIdRequired

Example: XSHG:600570

startquery
string<date-time>Optional

Inclusive UTC timestamp; must be paired with `end`.

endquery
string<date-time>Optional

Exclusive UTC timestamp; must be paired with `start`.

timeframequery
BarTimeframeOptional

adjustmentquery
raw | forward | backwardOptional

ETF and index bars accept `raw` only.Example: raw

sortquery
asc | descOptional

Example: asc

Responses

200

Agent context assembled from reusable cached resources

application/json · AgentContextResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
404

Resource not found

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/agent/context/XSHG:600570' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
06

Aggregate Data

Nine agent-facing capability APIs covering all 371 published operations.

18 OPS
GET/v1/discoveryList exact discovery operation contracts
Operation ID
describeDiscovery
Auth
Tenant API key

Parameters

operationquery
stringOptional

Case-sensitive operation name. Omit to list every operation in the capability.

Responses

200

Exact generated workbook contracts for the selected capability

application/json · OperationContractsResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/discovery' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/discoveryInvoke a discovery or screening operation
Operation ID
queryDiscovery
Auth
Tenant API key

Parameters

This operation has no parameters.

Request body

`operation` must be one of the operations assigned to this capability in the published operation catalog. `parameters` uses the exact contract field names. Enumeration parameters accept a dictionary code, caption, reference code, or canonical A-share ID; SparkData resolves and validates the upstream code.

application/json · AggregateQuery

Responses

200

Complete upstream response plus resolved enum inputs and cache metadata

application/json · AggregateResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/discovery' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/entitiesList exact entity operation contracts
Operation ID
describeEntities
Auth
Tenant API key

Parameters

operationquery
stringOptional

Case-sensitive operation name. Omit to list every operation in the capability.

Responses

200

Exact generated workbook contracts for the selected capability

application/json · OperationContractsResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/entities' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/entitiesInvoke an entity or reference-data operation
Operation ID
queryEntities
Auth
Tenant API key

Parameters

This operation has no parameters.

Request body

`operation` must be one of the operations assigned to this capability in the published operation catalog. `parameters` uses the exact contract field names. Enumeration parameters accept a dictionary code, caption, reference code, or canonical A-share ID; SparkData resolves and validates the upstream code.

application/json · AggregateQuery

Responses

200

Complete upstream response plus resolved enum inputs and cache metadata

application/json · AggregateResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/entities' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/market-dataList exact market-data operation contracts
Operation ID
describeMarketData
Auth
Tenant API key

Parameters

operationquery
stringOptional

Case-sensitive operation name. Omit to list every operation in the capability.

Responses

200

Exact generated workbook contracts for the selected capability

application/json · OperationContractsResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/market-data' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/market-dataInvoke a unified market-data operation
Operation ID
queryMarketData
Auth
Tenant API key

Parameters

This operation has no parameters.

Request body

`operation` must be one of the operations assigned to this capability in the published operation catalog. `parameters` uses the exact contract field names. Enumeration parameters accept a dictionary code, caption, reference code, or canonical A-share ID; SparkData resolves and validates the upstream code.

application/json · AggregateQuery

Responses

200

Complete upstream response plus resolved enum inputs and cache metadata

application/json · AggregateResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/market-data' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/fundamentalsList exact fundamentals operation contracts
Operation ID
describeFundamentals
Auth
Tenant API key

Parameters

operationquery
stringOptional

Case-sensitive operation name. Omit to list every operation in the capability.

Responses

200

Exact generated workbook contracts for the selected capability

application/json · OperationContractsResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/fundamentals' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/fundamentalsInvoke a fundamentals or forecast operation
Operation ID
queryFundamentals
Auth
Tenant API key

Parameters

This operation has no parameters.

Request body

`operation` must be one of the operations assigned to this capability in the published operation catalog. `parameters` uses the exact contract field names. Enumeration parameters accept a dictionary code, caption, reference code, or canonical A-share ID; SparkData resolves and validates the upstream code.

application/json · AggregateQuery

Responses

200

Complete upstream response plus resolved enum inputs and cache metadata

application/json · AggregateResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/fundamentals' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/ownershipList exact ownership operation contracts
Operation ID
describeOwnership
Auth
Tenant API key

Parameters

operationquery
stringOptional

Case-sensitive operation name. Omit to list every operation in the capability.

Responses

200

Exact generated workbook contracts for the selected capability

application/json · OperationContractsResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/ownership' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/ownershipInvoke an ownership or portfolio operation
Operation ID
queryOwnership
Auth
Tenant API key

Parameters

This operation has no parameters.

Request body

`operation` must be one of the operations assigned to this capability in the published operation catalog. `parameters` uses the exact contract field names. Enumeration parameters accept a dictionary code, caption, reference code, or canonical A-share ID; SparkData resolves and validates the upstream code.

application/json · AggregateQuery

Responses

200

Complete upstream response plus resolved enum inputs and cache metadata

application/json · AggregateResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/ownership' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/eventsList exact event operation contracts
Operation ID
describeEvents
Auth
Tenant API key

Parameters

operationquery
stringOptional

Case-sensitive operation name. Omit to list every operation in the capability.

Responses

200

Exact generated workbook contracts for the selected capability

application/json · OperationContractsResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/events' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/eventsInvoke an event, corporate-action, or risk operation
Operation ID
queryEvents
Auth
Tenant API key

Parameters

This operation has no parameters.

Request body

`operation` must be one of the operations assigned to this capability in the published operation catalog. `parameters` uses the exact contract field names. Enumeration parameters accept a dictionary code, caption, reference code, or canonical A-share ID; SparkData resolves and validates the upstream code.

application/json · AggregateQuery

Responses

200

Complete upstream response plus resolved enum inputs and cache metadata

application/json · AggregateResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/events' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/analyticsList exact analytics operation contracts
Operation ID
describeAnalytics
Auth
Tenant API key

Parameters

operationquery
stringOptional

Case-sensitive operation name. Omit to list every operation in the capability.

Responses

200

Exact generated workbook contracts for the selected capability

application/json · OperationContractsResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/analytics' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/analyticsInvoke an analytics, valuation, or ranking operation
Operation ID
queryAnalytics
Auth
Tenant API key

Parameters

This operation has no parameters.

Request body

`operation` must be one of the operations assigned to this capability in the published operation catalog. `parameters` uses the exact contract field names. Enumeration parameters accept a dictionary code, caption, reference code, or canonical A-share ID; SparkData resolves and validates the upstream code.

application/json · AggregateQuery

Responses

200

Complete upstream response plus resolved enum inputs and cache metadata

application/json · AggregateResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/analytics' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/economyList exact economy operation contracts
Operation ID
describeEconomy
Auth
Tenant API key

Parameters

operationquery
stringOptional

Case-sensitive operation name. Omit to list every operation in the capability.

Responses

200

Exact generated workbook contracts for the selected capability

application/json · OperationContractsResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/economy' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/economyInvoke a macro, regional, or industry-economy operation
Operation ID
queryEconomy
Auth
Tenant API key

Parameters

This operation has no parameters.

Request body

`operation` must be one of the operations assigned to this capability in the published operation catalog. `parameters` uses the exact contract field names. Enumeration parameters accept a dictionary code, caption, reference code, or canonical A-share ID; SparkData resolves and validates the upstream code.

application/json · AggregateQuery

Responses

200

Complete upstream response plus resolved enum inputs and cache metadata

application/json · AggregateResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/economy' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
GET/v1/contentList exact content operation contracts
Operation ID
describeContent
Auth
Tenant API key

Parameters

operationquery
stringOptional

Case-sensitive operation name. Omit to list every operation in the capability.

Responses

200

Exact generated workbook contracts for the selected capability

application/json · OperationContractsResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request GET \
  'https://test.spark-data.cn/v1/content' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY'
POST/v1/contentInvoke a research, filing, news, or policy operation
Operation ID
queryContent
Auth
Tenant API key

Parameters

This operation has no parameters.

Request body

`operation` must be one of the operations assigned to this capability in the published operation catalog. `parameters` uses the exact contract field names. Enumeration parameters accept a dictionary code, caption, reference code, or canonical A-share ID; SparkData resolves and validates the upstream code.

application/json · AggregateQuery

Responses

200

Complete upstream response plus resolved enum inputs and cache metadata

application/json · AggregateResponse
400

Invalid request

application/problem+json · Problem
401

Missing, malformed, expired, revoked, or unknown API key

application/problem+json · Problem
403

API key lacks the required scope

application/problem+json · Problem
429

Tenant API-key rate limit exceeded

application/problem+json · Problem
503

MySQL, Redis, or upstream dependency is unavailable

application/problem+json · Problem
cURL
curl --request POST \
  'https://test.spark-data.cn/v1/content' \
  --header 'Authorization: Bearer $SPARKDATA_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"operation":"operation_code","params":{}}'
07

Data models

Reusable schemas defined by the OpenAPI contract. Expand a model to inspect its fields, types, and requirements.

42 SCHEMAS
Healthobject
PropertyType
statusstringRequired
InstrumentIdstring

Canonical MIC-prefixed ID for a supported mainland equity, ETF, or index.

PropertyType
Decimalstring
PropertyType
BarTimeframe1m | 5m | 15m | 30m | 1h | 1d | 1w | 1mo | 1q | 1y
PropertyType
CacheStatushit | miss | mixed | bypass
PropertyType
ResponseMetaobject
PropertyType
request_idstring<uuid>Required
schema_versionstringRequired
cache_statusCacheStatusRequired
sourcesparkdata-market-data | sparkdata-control-planeRequired
generated_atstring<date-time>Required
Tenantobject
PropertyType
idstring<uuid>Required
namestringRequired
statusactive | suspendedRequired
requests_per_minuteintegerRequired
max_symbols_per_requestintegerRequired
max_bar_range_daysintegerRequired
created_atstring<date-time>Required
updated_atstring<date-time>Required
CreateTenantobject
PropertyType
namestringRequired
requests_per_minuteintegerOptional
max_symbols_per_requestintegerOptional
max_bar_range_daysintegerOptional
UpdateTenantobject
PropertyType
namestringOptional
statusactive | suspendedOptional
requests_per_minuteintegerOptional
max_symbols_per_requestintegerOptional
max_bar_range_daysintegerOptional
ApiKeyobject
PropertyType
idstring<uuid>Required
tenant_idstring<uuid>Required
namestringRequired
key_prefixstringRequired · Non-secret prefix for identifying the key.
scopesmarket-data:read[]Required
statusactive | revokedRequired
expires_atstring,null<date-time>Required
created_atstring<date-time>Required
revoked_atstring,null<date-time>Required
IssuedApiKeyobject
PropertyType
CreateApiKeyobject
PropertyType
namestringRequired
scopesmarket-data:read[]Optional
expires_atstring,null<date-time>Optional
Instrumentobject
PropertyType
instrument_idInstrumentIdRequired · Canonical MIC-prefixed ID for a supported mainland equity, ETF, or index.
symbolstringRequired
namestringnullRequired
company_namestringnullRequired
micXSHG | XSHE | XBSERequired
asset_classequity | etf | indexRequired
currencystringRequired
timezonestringRequired
statusstringRequired
industrystringnullRequired
conceptsstring[]Required
provider_dataProviderDataRequired
ProviderDataobject
PropertyType
operationstringRequired · Exact operation name from the published source contract or dictionary service.
rawobjectRequired · Exact untrimmed upstream envelope, row, or rows used for a derived record.
Capabilitydiscovery | entities | market_data | fundamentals | ownership | events | analytics | economy | content
PropertyType
ContractDataTypestring | string_array | number | number_array | date | date_array
PropertyType
InputContractobject
PropertyType
namestringRequired · Public parameter name accepted by SparkData.
upstream_namestringRequired · Exact field name sent to the live upstream.
display_namestringRequired
data_typeContractDataTypeRequired
descriptionstringRequired
requiredbooleanRequired
enum_groupstringnullRequired · Live dictionary group when the workbook marks the input as enumerated.
enum_declarationstringnullRequired · Unmodified enumeration declaration from the workbook.
fixed_valuestringnullRequired · Value marked as fixed by the workbook and inserted by SparkData.
OutputContractobject
PropertyType
namestringRequired
display_namestringRequired
data_typeContractDataTypeRequired
descriptionstringRequired
OperationContractobject
PropertyType
api_idintegerRequired
sheet_namestringRequired
display_namestringRequired
operationstringRequired
descriptionstringRequired
methodstringRequired
pathstringRequired
capabilityCapabilityRequired
last_modifiedstringRequired
inputsInputContract[]Required
outputsOutputContract[]Required
OperationContractsResponseobject
PropertyType
metaResponseMetaRequired
dataOperationContract[]Required
AggregateQueryobject
PropertyType
operationstringRequired · Case-sensitive Excel operation name, for example FinancialStatement.
parametersobjectOptional · Exact Excel input names and values; undeclared fields are rejected.
EnumResolutionobject
PropertyType
fieldstringRequired
group_namestringRequired
inputobjectRequired
codestringRequired
captionstringnullRequired
provider_dataProviderDataRequired
AggregateDataobject
PropertyType
api_idintegerRequired
capabilityCapabilityRequired
operationstringRequired
resolved_parametersobjectRequired · Exact request sent upstream after fixed-value insertion and enum resolution.
enum_resolutionsEnumResolution[]Required
provider_dataProviderDataRequired
AggregateResponseobject
PropertyType
metaResponseMetaRequired
dataAggregateDataRequired
PriceLevelobject
PropertyType
priceDecimalRequired
sizeDecimalRequired
Quoteobject
PropertyType
instrument_idInstrumentIdRequired · Canonical MIC-prefixed ID for a supported mainland equity, ETF, or index.
event_timestring<date-time>Required
last_priceDecimalRequired
previous_closeDecimalRequired
openDecimalRequired
highDecimalRequired
lowDecimalRequired
changeDecimal | nullRequired
change_percentDecimal | nullRequired
volumeDecimalRequired
turnoverDecimalRequired
trade_statusstringRequired
bid_levelsPriceLevel[]Required
ask_levelsPriceLevel[]Required
provider_dataProviderDataRequired
Barobject
PropertyType
instrument_idInstrumentIdRequired · Canonical MIC-prefixed ID for a supported mainland equity, ETF, or index.
event_timestring<date-time>Required · Start of the interval in UTC.
trading_datestring,null<date>Required · Upstream trading or period-end date; null for derived intraday bars.
timeframeBarTimeframeRequired
openDecimalRequired
highDecimalRequired
lowDecimalRequired
closeDecimalRequired
previous_closeDecimal | nullRequired
volumeDecimalRequired
turnoverDecimal | nullRequired
trade_countintegernullRequired
suspendedbooleanRequired
adjustmentraw | forward | backwardRequired · ETF and index bars accept `raw` only.
aggregation_sourceprovider | snapshot_derived | daily_derivedRequired
provider_dataProviderDataRequired
StreamControlobject
PropertyType
control_typestream_end | heartbeat | reconnectRequired
request_idstring<uuid>Required
event_timestring<date-time>Required
records_sentintegerOptional
MarketEventQuote | StreamControl
PropertyType
BarStreamRecordBar | StreamControl
PropertyType
AgentContextobject
PropertyType
instrument_idInstrumentIdRequired · Canonical MIC-prefixed ID for a supported mainland equity, ETF, or index.
instrumentInstrumentRequired
latest_quoteQuote | nullRequired
barsBar[]Required
upstream_operationsstring[]Required
AgentContextResponseobject
PropertyType
metaResponseMetaRequired
dataAgentContextRequired
InstrumentResponseobject
PropertyType
metaResponseMetaRequired
dataInstrumentRequired
InstrumentResponseObjectobject
PropertyType
metaResponseMetaRequired
dataInstrumentRequired
BarsResponseobject
PropertyType
metaResponseMetaRequired
dataBar[]Required
QuotesResponseobject
PropertyType
metaResponseMetaRequired
dataQuote[]Required
TenantResponseobject
PropertyType
metaResponseMetaRequired
dataTenantRequired
TenantsResponseobject
PropertyType
metaResponseMetaRequired
dataTenant[]Required
ApiKeysResponseobject
PropertyType
metaResponseMetaRequired
dataApiKey[]Required
IssuedApiKeyResponseobject
PropertyType
metaResponseMetaRequired
dataIssuedApiKeyRequired
InvalidParameterobject
PropertyType
namestringRequired
reasonstringRequired
Problemobject
PropertyType
typestring<uri-reference>Required
titlestringRequired
statusintegerRequired
detailstringRequired
request_idstring<uuid>Required
codestringRequired
invalid_parametersInvalidParameter[]Required