Overview
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.
Servers
/Same-origin serverhttp://localhost:8080Local development
Security
ApiKeyAuth: apiKey via X-API-Key in header
System
3 operations
Liveness probe
Operation ID: getSystemHealth
Auth: Public
Parameters
No parameters.
Responses
200Service is alive schema:StatusResponse
Readiness probe
Operation ID: getSystemReadiness
Auth: Public
Parameters
No parameters.
Responses
200Service is ready schema:StatusResponse
Service version metadata
Operation ID: getSystemVersion
Auth: Public
Parameters
No parameters.
Responses
200Version metadata schema:VersionResponse
Markets
3 operations
List supported markets
Operation ID: listMarkets
Auth: API Key
Parameters
No parameters.
Responses
200Market collection schema:MarketCollectionResponse401Unauthorized schema:ErrorResponse
Get one market
Operation ID: getMarket
Auth: API Key
Parameters
market[path] required schema: MarketId
Responses
200Market resource schema:MarketResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List trading days for one market
Operation ID: listTradingDays
Auth: API Key
Parameters
market[path] required schema: MarketIdfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
Responses
200Trading day collection schema:TradingDayCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
Classifications
2 operations
List primary industries
Operation ID: listPrimaryIndustries
Auth: API Key
Parameters
page[size][query] schema: integer
Responses
200Primary industry collection schema:ClassificationCollectionResponse401Unauthorized schema:ErrorResponse
List sector classifications
Operation ID: listSectors
Auth: API Key
Parameters
page[size][query] schema: integer
Responses
200Sector collection schema:ClassificationCollectionResponse401Unauthorized schema:ErrorResponse
Equities
25 operations
List equities
Operation ID: listEquities
Auth: API Key
Parameters
market[query] schema: MarketIdboard[query] schema: BoardIdcode[query] schema: stringname[query] schema: stringpage[size][query] schema: integer
Responses
200Equity collection schema:InstrumentCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Get one equity
Operation ID: getEquity
Auth: API Key
Parameters
instrument_id[path] required schema: string
Responses
200Equity resource schema:InstrumentResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List equity bars
Operation ID: listEquityBars
Auth: API Key
Parameters
instrument_id[path] required schema: stringinterval[query] required 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
Responses
200Bar collection schema:BarCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List business scope entries
Operation ID: listBusinessScope
Auth: API Key
Parameters
instrument_id[path] required schema: stringpage[size][query] schema: integer
Responses
200Business scope collection schema:TextEntryCollectionResponse401Unauthorized schema:ErrorResponse
List capital flows
Operation ID: listCapitalFlows
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
Responses
200Capital flow collection schema:CapitalFlowCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Get company profile
Operation ID: getCompanyProfile
Auth: API Key
Parameters
instrument_id[path] required schema: string
Responses
200Company profile resource schema:CompanyProfileResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List dividends
Operation ID: listDividends
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
Responses
200Dividend collection schema:DividendCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List earnings forecasts
Operation ID: listEarningsForecasts
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
Responses
200Earnings forecast collection schema:EarningsForecastCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List financial indicators
Operation ID: listFinancialIndicators
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
Responses
200Financial indicator collection schema:FinancialIndicatorCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List balance sheets
Operation ID: listBalanceSheets
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date)to[query] schema: string (date)page[size][query] schema: integer
Responses
200Balance sheet collection schema:BalanceSheetCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List cash flow statements
Operation ID: listCashFlowStatements
Auth: API Key
Parameters
instrument_id[path] required schema: stringpage[size][query] schema: integer
Responses
200Cash flow statement collection schema:CashFlowStatementCollectionResponse401Unauthorized schema:ErrorResponse
List income statements
Operation ID: listIncomeStatements
Auth: API Key
Parameters
instrument_id[path] required schema: stringpage[size][query] schema: integer
Responses
200Income statement collection schema:IncomeStatementCollectionResponse401Unauthorized schema:ErrorResponse
List institutional holdings
Operation ID: listInstitutionalHoldings
Auth: API Key
Parameters
instrument_id[path] required schema: stringpage[size][query] schema: integer
Responses
200Institutional holding collection schema:InstitutionalHoldingCollectionResponse401Unauthorized schema:ErrorResponse
List management history
Operation ID: listManagementHistory
Auth: API Key
Parameters
instrument_id[path] required schema: stringpage[size][query] schema: integer
Responses
200Management history collection schema:ManagementHistoryCollectionResponse401Unauthorized schema:ErrorResponse
List price limits
Operation ID: listPriceLimits
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date)to[query] schema: string (date)date[query] schema: string (date)page[size][query] schema: integer
Responses
200Price limit collection schema:PriceLimitCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List equity quotes
Operation ID: listEquityQuotes
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
Responses
200Quote collection schema:QuoteCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List sector memberships
Operation ID: listSectorMemberships
Auth: API Key
Parameters
instrument_id[path] required schema: stringpage[size][query] schema: integer
Responses
200Sector membership collection schema:TextEntryCollectionResponse401Unauthorized schema:ErrorResponse
List equity technical indicators
Operation ID: listEquityTechnicalIndicators
Auth: API Key
Parameters
instrument_id[path] required schema: stringindicator[path] required schema: IndicatorIdinterval[query] required 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
Responses
200Technical indicator collection schema:TechnicalIndicatorCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List equity trades
Operation ID: listEquityTrades
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
Responses
200Trade collection schema:TradeCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List supported pool types
Operation ID: listPoolTypes
Auth: API Key
Parameters
No parameters.
Responses
200Pool type collection schema:PoolTypeCollectionResponse401Unauthorized schema:ErrorResponse
List pool constituents
Operation ID: listPoolConstituents
Auth: API Key
Parameters
pool_type[path] required schema: PoolTypeIddate[query] schema: string (date)page[size][query] schema: integer
Responses
200Pool constituent collection schema:PoolConstituentCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
Indices
5 operations
List indices
Operation ID: listIndices
Auth: API Key
Parameters
market[query] schema: MarketIdcode[query] schema: stringname[query] schema: stringpage[size][query] schema: integer
Responses
200Index collection schema:InstrumentCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Get one index
Operation ID: getIndex
Auth: API Key
Parameters
instrument_id[path] required schema: string
Responses
200Index resource schema:InstrumentResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List index bars
Operation ID: listIndexBars
Auth: API Key
Parameters
instrument_id[path] required schema: stringinterval[query] required 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
Responses
200Bar collection schema:BarCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List index quotes
Operation ID: listIndexQuotes
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
Responses
200Quote collection schema:QuoteCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
List index technical indicators
Operation ID: listIndexTechnicalIndicators
Auth: API Key
Parameters
instrument_id[path] required schema: stringindicator[path] required schema: IndicatorIdinterval[query] required 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
Responses
200Technical indicator collection schema:TechnicalIndicatorCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Funds
3 operations
List funds
Operation ID: listFunds
Auth: API Key
Parameters
market[query] schema: MarketIdcode[query] schema: stringname[query] schema: stringpage[size][query] schema: integer
Responses
200Fund collection schema:InstrumentCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse
Get one fund
Operation ID: getFund
Auth: API Key
Parameters
instrument_id[path] required schema: string
Responses
200Fund resource schema:InstrumentResponse401Unauthorized schema:ErrorResponse404Resource not found schema:ErrorResponse
List fund quotes
Operation ID: listFundQuotes
Auth: API Key
Parameters
instrument_id[path] required schema: stringfrom[query] schema: string (date-time)to[query] schema: string (date-time)date[query] schema: string (date)page[size][query] schema: integer
Responses
200Quote collection schema:QuoteCollectionResponse400Invalid request parameters schema:ErrorResponse401Unauthorized schema:ErrorResponse