Market Data
The WealthTech API offers access to Market Data providers through the BridgeFT Market Place. You can use your existing WealthTech API integration and credentials to access market data through our platform.
Accessing Market Data via the WealthTech API
The WealthTech API allows access to market data providers based on a "bring your own license" model. Simply put, you sign up directly with any market data provider in BridgeFT Market Place and bring your own license key to access your market data through the WealthTech API platform. With your WealthTech API's credentials and a license key, market data can be seamlessly requested through the WealthTech API.
For complete documentation and available market data APIs, please see each respective market data providers website.
Supported Market Data Providers
We will continue to work directly with the leading market data providers to expand our offering. Below is the currently supported list of providers:
How Does It Work?
The WealthTech API brokers requests to market data providers on your behalf. The requests and responses follow each respective market data providers documentation. The WealthTech API does not alter the request and responses in any way.
A typical request to the market data endpoint has the following structure:
https://api.bridgeft.com/v2/market-data/{PROVIDER}/{PROVIDER_ENDPOINT}
Where:
- PROVIDER - the name of the market data provider, for example:
intrinio
- PROVIDER_ENDPOINT - the relative market data URL, along with any query params, as documented in the provider documentation.
Using Your Market Data Provider License Key
Making API calls for market data is the same as making any other WealthTech API call with one slight addition. You must provide your market data license key in the request header. For example, using your Intrinio license key, you would add the following request header:
--header 'x-Intrinio-Api-Key: OmY0ZTI4MzU0MmRiMTU0NGQ0MjQyYmI2OGRhNTA5NmU1' \
Examples of Intrinio's Securities and Prices APIs Use
Important Notes Before Starting Development!
- Please check out Intrinio API Documentation to get familiar with the full list of endpoints, specs and data they provide: https://docs.intrinio.com/documentation/api_v2/getting_started
- WealthTech API platform allows to access and use all Intrinio endpoints. Simply follow the URL path convention which is described above to access any endpoint available for your own license agreement.
- Below are couple of examples how to query Intrinio's Securities and Prices data via WealthTech API platform. But you are absolutely not limited to use another endpoint to fulfill your needs!
Getting Securities
Now let's try out Intrinio's All Securities API. This endpoint returns a list of all securities available, with delisted securities included.
The documented Intrinio's endpoint is https://api-v2.intrinio.com/securities
as seen in the All Securities API Documentation.
Instead of making the request to Intrinio's root URL: https://api-v2.intrinio.com
, the request can be easily made via WealthTech API using the following root URL: https://api.bridgeft.com/v2/market-data/intrinio
.
Following our path pattern: https://api.bridgeft.com/v2/market-data/{PROVIDER}/{PROVIDER_ENDPOINT}
we end up with the final URL to be used:
https://api.bridgeft.com/v2/market-data/intrinio/securities
Request
curl --location --request GET 'https://api.bridgeft.com/v2/market-data/intrinio/securities' \
--header 'Accept: application/json' \
--header 'x-Intrinio-Api-Key: {YOUR_INTRINIO_KEY}' \
--header 'Authorization: Bearer {YOUR_WEALTHTECH_API_KEY}'
Response
{
"securities": [
{
"code": "EQS",
"company_id": "com_NXnP4y",
"composite_figi": "BBG000C2V3D6",
"composite_ticker": "A:US",
"currency": "USD",
"figi": "BBG000C2V541",
"id": "sec_NX6GzO",
"name": "Agilent Technologies Inc.",
"primary_listing": true,
"share_class_figi": "BBG001SCTQY4",
"stock_exchange_id": "sxg_ozMr9y",
"ticker": "A"
},
{
"code": "EQS",
"company_id": "com_jyRLMX",
"composite_figi": "BBG00B3T3HD3",
"composite_ticker": "AA:US",
"currency": "USD",
"figi": "BBG00B3T3HK5",
"id": "sec_2zvNzA",
"name": "Alcoa Corp",
"primary_listing": true,
"share_class_figi": "BBG00B3T3HF1",
"stock_exchange_id": "sxg_ozMr9y",
"ticker": "AA"
},
{
"code": "EQS",
"company_id": "com_Xnl4Ry",
"composite_figi": "BBG006T1NZ18",
"composite_ticker": "AAC:US",
"currency": "USD",
"figi": "BBG006T1NZ63",
"id": "sec_NgYGzd",
"name": "AAC Holdings Inc",
"primary_listing": true,
"share_class_figi": "BBG006T1NZ27",
"stock_exchange_id": "sxg_ozMr9y",
"ticker": "AAC"
},
...
]
}
Use of Pagination
Intrinio supports pagination and will automatically paginate large responses. To learn more about it please check out this Paging Documentation.
The use of pagination parameters will be shown in the response. To see a complete response in a single snippet you can use the query parameter page_size
.
Request
curl --location --request GET 'https://api.bridgeft.com/v2/market-data/intrinio/securities?page_size=1' \
--header 'Accept: application/json' \
--header 'x-Intrinio-Api-Key: {YOUR_INTRINIO_KEY}' \
--header 'Authorization: Bearer {YOUR_WEALTHTECH_API_KEY}'
Paginated Response
{
"next_page": "NQ==",
"securities": [
{
"code": "EQS",
"company_id": "com_NXnP4y",
"composite_figi": "BBG000C2V3D6",
"composite_ticker": "A:US",
"currency": "USD",
"figi": "BBG000C2V541",
"id": "sec_NX6GzO",
"name": "Agilent Technologies Inc.",
"primary_listing": true,
"share_class_figi": "BBG001SCTQY4",
"stock_exchange_id": "sxg_ozMr9y",
"ticker": "A"
}
]
}
This returned a single security and due to the page size being one, we can see the next_page
pointer which can be used to advance to the next page as a query parameter.
Getting Security Prices
The Intrinio's pricing data is also available via WealthTech API.
Original Intrinio API is described in Stock Prices by Security API Documentation.
In order to get the price for a particular security via WealthTech API simply make the following request indicating security ticker:
Request
curl --location --request GET 'https://api.bridgeft.com/v2/market-data/intrinio/securities/AAPL/prices?page_size=1' \
--header 'Accept: application/json' \
--header 'x-Intrinio-Api-Key: {YOUR_INTRINIO_KEY}' \
--header 'Authorization: Bearer {YOUR_WEALTHTECH_API_KEY}'
Response
{
"next_page": "MjAyMy0wNy0yNHw0NDc2MzY0ODQ4NQ==",
"security": {
"code": "EQS",
"company_id": "com_NX6GzO",
"composite_figi": "BBG000B9XRY4",
"composite_ticker": "AAPL:US",
"currency": "USD",
"figi": "BBG000B9Y5X2",
"id": "sec_agjrgj",
"name": "Apple Inc",
"primary_listing": true,
"share_class_figi": "BBG001S5N8V8",
"stock_exchange_id": "sxg_ozMr9y",
"ticker": "AAPL"
},
"stock_prices": [
{
"adj_close": 192.75,
"adj_high": 194.91,
"adj_low": 192.25,
"adj_open": 193.41,
"adj_volume": 44861236,
"change": 0.81,
"close": 192.75,
"date": "2023-07-24",
"dividend": 0,
"factor": 1,
"fifty_two_week_high": 198.23,
"fifty_two_week_low": 123.81,
"frequency": "daily",
"high": 194.91,
"intraperiod": false,
"low": 192.25,
"open": 193.41,
"percent_change": 0.0042,
"split_ratio": 1,
"volume": 45505097
}
]
}
This returned one price record for the one day "date": "2023-07-24"
due to the page size being one, and the next_page
pointer is provided as well.
Errors Handling
WealthTech API is sending the same Intrinio's error codes without any alteration. All codes and their descriptions can be found in Response Codes Documentation. Let's see how some of the most common errors are returning.
1. Invalid Input
If an error occurs on Intrinio's side, the error code and body of that response are passed back to the WealthTech API response. One example of an error is a simple user error, in this case, the company is misspelled:
https://api.bridgeft.com/v2/market-data/intrinio/filings?company=CAdPE&page_size=1
Response
{
"message": "intrinio API threw an error: 404 Not Found, for request https://api-v2.intrinio.com/filings?api_key=OmY0ZTI4MzU0MmRiMTU0NGQ0MjQyYmI2OGRhNTA5NmU1&company=CAdPE&page_size=1",
"context": {
"error": "Company not found",
"message": "An error occurred. Please contact [email protected] with the details."
}
}
2. Wrong Pagination Parameter
In some cases of a user error, an error is not thrown and little context is provided, such as with an improper page pointer:
https://api.bridgeft.com/v2/market-data/intrinio/filings?company=CAPE&page\_size=1&next\_page=My0wNy0xNHw3OTIzNjIy
Response
{
"filings": [],
"next_page": null
}
3. Intrinio Access Denied
An example of a non-user error occurs when trying to access an endpoint not allowed by your API key permissions:
https://api.bridgeft.com/v2/market-data/intrinio/options/prices/realtime/batch
Response
{
"message": "intrinio API threw an error: 403 Forbidden, for request https://api-v2.intrinio.com/options/prices/realtime/batch?api_key=OmY0ZTI4MzU0MmRiMTU0NGQ0MjQyYmI2OGRhNTA5NmU1",
"context": {
"access_codes": [
"opra_options"
],
"error": "API Access Denied",
"message": "You do not have sufficient access to view this data"
}
}
4. No Access to WealthTech API platform
Errors that are thrown by WealthTech API should be contained into two categories:
- authentication - your WealthTech API Token is missing, out of date, or incorrect.
Response
{
"message": "Unauthorized"
}
- invalid URL - the URL before path parameters to the Intrinio endpoint should be
https://api.bridgeft.com/v2/market-data/intrinio
. Otherwise the following error will be returned:
Response
{
"message": "Not Found"
}
Updated 11 months ago