概览
This draft reflects the current code contract implemented by `ashare-api`. Scope of this draft: - system endpoints - markets - classifications - equities - indices - funds The API is read-only in this version.
服务地址
/Same-origin serverhttp://localhost:8080Local development
鉴权
ApiKeyAuth: apiKey 通过 X-API-Key 位置 header
System
3 个操作
Liveness probe
Operation ID: getSystemHealth
鉴权: 公开
参数
无参数。
响应
200Service is alive schema:StatusResponse
Readiness probe
Operation ID: getSystemReadiness
鉴权: 公开
参数
无参数。
响应
200Service is ready schema:StatusResponse
Service version metadata
Operation ID: getSystemVersion
鉴权: 公开
参数
无参数。
响应
200Version metadata schema:VersionResponse
Markets
3 个操作
List supported markets
Operation ID: listMarkets
鉴权: API Key
参数
无参数。
响应
200Market collection schema:MarketCollectionResponse401Unauthorized schema:ErrorResponse
Get one market
Operation ID: getMarket
鉴权: API Key
参数
market[path] 必填 schema: MarketId
响应
200Market resource schema:MarketResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List trading days for one market
Operation ID: listTradingDays
鉴权: API Key
参数
market[path] 必填 schema: MarketIdfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
响应
200Trading day collection schema:TradingDayCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
Classifications
2 个操作
List primary industries
Operation ID: listPrimaryIndustries
鉴权: API Key
参数
page[size][query] schema: integer
响应
200Primary industry collection schema:ClassificationCollectionResponse401Unauthorized schema:ErrorResponse
List sector classifications
Operation ID: listSectors
鉴权: API Key
参数
page[size][query] schema: integer
响应
200Sector collection schema:ClassificationCollectionResponse401Unauthorized schema:ErrorResponse
Equities
25 个操作
List equities
Operation ID: listEquities
鉴权: API Key
参数
market[query] schema: MarketIdboard[query] schema: BoardIdcode[query] schema: stringname[query] schema: stringpage[size][query] schema: integer
响应
200Equity collection schema:InstrumentCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Get one equity
Operation ID: getEquity
鉴权: API Key
参数
instrument_id[path] 必填 schema: string
响应
200Equity resource schema:InstrumentResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List equity bars
Operation ID: listEquityBars
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringinterval[query] 必填 schema: IntervalIdadjustment[query] schema: AdjustmentIdfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
响应
200Bar collection schema:BarCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List business scope entries
Operation ID: listBusinessScope
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringpage[size][query] schema: integer
响应
200Business scope collection schema:TextEntryCollectionResponse401Unauthorized schema:ErrorResponse
List capital flows
Operation ID: listCapitalFlows
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
响应
200Capital flow collection schema:CapitalFlowCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Get company profile
Operation ID: getCompanyProfile
鉴权: API Key
参数
instrument_id[path] 必填 schema: string
响应
200Company profile resource schema:CompanyProfileResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List dividends
Operation ID: listDividends
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
响应
200Dividend collection schema:DividendCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List earnings forecasts
Operation ID: listEarningsForecasts
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
响应
200Earnings forecast collection schema:EarningsForecastCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List financial indicators
Operation ID: listFinancialIndicators
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
响应
200Financial indicator collection schema:FinancialIndicatorCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List balance sheets
Operation ID: listBalanceSheets
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
响应
200Balance sheet collection schema:BalanceSheetCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List cash flow statements
Operation ID: listCashFlowStatements
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringpage[size][query] schema: integer
响应
200Cash flow statement collection schema:CashFlowStatementCollectionResponse401Unauthorized schema:ErrorResponse
List income statements
Operation ID: listIncomeStatements
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringpage[size][query] schema: integer
响应
200Income statement collection schema:IncomeStatementCollectionResponse401Unauthorized schema:ErrorResponse
List institutional holdings
Operation ID: listInstitutionalHoldings
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringpage[size][query] schema: integer
响应
200Institutional holding collection schema:InstitutionalHoldingCollectionResponse401Unauthorized schema:ErrorResponse
List management history
Operation ID: listManagementHistory
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringpage[size][query] schema: integer
响应
200Management history collection schema:ManagementHistoryCollectionResponse401Unauthorized schema:ErrorResponse
List price limits
Operation ID: listPriceLimits
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date)to[query] schema: string (date)date[query] schema: string (date)page[size][query] schema: integer
响应
200Price limit collection schema:PriceLimitCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List equity quotes
Operation ID: listEquityQuotes
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
响应
200Quote collection schema:QuoteCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List sector memberships
Operation ID: listSectorMemberships
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringpage[size][query] schema: integer
响应
200Sector membership collection schema:TextEntryCollectionResponse401Unauthorized schema:ErrorResponse
List equity technical indicators
Operation ID: listEquityTechnicalIndicators
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringindicator[path] 必填 schema: IndicatorIdinterval[query] 必填 schema: IntervalIdadjustment[query] schema: AdjustmentIdfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
响应
200Technical indicator collection schema:TechnicalIndicatorCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List equity trades
Operation ID: listEquityTrades
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
响应
200Trade collection schema:TradeCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List supported pool types
Operation ID: listPoolTypes
鉴权: API Key
参数
无参数。
响应
200Pool type collection schema:PoolTypeCollectionResponse401Unauthorized schema:ErrorResponse
List pool constituents
Operation ID: listPoolConstituents
鉴权: API Key
参数
pool_type[path] 必填 schema: PoolTypeIddate[query] schema: string (date)page[size][query] schema: integer
响应
200Pool constituent collection schema:PoolConstituentCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
Indices
5 个操作
List indices
Operation ID: listIndices
鉴权: API Key
参数
market[query] schema: MarketIdcode[query] schema: stringname[query] schema: stringpage[size][query] schema: integer
响应
200Index collection schema:InstrumentCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Get one index
Operation ID: getIndex
鉴权: API Key
参数
instrument_id[path] 必填 schema: string
响应
200Index resource schema:InstrumentResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List index bars
Operation ID: listIndexBars
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringinterval[query] 必填 schema: IntervalIdadjustment[query] schema: AdjustmentIdfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
响应
200Bar collection schema:BarCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List index quotes
Operation ID: listIndexQuotes
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
响应
200Quote collection schema:QuoteCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List index technical indicators
Operation ID: listIndexTechnicalIndicators
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringindicator[path] 必填 schema: IndicatorIdinterval[query] 必填 schema: IntervalIdadjustment[query] schema: AdjustmentIdfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
响应
200Technical indicator collection schema:TechnicalIndicatorCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Funds
3 个操作
List funds
Operation ID: listFunds
鉴权: API Key
参数
market[query] schema: MarketIdcode[query] schema: stringname[query] schema: stringpage[size][query] schema: integer
响应
200Fund collection schema:InstrumentCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Get one fund
Operation ID: getFund
鉴权: API Key
参数
instrument_id[path] 必填 schema: string
响应
200Fund resource schema:InstrumentResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List fund quotes
Operation ID: listFundQuotes
鉴权: API Key
参数
instrument_id[path] 必填 schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
响应
200Quote collection schema:QuoteCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse