United States Board of Federal Reserve (US FED)
As the name suggests, the endpoints in this section pertain to data from the United States Board of Federal Reserve (US FED). Parsed data is available for the most popular and significant form types in the US FED.
Introduction
The APIs in this section provide historical data access through queries and real-time data streaming through subscription connections. For details about the request and response structures, reference the respective GraphQL documentation for that form type in the GraphQL Documentation section.
GraphQL queries require the API key to be set in the headers of each request and subscriptions require them to be set with an initial payload in the connection_init websocket message. For examples of queries and subscriptions, checkout the Quickstart section.
Additionally, user's can learn the various endpoints and test the APIs in the GraphQL playground. To get to the playground pertaining to the data you want, please reference the Playground section.
Pagination
All query endpoints have a total.value
attribute which can be used to obtain the number of available records for a specific query. This value can then be used as a reference to increment your offset until all possible values have been received, determined with the final response not containing any records.
Query results are limited to 10 records per page and subscription results are broadcast to clients as they become available and so pagination does not apply to subscription endpoints.
Filtering
Our API uses Apache Lucene syntax to filter for documents against an ElasticSearch backend.
All attributes within the data
attribute of an endpoint supports the full scope of the query engine and can be filtered on.
The data
attribute represents the root of the document. For example, filtering for a filing with a specific accession number in the series_data
endpoint can be done
with the query:
# Write your query or mutation here
query {
observation {
took,
total {
value
},
data {
value,
status,
time_period,
series_name
}
}
}
Query endpoints also offer an aggregation (aggs
) attribute to create
aggregations that can be used to answer questions such as "What was the percentage change of inflation in the lat year?"
To learn more about how to use aggregations see ElasticSearch Aggregations
We offer the full-flexibility of our system to clients. This means that it is possible for users to create complex queries with long execution times. Aggregations can cause this. In order to protect our systems from abuse, all queries will timeout after 5 seconds of execution.
Important Considerations
All subscriptions must send a keep-alive message to our servers or the connection is at risk of being closed if it is idle for more than an hour. We recommend an interval of once every minute (60s).
For a full list of possible errors that can be returned and what they mean, check out the Errors section.
In order to find the series names of interest, please reference the <DATASET ACRONYM>_series
endpoint. Iterating through this endpoint or filtering on the long_description
attribute can help you find the series_name
of interest. This series_name
can then be used in the observation
endpoint to get the relevant data.
The dataset acronym represents the name of the dataset on the official US Federal Reserve site.
Target interest rate announcements can be streamed in real-time by subscribing to the fomc_release
endpoint. Historical interest rates can be accessed by querying the observation
endpoint using the series_name
attribute of interest in the h15_series
endpoint.
Press releases by the Federal Reserve can be monitored through the press_release
endpoint.
GraphQL Playground
This section contains the links to GraphQL playgrounds that can be used for testing, understanding the documentation, and structuring queries and subscriptions for your services. To authenticate your requests, please insert {"api-key": "<YOUR API KEY>"}
in the HTTP Headers section on the bottom.
US FED API
This API contains all information regarding data from the US FED.
GraphQL Documentation
Errors
Whenever a request is unsuccessful, FactIQ will return an error response with an error code and message. You can use this information to understand better what has gone wrong and how to fix it. Most of the error messages are pretty helpful and actionable.
GraphQL Query Error Codes
Here is a list of possible errors when sending requests to GraphQL Query endpoints.
- Name
api/database-error
- Type
- Description
This means that an error occurred when querying our databases. Depending on the error, this could be either client's fault or our fault (in rare cases). This can happen if regex patterns are mal-formed and invalid in the PostgreSQL engine or related to other filtering options you have used. Please contact support at [email protected] when this happens.
- Name
api/timeout-error
- Type
- Description
This means that the query timed out because it exceeded the timeout threshold of 5 seconds. This can happen due to deeply nested aggregations. Please simplify your query to overcome this issue.
- Name
api/invalid-credentials-error
- Type
- Description
This means that the key used for your request is not a valid API key. Please make sure you have entered the key correctly.
- Name
api/internal-server-error
- Type
- Description
This means that an error occurred that is our fault and not the client's fault. Please contact support at [email protected] when this happens.
- Name
api/resource-not-accessible-by-plan-error
- Type
- Description
This means that the key's associated plan does not have access to this resource. Please upgrade your plan at https://factiq.io/pricing to a plan with access to this resource.
- Name
api/total-limits-reached-error
- Type
- Description
This means that the key has reached it's total allowed request limits. This happens to keys total lifetime limits like those given on sign-up. Please upgrade your plan at https://factiq.io/pricing to continue accessing resources.
- Name
api/rate-limits-reached-for-plan-error
- Type
- Description
This means that the total rate limit associated with the key's plan has been reached. This is only applicable for plans with a general rate limit and are not rate limited by resource. Please wait for the required amount of time for the limits to reset or upgrade your plan at https://factiq.io/pricing if you have increased needs.
Error response
{
"data": null,
"extensions": {
"request-id": "e5a32713-5022-4aec-9312-9a70b7099d42"
},
"errors": [
{
"message": "Invalid credentials. Make sure you are using a valid api key.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"filing"
],
"extensions": {
"code": "api/invalid-credentials-error"
}
}
]
}
GraphQL Subscription Error Codes
Here is a list of possible errors when sending requests to GraphQL Subscription endpoints.
- Name
api/resource-not-accessible-by-plan-error
- Type
- Description
This means that the key's associated plan does not have access to this resource. Please upgrade your plan at https://factiq.io/pricing to a plan with access to this resource.
- Name
api/exhausted-subscriptions-for-plan-error
- Type
- Description
This means that the key's rate limits for the number of allowed subscriptions to be active simultaneously across all resources have been exhausted. This is only applicable for plans with general rate limits. If you are certain your limits have not been exhausted, it is possible that the connections were dropped when our servers restarted and the connection limits have not been synced yet with our backend. In this case, limits for all subscription plans will be reset in 2 minutes. If you are trying to exceed your plan's limits, please upgrade your plan at https://factiq.io/pricing or purchase extra keys to increase your subscription limits.
- Name
api/subscriptions-not-active-for-plan-error
- Type
- Description
This means that the key's active plan does not allow for any client subscriptions to be opened for any resource. Please upgrade your plan at https://factiq.io/pricing to gain subscription access to this resource.
- Name
api/total-connection-time-exceeded-error
- Type
- Description
This means that the connection's total time has exceeded a pre-determined amount of time (24 hours) as specified in the error's details. Connections are routinely disconnected after this time to prevent excess resource usage if connections have been forgotten to be closed by clients.
- Name
api/invalid-credentials-error
- Type
- Description
This means that the key used for your request is not a valid API key. Please make sure you have entered the key correctly.
- Name
api/internal-server-error
- Type
- Description
This means that an error occurred that is our fault and not the client's fault. Please contact support at [email protected] when this happens.
Error response
{
"data": null,
"errors": [
{
"message": "Invalid credentials. Make sure you are using a valid api key.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"filing"
],
"extensions": {
"code": "api/invalid-credentials-error"
}
}
]
}