Data Issues
List Data Issues
Request
Filters and range of the data issues to list. The /community/data-library/issues/list API accepts requests in the following format:
ListDataIssuesRequest Model - Request body to list data issues. The filters combine, and a security, market, or resolution value that isn't supported returns an error that lists the valid values. | |
|---|---|
| status | string Enum Status group of the issues to list. Open issues are In queue, In progress, Waiting Review, or Waiting for Data Vendor. Closed issues are Resolved, Closed, or Cannot Be Resolved. The default value is open. Options : ['open', 'closed'] |
| start | integer Index of the first issue to return. The default value is 0. |
| end | integer Index after the last issue to return. The default value is 20. |
| search | string Words to search for in the issue titles. The search doesn't find words shorter than 3 characters. To filter by ticker, use the ticker property. |
| ticker | string Ticker to filter the issues by. The ticker must match one of the issue's tickers exactly, but the match isn't case-sensitive. |
| security | string Asset class to filter the issues by, as its name or its short form, such as Future Option or futureoption. The match isn't case-sensitive. |
| market | string Market to filter the issues by, such as CME or Binance. The match isn't case-sensitive. |
| resolution | string Resolution to filter the issues by, such as Minute or Daily. The match isn't case-sensitive. |
| subscribed | boolean If true, list only the issues you're subscribed to. |
| Example |
{
"status": "open",
"start": 0,
"end": 20,
"search": "SPY",
"ticker": "NQ",
"security": "Future",
"market": "CME",
"resolution": "Minute",
"subscribed": true
}
|
Responses
The /community/data-library/issues/list API provides a response in the following format:
200 Success
DataIssueListResponse Model - Response from listing data issues. | |
|---|---|
| results | DataIssue Array Data issues in the requested range. |
| resultsFound | integer Number of issues that match the filters. |
| openIssuesCount | integer Number of open issues on the Data Issues page. |
| closedIssuesCount | integer Number of closed issues on the Data Issues page. |
| success | boolean Indicate if the API request was successful. |
| errors | string Array List of errors with the API call. |
| Example |
{
"results": [
{
"discussionId": 0,
"ticker": "string",
"security": "string",
"market": "string",
"resolution": "string",
"from": "2024-08-01 00:00:00",
"to": "2024-08-02 00:00:00",
"status": "In queue",
"corruptedFile": 0,
"missingPoints": 0,
"missingFile": 0,
"wrongValues": 0,
"listingError": 0,
"splitError": 0,
"dividendError": 0,
"mappingError": 0,
"reported": 0,
"comments": 0,
"updated": 0,
"subscribed": true,
"userName": "string",
"userPublicId": "string",
"userProfile": "string"
}
],
"resultsFound": 0,
"openIssuesCount": 0,
"closedIssuesCount": 0,
"success": true,
"errors": [
"string"
]
}
|
DataIssue Model - An issue reported on the Data Issues page. | |
|---|---|
| discussionId | integer Id of the data issue. The issue page is https://www.quantconnect.com/datasets/issue/{discussionId}. |
| ticker | string Ticker of the security with the issue. |
| security | string Asset class of the dataset. |
| market | string Market of the dataset. |
| resolution | string Resolution of the dataset. |
| from | string Start of the issue, in YYYY-MM-DD HH:MM:SS format. |
| to | string End of the issue, in YYYY-MM-DD HH:MM:SS format. |
| status | string Enum Status of the issue. Options : ['In queue', 'In progress', 'Waiting Review', 'Waiting for Data Vendor', 'Resolved', 'Closed', 'Cannot Be Resolved'] |
| corruptedFile | integer 1 if the issue reports corrupted files, otherwise 0. |
| missingPoints | integer 1 if the issue reports missing data points, otherwise 0. |
| missingFile | integer 1 if the issue reports missing files, otherwise 0. |
| wrongValues | integer 1 if the issue reports wrong values, otherwise 0. |
| listingError | integer 1 if the issue reports a listing error, otherwise 0. |
| splitError | integer 1 if the issue reports a split error, otherwise 0. |
| dividendError | integer 1 if the issue reports a dividend error, otherwise 0. |
| mappingError | integer 1 if the issue reports a ticker mapping error, otherwise 0. |
| reported | integer Unix timestamp of when the issue was reported. |
| comments | integer Number of comments on the issue. |
| updated | integer Unix timestamp of when the issue last changed, including when someone commented on it. |
| subscribed | boolean True if you're subscribed to the issue. |
| userName | string Name of the member who reported the issue. |
| userPublicId | string Public Id of the member who reported the issue. |
| userProfile | string URL of the profile image of the member who reported the issue. |
| Example |
{
"discussionId": 0,
"ticker": "string",
"security": "string",
"market": "string",
"resolution": "string",
"from": "2024-08-01 00:00:00",
"to": "2024-08-02 00:00:00",
"status": "In queue",
"corruptedFile": 0,
"missingPoints": 0,
"missingFile": 0,
"wrongValues": 0,
"listingError": 0,
"splitError": 0,
"dividendError": 0,
"mappingError": 0,
"reported": 0,
"comments": 0,
"updated": 0,
"subscribed": true,
"userName": "string",
"userPublicId": "string",
"userProfile": "string"
}
|
401 Authentication Error
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash. | |
|---|---|
| www_authenticate | string Header |
Examples
The following example demonstrates listing the open data issues for a ticker and reporting a new issue with an attached project and backtest when none exists through the cloud API.
from base64 import b64encode
from hashlib import sha256
from time import time
from requests import get, post
BASE_URL = 'https://www.quantconnect.com/api/v2/'
# You need to replace these with your actual credentials.
# You can request your credentials at https://www.quantconnect.com/settings/
# You can find our organization ID at https://www.quantconnect.com/organization/
USER_ID = 0
API_TOKEN = '____'
ORGANIZATION_ID = '____'
def get_headers():
# Get timestamp
timestamp = f'{int(time())}'
time_stamped_token = f'{API_TOKEN}:{timestamp}'.encode('utf-8')
# Get hased API token
hashed_token = sha256(time_stamped_token).hexdigest()
authentication = f'{USER_ID}:{hashed_token}'.encode('utf-8')
authentication = b64encode(authentication).decode('ascii')
# Create headers dictionary.
return {
'Authorization': f'Basic {authentication}',
'Timestamp': timestamp
}
# Authenticate to verify credentials
response = post(f'{BASE_URL}/authenticate', headers = get_headers())
print(response.json())
# --------------------
### List Data Issues
# Send a POST request to the /community/data-library/issues/list endpoint to find open issues for SPY minute data
response = post(f'{BASE_URL}/community/data-library/issues/list', headers=get_headers(), json={
"status": "open", # open or closed
"start": 0, # Index of the first issue to return
"end": 20, # Index after the last issue to return
"ticker": "SPY", # Exact ticker match, not case-sensitive
"resolution": "Minute" # Optional. Also filter by security, market, or resolution
})
# Parse the JSON response into python managable dict
result = response.json()
# Keep the open issues that already cover SPY minute data
existing = result.get('results', [])
# Check if the request was successful and print the issues
if result['success']:
print("Open Data Issues:")
print(result)
### List Backtests
# Send a POST request to the /backtests/list endpoint to find a backtest that shows the issue
project_id = 12345678 # Replace with the Id of your project
response = post(f'{BASE_URL}/backtests/list', headers=get_headers(), json={
"projectId": project_id,
"includeStatistics": False
})
# Parse the JSON response into python managable dict
result = response.json()
# Pick the first backtest of the project to attach to the issue
backtest_id = result['backtests'][0]['backtestId'] if result.get('backtests') else None
### Create Data Issue (only when no open issue covers it)
if not existing:
# Send a POST request to the /community/data-library/issues/create endpoint to report the issue
response = post(f'{BASE_URL}/community/data-library/issues/create', headers=get_headers(), json={
"ticker": "SPY",
"security": "Equity",
"market": "USA",
"resolution": "Minute",
"from-date": "2024-08-01",
"to-date": "2024-08-01",
"from-time": "09:30", # Minute data over less than 7 days needs times
"to-time": "16:00",
"missing-points": "Missing Points", # At least one issue type
"content": "SPY minute bars are missing on 2024-08-01 between 09:30 and 16:00.",
"select-project": project_id, # Optional. Project that shows the issue
"select-backtest": backtest_id # Optional. Backtest of that project
})
# Parse the JSON response into python managable dict
result = response.json()
# Check if the request was successful and print the link to the issue
if result['success']:
print(f"https://www.quantconnect.com/datasets/issue/{result['discussionId']}")