Stock Data

GET
Stock Data

Crypto

GET
Crypto Quote

Usage Metrics

Service Information

Authenticating

Every API call to the endpoints below requires a valid API key to be provided. This API key verifies your permission to use the service. API keys are free! Get your own by registering for an account.

How to provide your key

Your key will look like this: 333acb16de254844ab64783232d2ba66

Include your API key as a header to your request with the label 'key'

Versioning

Some of the endpoints below will have multiple versions available for consumption. To specify which version you would like to consume, use the Accept-Version header. For example, specifying you want version 2:

Accept-Version: 2

Example in Postman:

Stock Data

Access data for any publicly traded security, including stock, bonds, options, and more.

Stock Data (v1) Deprecated, please use new version

Access summary or statistical data for stocks, bonds, options, crypto, and more.

A newer version of this endpoint is available, see Stock Data v2. If you still wish to use version 1 (for backwards compatability), please specify you would like version 1 via the Accept-Version header; for more information, please see the versioning instructions.

GET
https://api.aletheiaapi.com/StockData

Parameters

Required
symbol - the symbol of the security you are requesting data for.
Optional
summary - Specifies if you would like to have stock summary data returned in the payload. Either 'true' or 'false'.
Optional
statistics - Specifies if you would like to have stock statistical data returned in the payload. Either 'true' or 'false'.

Example Requests

https://api.aletheiaapi.com/StockData?symbol=msft&summary=true
https://api.aletheiaapi.com/StockData?symbol=msft&summary=true&statistics=true
https://api.aletheiaapi.com/StockData?symbol=aapl&summary=false&statistics=true
+ Example Response
{
"Symbol": "PG",
"Summary": {
"Name": "The Procter & Gamble Company",
"StockSymbol": "PG",
"Price": 123.53,
"DollarChange": -3.05,
"PercentChange": -0.0241,
"PreviousClose": 126.58,
"Open": 126.54,
"BidPrice": 123.36,
"BidQuantity": 900,
"AskPrice": 123.55,
"AskQuantity": 1200,
"DayRangeLow": 121.82,
"DayRangeHigh": 126.93,
"YearRangeLow": 94.34,
"YearRangeHigh": 146.92,
"Volume": 17718787,
"AverageVolume": 7562403,
"MarketCap": 304189997056.0,
"Beta": 0.41,
"PriceEarningsRatio": 23.34,
"EarningsPerShare": 5.29,
"EarningsDate": "2021-04-20T00:00:00",
"ForwardDividend": 3.16,
"ForwardDividendYield": 0.0256,
"ExDividendDate": "2021-01-21T00:00:00",
"YearTargetEstimate": 150.56,
"QueriedSymbol": "PG",
"DataCollectedOn": "2021-02-28T23:33:18.8109488+00:00"
},
"Statistics": {
"FiscalYearEnds": "2020-06-29T00:00:00",
"MostRecentQuarter": "2020-12-30T00:00:00",
"ProfitMargin": 0.1872,
"OperatingMargin": 0.24129999,
"ReturnOnAssets": 0.0962,
"ReturnOnEquity": 0.2951,
"Revenue": 73969999872,
"RevenuePerShare": 29.83,
"QuarterlyRevenueGrowth": 0.083000004,
"GrossProfit": 36309999616,
"EBITDA": 20800000000,
"NetIncomeAvailableToCommon": 13580000256,
"DilutedEps": 5.29,
"QuarterlyEarningsGrowth": 0.037,
"TotalCash": 11939999744,
"TotalCashPerShare": 4.85,
"TotalDebt": 31100000256,
"TotalDebtEquityRatio": 64.07,
"CurrentRatio": 0.78,
"BookValuePerShare": 19.21,
"OperatingCashFlow": 19030001664,
"LeveredFreeCashFlow": 13899999232,
"Beta": 0.41,
"YearChange": 0.0332,
"SP500YearChange": 0.2392,
"YearHigh": 146.92,
"YearLow": 94.34,
"MovingAverage50Day": 130.11,
"MovingAverage200Day": 136.83,
"AverageVolume3Month": 7560000,
"AverageVolume10Day": 9300000,
"SharesOutstanding": 2460000000,
"Float": 2460000000,
"PercentHeldByInsiders": 0.0011,
"PercentHeldByInstitutions": 0.66110003,
"SharesShort": 14840000,
"ShortRatio": 1.95,
"ShortPercentOfFloat": 0.0061000003,
"ShortPercentOfSharesOutstanding": 0.006,
"ForwardAnnualDividend": 3.16,
"ForwardAnnualDividendYield": 0.0256,
"TrailingAnnualDividend": 3.12,
"TrailingAnnualDividendYield": 0.024600001,
"FiveYearAverageDividendYield": 2.9,
"DividendPayoutRatio": 0.5894,
"DividendDate": "2021-02-15T00:00:00",
"ExDividendDate": "2021-01-20T00:00:00",
"LastSplitFactor": "2:1",
"LastSplitDate": "2004-06-20T00:00:00",
"QueriedSymbol": "PG",
"DataCollectedOn": "2021-02-28T23:33:19.287638+00:00"
}
}

Stock Data (v2)

Access summary or statistical data for stocks, bonds, options, crypto, and more. To specify you would like to consume version 2 of this endpoint, set the Accept-Version header to 2. See the versioning instructions for more information.

The advantage of using the v2 specification is drastically reduced response times for requests that would be requesting both summary data and statistical data (as seen in version 1).

GET
https://api.aletheiaapi.com/StockData

Parameters

Required
symbol - the symbol of the security you are requesting data for.
Optional
fields - If you would only like specific fields to be returned to you (i.e. to save bandwidth, set this to the field names separated by comma. If left blank, all available data fields will be returned by default. For a complete list of available data fields, please see the example response below.

Example Requests

https://api.aletheiaapi.com/StockData?symbol=msft
https://api.aletheiaapi.com/StockData?symbol=msft&fields=Price,MarketCap,DayHigh,DayLow
https://api.aletheiaapi.com/StockData?symbol=pg&fields=Price
+ Example Response
{
"Symbol": "PG",
"FullTimeEmployees": 101000,
"Sector": "Consumer Defensive",
"Industry": "Household & Personal Products",
"Open": 150.19,
"AverageVolume90Day": 6912683,
"Exchange": "NYQ",
"DayHigh": 152.385,
"ShortName": "Procter & Gamble Company (The)",
"LongName": "The Procter & Gamble Company",
"Change": 2.26999,
"PreviousClose": 149.88,
"Price": 152.15,
"Currency": "USD",
"Volume": 11935078,
"MarketCap": 368195400000.0,
"ChangePercent": 0.0151454,
"DayLow": 150.27,
"BidPrice": 152.2,
"BidQuantity": 900,
"AskPrice": 152.2,
"AskQuantity": 900.0,
"AverageVolume10Day": 8056980,
"YearLow": 121.54,
"YearHigh": 152.385,
"Beta": 0.422337,
"PriceEarningsRatio": 27.80519,
"EarningsPerShare": 5.472,
"EarningsDate": "2022-01-18T00:00:00",
"ForwardDividend": 3.48,
"ForwardDividendYield": 0.0232,
"ExDividendDate": "2021-10-21T00:00:00",
"YearTargetEstimate": 152.93,
"LastFiscalYearEnd": "2021-06-30T00:00:00",
"LastFiscalQuarterEnd": "2021-09-30T00:00:00",
"ProfitMargin": 0.18332,
"OperatingMargin": 0.23948,
"ReturnOnAssets": 0.09639,
"ReturnOnEquity": 0.29837,
"Revenue": 77138000000.0,
"RevenuePerShare": 31.468,
"QuarterlyRevenueGrowth": 0.053,
"GrossProfit": 39144000000.0,
"EDBITDA": 21248000000.0,
"NetIncomeAvailableToCommon": 13866000000.0,
"QuarterlyEarningsGrowth": -0.039,
"Cash": 10370000000.0,
"CashPerShare": 4.285,
"Debt": 32547000000.0,
"DebtToEquityRatio": 70.132,
"CurrentRatio": 0.665,
"BookValuePerShare": 18.7,
"OperatingCashFlow": 18275000000.0,
"LeveredFreeCashFlow": 12529750000.0,
"YearChangePercent": 0.0856936,
"SP500YearChangePercent": 0.22585726,
"MovingAverage50Day": 144.0168,
"MovingAverage200Day": 138.4587,
"SharesOutstanding": 2419950000.0,
"Float": 2417237500.0,
"PercentHeldByInsiders": 0.0010800001,
"PercentHeldByInstitutions": 0.65568,
"SharesShort": 15019257.0,
"ShortRatio": 2.28,
"ShortPercentOfFloat": 0.0062,
"ShortPercentOfSharesOutstanding": 0.0062,
"ForwardAnnualDividend": 3.48,
"ForwardAnnualDividendYield": 0.0232,
"TrailingAnnualDividend": 3.321,
"TrailingAnnualDividendYield": 0.022157727,
"FiveYearAverageDividendYield": 2.78,
"DividendPayoutRatio": 0.606,
"DividendDate": "2021-11-15T00:00:00",
"LastSplitFactor": "2:1",
"LastSplitDate": "2004-06-21T00:00:00"
}

Crypto

Use these endpoints to access real-time data about cryptocurrencies.

Crypto Quote

Access pricing and trading activity data for virtually any cryptocurrency. All quotes are in U.S. Dollars.

GET
https://api.aletheiaapi.com/Crypto

Parameters

Required
symbol - the trading symbol of the cryptocurrency. For example, "BTC" for Bitcoin.

Example Requests

https://api.aletheiaapi.com/Crypto?symbol=BTC
https://api.aletheiaapi.com/Crypto?symbol=DOGE
https://api.aletheiaapi.com/Crypto?symbol=XRP
+ Example Response
{
"Symbol": "BTC",
"Name": "Bitcoin",
"Price": 39799.31,
"DollarChange": 1357.82,
"PercentChange": 0.0353,
"DayLow": 39350.46,
"DayHigh": 39831.87,
"YearLow": 9916.49,
"YearHigh": 64863.1,
"MarketCap": 747286036480.0,
"Volume": 25329145856,
"DataCollected": "2021-08-05T01:20:47.2696749+00:00"
}

Usage Metrics

You can use these endpoints to monitor your consumtion of the Aletheia API service.

Consumption

Count the number of API calls you have made or have been made to you (via webhook) in the current month, broken out by service. See the example below. The id property defines the ID number of the service used, the name property is the name of the service (endpoint), and the calls is the number of calls that have been made to (or from) that service in the current month. Finally, the total number of calls consumed during this month across all services is summed at the root level as property calls.

GET
https://api.aletheiaapi.com/v2/consumption
Example Response
+ Example Response
{
"calls": 537265,
"endpoints": [
{
"id": 11,
"name": "StockData",
"calls": 522748
},
{
"id": 23,
"name": "Crypto",
"calls": 10934
},
{
"id": 4,
"name": "Financials",
"calls": 3583
}
]
}

Service Information

These endpoints provide contextual information about the Aletheia service.

API Version

Get the actively deployed version of the Aletheia API service

GET
https://api.aletheiaapi.com/version