The API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. This is 1 of the most comprehensive financial API available on the market.
All GET request require a token parameter token=apiKey
in the URL or a header X-VestrData-Token : apiKey
. You can find your API Key under Dashboard. If you are logged in, your API key will be automatically used in the examples so you can copy and paste them as is.
If your limit is exceeded, you will receive a response with status code 429
.On top of all plan's limit, there is a 30 API calls/ second limit.
Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.
Response attributes:
- Count (number of results)
- Result (array of search results)
- Description (symbol description)
- DisplaySymbol (display symbol/ticker name)
- Symbol (Unique symbol used to identify this symbol used in /stock/candle
endpoint.)
- Type (security type)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.symbol_lookup('apple'))
Sample response
{
"count": 4,
"result": [
{
"description": "APPLE INC",
"displaySymbol": "AAPL",
"symbol": "AAPL",
"type": "Common Stock"
},
{
"description": "APPLE INC",
"displaySymbol": "AAPL.SW",
"symbol": "AAPL.SW",
"type": "Common Stock"
},
{
"description": "APPLE INC",
"displaySymbol": "APC.BE",
"symbol": "APC.BE",
"type": "Common Stock"
},
{
"description": "APPLE INC",
"displaySymbol": "APC.DE",
"symbol": "APC.DE",
"type": "Common Stock"
}
]
}
List supported stocks. We use the following symbology to identify stocks on VestrData Exchange_Ticker.Exchange_Code
.
Response attributes:
- Currency (Price's currency. This might be different from the reporting currency of fundamental data)
- Description (symbol description)
- DisplaySymbol (display symbol/ticker name)
- Figi (figi identifier)
- Symbol (Unique symbol used to identify this symbol used in /stock/candle
endpoint)
- Type (security type)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.stock_symbols('US'))
Sample response
"currency": "USD",
"description": "UAN POWER CORP",
"displaySymbol": "UPOW",
"figi": "BBG000BGHYF2",
"mic": "OTCM",
"symbol": "UPOW",
"type": "Common Stock"
},
{
"currency": "USD",
"description": "APPLE INC",
"displaySymbol": "AAPL",
"figi": "BBG000B9Y5X2",
"mic": "XNGS",
"symbol": "AAPL",
"type": "Common Stock"
},
{
"currency": "USD",
"description": "EXCO TECHNOLOGIES LTD",
"displaySymbol": "EXCOF",
"figi": "BBG000JHDDS8",
"mic": "OOTC",
"symbol": "EXCOF",
"type": "Common Stock"
Get real-time quote data for US stocks. Real-time stock prices for international markets are supported for Enterprise clients via our partner's feed.
Response attributes:
- C (current price)
- D (change)
- Dp (percent change)
- H (high price of the day)
- L (low price of the day)
- Pc (previous close price)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.quote('AAPL'))
Sample response
{
"c": 261.74,
"h": 263.31,
"l": 260.68,
"o": 261.07,
"pc": 259.45,
"t": 1582641000
}
Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years. Data is sourced from original filings most of which made available though SEC Filings and International Filings endpoints.
Response attributes:
- Financials (An array of map of key, value pairs containing the data for each period)
- Symbol (symbol of the company)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.financials('AAPL', 'bs', 'annual'))
Sample response
{
"financials": [
{
"costOfGoodsSold": 161782,
"ebit": 63930,
"grossIncome": 98392,
"interestExpense": 3576,
"netIncome": 55256,
"netIncomeAfterTaxes": 55256,
"period": "2019-09-28",
"pretaxIncome": 65737,
"provisionforIncomeTaxes": 10481,
"researchDevelopment": 16217,
"revenue": 260174,
"sgaExpense": 18245,
"totalOperatingExpense": 34462,
"year": 2019
}
],
"symbol": "AAPL"
}
Get company price performance statistics such as 52-week high/low, YTD return and much more.
Response attributes:
- atDate (Data date)
- Data (Map key-value pair of key ratios and metrics)
- Symbol (Symbol of the company)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.price_metrics('AAPL'))
Sample response
{
"data": {
"100DayEMA": 295.7694,
"100DaySMA": 319.2297,
"10DayAverageTradingVolume": 53717320,
"10DayEMA": 247.4641,
"10DaySMA": 247.372,
"14DayRSI": 34.0517,
"1MonthHigh": 314.67,
"1MonthHighDate": "2022-08-16",
"50DayEMA": 277.482,
"50DaySMA": 288.313,
"52WeekHigh": 414.5,
"52WeekHighDate": "2021-11-04",
"52WeekLow": 206.86,
"52WeekLowDate": "2022-05-24",
"5DayEMA": 245.8814,
"ytdPriceReturn": 10.1819
},
"symbol": "TSLA"
}
Get general information of a company. You can query by symbol, ISIN or CUSIP.
Response attributes:
- Address (Address of the company's headquarters)
- Alias (Company name alias)
- City (City of company's headquarter)
- Country
- Currency
- CUSIP
- Description
- Employee total
- Estimate Currency
- Exchange
- Ggroup
- Gind
- Gsector
- Gsubind
- IPO
- irUrl
- ISIN
- LEI
- Logo
- Market Cap Currency
- Market Cap
- NAICS
- NAICS National Industry
- NAICS Sector
- NAICS subsector
- Name
- Phone
- Sedol
- Share Outstanding
- State
- Ticker
- WebURL
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.company_profile(symbol='AAPL'))
Sample response
{
"address": "1 Apple Park Way",
"city": "CUPERTINO",
"country": "US",
"currency": "USD",
"cusip": "",
"sedol":"2046251",
"description": "Apple Inc. is an American multinational technology company headquartered in Cupertino, California, that designs, develops, and sells consumer electronics, computer software, and online services. It is considered one of the Big Four technology companies, alongside Amazon, Google, and Microsoft.",
"employeeTotal": "137000",
"exchange": "NASDAQ/NMS (GLOBAL MARKET)",
"ggroup": "Technology Hardware & Equipment",
"gind": "Technology Hardware, Storage & Peripherals",
"gsector": "Information Technology",
"gsubind": "Technology Hardware, Storage & Peripherals",
"ipo": "1980-12-12",
"isin": "",
"marketCapitalization": 1415993,
"naics": "Communications Equipment Manufacturing",
"naicsNationalIndustry": "Radio and Television Broadcasting and Wireless Communications Equipment Manufacturing",
"naicsSector": "Manufacturing",
"naicsSubsector": "Computer and Electronic Product Manufacturing",
"name": "Apple Inc",
"phone": "14089961010",
"shareOutstanding": 4375.47998046875,
"state": "CALIFORNIA",
"ticker": "AAPL",
"weburl": "https://www.apple.com/",
"logo": "https://static.vestrdata.com/logo/87cb30d8-80df-11ea-8951-00000000092a.png",
"vestrdataIndustry":"Technology"
}
List latest company news by symbol. This endpoint is only available for North American companies.
Response attributes:
- Category (News category)
- Date + time (Published time in UNIX timestamp)
- Headline (News headline)
- ID (News ID. This value can be used for minId
params to get the latest news only)
- Image (Thumbnail image URL)
- Related (Related stocks and companies mentioned in the article)
- Source (News source)
- Summary (News summary)
- URL (URL of the original article)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.company_news('AAPL', _from="2020-06-01", to="2020-06-10"))
Sample response
{
"category": "company news",
"datetime": 1569550360,
"headline": "More sops needed to boost electronic manufacturing: Top govt official More sops needed to boost electronic manufacturing: Top govt official. More sops needed to boost electronic manufacturing: Top govt official More sops needed to boost electronic manufacturing: Top govt official",
"id": 25286,
"image": "https://img.etimg.com/thumb/msid-71321314,width-1070,height-580,imgsize-481831,overlay-economictimes/photo.jpg",
"related": "AAPL",
"source": "The Economic Times India",
"summary": "NEW DELHI | CHENNAI: India may have to offer electronic manufacturers additional sops such as cheap credit and incentives for export along with infrastructure support in order to boost production and help the sector compete with China, Vietnam and Thailand, according to a top government official.",
"url": "https://economictimes.indiatimes.com/industry/cons-products/electronics/more-sops-needed-to-boost-electronic-manufacturing-top-govt-official/articleshow/71321308.cms"
},
{
"category": "company news",
"datetime": 1569528720,
"headline": "How to disable comments on your YouTube videos in 2 different ways",
"id": 25287,
"image": "https://amp.businessinsider.com/images/5d8d16182e22af6ab66c09e9-1536-768.jpg",
"related": "AAPL",
"source": "Business Insider",
"summary": "You can disable comments on your own YouTube video if you don't want people to comment on it. It's easy to disable comments on YouTube by adjusting the settings for one of your videos in the beta or classic version of YouTube Studio. Visit Business Insider's homepage for more stories . The comments section has a somewhat complicated reputation for creators, especially for those making videos on YouTube . While it can be useful to get the unfiltered opinions of your YouTube viewers and possibly forge a closer connection with them, it can also open you up to quite a bit of negativity.",
"url": "https://www.businessinsider.com/how-to-disable-comments-on-youtube"
}
Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire.
Response attributes:
- Major Development (News category)
- Date + time (Published time in YYYY-MM-DD HH:MM:SS
format.)
- Descirption (Development description.)
- Headline (Development headline)
- Symbol (Company symbol)
- URL
- Symbol (Company symbol)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.press_releases('AAPL'))
Sample response
{
"majorDevelopment": [
{
"symbol": "AAPL",
"datetime": "2020-08-04 17:06:32",
"headline": "27-inch iMac Gets a Major Update",
"description": "CUPERTINO, Calif.--(BUSINESS WIRE)-- Apple today announced a major update to its 27-inch iMac®. By far the most powerful and capable iMac ever, it features faster Intel processors up to 10 cores, double the memory capacity, next-generation AMD graphics, superfast SSDs across the line with four times the storage capacity, a new nano-texture glass option for an even more stunning Retina® 5K display, a 1080p FaceTime® HD camera, higher fidelity speakers, and studio-quality mics. For the consumer using their iMac all day, every day, to the aspiring creative looking for inspiration, to the serious pro pushing the limits of their creativity, the new 27-inch iMac delivers the ultimate desktop experience that is now better in every way."
},
{
"symbol": "AAPL",
"datetime": "2020-03-28 09:41:23",
"headline": "Apple Central World Opens Friday in Thailand",
"description": "BANGKOK--(BUSINESS WIRE)-- Apple® today previewed Apple Central World, its second and largest retail location in Thailand. Nestled in the heart of Ratchaprasong, Bangkok’s iconic intersection, the store provides a completely new and accessible destination within the lively city. Apple Central World’s distinctive architecture is brought to life with the first-ever all-glass design, housed under a cantilevered Tree Canopy roof. Once inside, customers can travel between two levels via a spiral staircase that wraps around a timber core, or riding a unique cylindrical elevator clad in mirror-polished stainless steel. Guests can enter from the ground or upper level, which provides a direct connection to the Skytrain and the city’s largest shopping center. The outdoor plaza offers a place for the community to gather, with benches and large Terminalia trees surrounding the space."
}
],
"symbol": "AAPL"
}
Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.
Response attributes:
- Count (number of results)
- Result (array of search results)
- Description (symbol description)
- DisplaySymbol (display symbol/ticker name)
- Symbol (Unique symbol used to identify this symbol used in /stock/candle
endpoint.)
- Type (security type)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.symbol_lookup('BTC'))
Sample response
{
"count": 4,
"result": [
{
"description": "Bitcoin",
"displaySymbol": "BTC",
"symbol": "BTC",
"type": "Crypto"
},
{
"description": "Bitcoin Cash",
"displaySymbol": "BTC.C",
"symbol": "BTC.C",
"type": "Crypto"
},
{
"description": "Wrapped Bitcoin",
"displaySymbol": "WBTC",
"symbol": "WBTC",
"type": "Crypto"
},
{
"description": "TBTC",
"displaySymbol": "TBTC",
"symbol": "TBTC",
"type": "Crypto"
}
]
}
List supported crypto symbols by exchange.
Response attributes:
- Circulating supply (circulating supply)
- Description (Description)
- Launch date (launch date)
- Logo (logo image)
- Long name (long name)
- Market cap (market capitalization)
- Max supply (max supply)
- Name (name)
- Proof type (proof type)
- Total supply (total supply)
- Website (project's website)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.crypto_profile('BTC'))
Sample response
{
"name": "Bitcoin",
"longName": "Bitcoin (BTC)",
"description": "Bitcoin is a form of digital currency that aims to eliminate the need for central authorities such as banks or governments. Instead, Bitcoin uses blockchain technology to support peer-to-peer transactions between users on a decentralized network. Transactions are authenticated through Bitcoin’s proof-of-work
consensus mechanism, which rewards cryptocurrency miners for validating transactions.Launched in 2009 by a mysterious developer known as Satoshi Nakamoto, Bitcoin (BTC) was the first, and remains the most valuable, entrant in the emerging class of assets known as cryptocurrencies.
",
"marketCap": 1119891535870.4905,
"totalSupply": 18876550,
"maxSupply": 21000000,
"circulatingSupply": 18876550,
"logo": "",
"launchDate": "2009-01-03",
"website": "https://bitcoin.org/en/",
"proofType": "PoW"
}
List supported crypto exchanges
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.crypto_exchanges())
Sample response
[
"KRAKEN",
"HITBTC",
"COINBASE",
"GEMINI",
"POLONIEX",
"Binance",
"ZB",
"BITTREX",
"KUCOIN",
"OKEX",
"BITFINEX",
"HUOBI"
]
Retrieve aggregated bars for an option contract over a specified date range in custom time intervals. For instance, if you set the timespan to "minute" and the multiplier to "5," you'll receive 5-minute bars.
Response attributes:
- Symbol (number of results)
- Adjusted (whether or not this response was adjusted for splits)
- Query count (the number of aggregates (minutes or day) used to generate the response)
- Request ID (a request id assigned by the server)
- Results Count (the total number of results for this request)
- Status (the status of this requests response)
Results array:
- C (close price for lists array)
- H (the highest price for the symbol in the given perdiod)
- L (the lowest price for the symbol in the given time period)
- N (the number of transactions in the aggregate window)
- O (the open priec for the symbol in the given time period)
- T (the Unix Msec timestamp for the start of the aggregate window)
- V (the trading volume of the symbols in the given time period)
- VW (the volume weighted average price)
Sample Query
https://api.polygon.io/v2/aggs/ticker/O:TSLA230113C00015000/range/1/day/2023-01-01/2023-01-11?apiKey=hKHmCvjCJ3J9mJOJy2lKK_hEhpNGcq5X
Sample response
{
"ticker": "O:SPY251219C00650000",
"queryCount": 22,
"resultsCount": 22,
"adjusted": true,
"results": [
{
"v": 3,
"vw": 3.9,
"o": 3.9,
"c": 3.9,
"h": 3.9,
"l": 3.9,
"t": 1673326800000,
"n": 1
},
{
"v": 2,
"vw": 6.69,
"o": 6.38,
"c": 7,
"h": 7,
"l": 6.38,
"t": 1673413200000,
"n": 2
},
{
"v": 2,
"vw": 4.66,
"o": 4.95,
"c": 4.37,
"h": 4.95,
"l": 4.37,
"t": 1673499600000,
"n": 2
}
List supported crypto symbols by exchange.
Response attributes:
- Circulating supply (circulating supply)
- Description (Description)
- Launch date (launch date)
- Logo (logo image)
- Long name (long name)
- Market cap (market capitalization)
- Max supply (max supply)
- Name (name)
- Proof type (proof type)
- Total supply (total supply)
- Website (project's website)
Sample code
import VestrData
VestrData_client = VestrData.Client(api_key="")
print(VestrData_client.crypto_profile('BTC'))
Sample response
{
"name": "Bitcoin",
"longName": "Bitcoin (BTC)",
"description": "Bitcoin is a form of digital currency that aims to eliminate the need for central authorities such as banks or governments. Instead, Bitcoin uses blockchain technology to support peer-to-peer transactions between users on a decentralized network. Transactions are authenticated through Bitcoin’s proof-of-work
consensus mechanism, which rewards cryptocurrency miners for validating transactions.Launched in 2009 by a mysterious developer known as Satoshi Nakamoto, Bitcoin (BTC) was the first, and remains the most valuable, entrant in the emerging class of assets known as cryptocurrencies.
",
"marketCap": 1119891535870.4905,
"totalSupply": 18876550,
"maxSupply": 21000000,
"circulatingSupply": 18876550,
"logo": "",
"launchDate": "2009-01-03",
"website": "https://bitcoin.org/en/",
"proofType": "PoW"
}