openapi: 3.0.3 info: title: Factset Analytics Datastore About Level2 API description: Allow clients to fetch precalculated Analytics through predeterministic URLs. contact: name: FactSet Research Systems url: https://developer.factset.com/contact email: api@factset.com license: name: Apache License, Version 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 version: 1.0.0 servers: - url: https://api.factset.com description: Production - url: https://api-sandbox.factset.com description: Sandbox security: - basicAuth: [] tags: - name: Level2 paths: /level2/files/create: post: tags: - Level2 summary: Factset Returns the ID for the requested data. operationId: requestTickHistoryLeve2Files description: Data available from past 6 years to previous day. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/levelTwoRequest' examples: Single ticker for the given period: $ref: '#/components/examples/postBodyOfSingleTickerLevel2' Multiple tickers for the given period: $ref: '#/components/examples/postBodyMultipleTickerLevel2' responses: '202': description: 'The Request has been Accepted. ' content: application/json: schema: $ref: '#/components/schemas/submittedResponse' examples: default202ResponseExample: $ref: '#/components/examples/sampleFilesResponse' headers: Location: description: Relative location to poll for status schema: type: string X-FactSet-Api-RateLimit-Limit: description: Number of allowed requests for the time window. schema: type: string X-FactSet-Api-RateLimit-Remaining: description: Number of requests left for the time window. schema: type: string X-FactSet-Api-RateLimit-Reset: description: Number of seconds remaining till rate limit resets. schema: type: string '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/400Example' '401': description: Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the Report Issue in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses. content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/401Example' '403': description: The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization. content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/403Example' '429': description: Too many requests. content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/429Example' '500': description: Internal Error content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/500Example' /level2/files/status: get: tags: - Level2 summary: Factset Returns the status of the ID operationId: getLevel2FileStatus description: Need to plug-in the id get from /create endpoint into /status endpoint parameters: - $ref: '#/components/parameters/requestIdStatus' responses: '201': description: 'The Request has been created and the response has been created. ' content: application/json: schema: $ref: '#/components/schemas/completedResponse' examples: default200ResponseExample: $ref: '#/components/examples/sampleCompletedResponse' headers: Location: description: Relative location to pick up results schema: type: string example: get?id=2df43e85-ea0f-45c6-bf4a-2baf4d1eaa3c '202': description: 'The Request has not finished and the result has NOT been created. ' content: application/json: schema: $ref: '#/components/schemas/submittedResponse' examples: QueuedExample: $ref: '#/components/examples/sampleFilesResponseQueued' ExecutingExample: $ref: '#/components/examples/sampleFilesResponseExecuting' FailedExample: $ref: '#/components/examples/sampleFilesResponseFailed' CancelledExample: $ref: '#/components/examples/sampleFilesResponseCancelled' headers: Location: description: Relative location to poll for status. schema: type: string '401': description: Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the Report Issue in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses. content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/401Example' '403': description: The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization. content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/403Example' '404': description: id not found content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/404Example' '500': description: Internal Error content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/500Example' /level2/files/get: get: tags: - Level2 summary: Factset Returns the tick history files requested in the /create endpoint operationId: getTickHistoryLevel2Files description: Returns the files from tickhistory endpoint parameters: - $ref: '#/components/parameters/requestId' - $ref: '#/components/parameters/_paginationLimit' - $ref: '#/components/parameters/_paginationOffset' responses: '200': description: Success

**To download the output file copy the response url in a browser** content: application/json: schema: $ref: '#/components/schemas/leveltwoGet-FilesResponse' examples: default200ResponseExample: $ref: '#/components/examples/sampleGet-FilesResponseLevel2' '202': description: ' The Request has not finished and the result has NOT been created. ' content: application/json: schema: $ref: '#/components/schemas/submittedResponse' examples: QueuedExample: $ref: '#/components/examples/sampleFilesResponseQueued' ExecutingExample: $ref: '#/components/examples/sampleFilesResponseExecuting' headers: Location: description: Relative location to poll for status. schema: type: string '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/400Example' '401': description: Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the Report Issue in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses. content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/401Example' '403': description: The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization. content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/403Example' '404': description: id not found content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/404Example' '500': description: Internal Error content: application/json: schema: $ref: '#/components/schemas/status' examples: default400ResponseExample: $ref: '#/components/examples/500Example' components: examples: sampleFilesResponseQueued: summary: Status Queued value: data: id: 27b4923f-86dd-4b8b-89ac-dfc3a26fa786 status: queued error: null 429Example: summary: sample error response value: errors: - code: Too Many Requests title: quantityLimitsExceeded id: 7af3d86ca5954503b9244f2620fcf5eb sampleFilesResponseExecuting: summary: Status Executing value: data: id: 27b4923f-86dd-4b8b-89ac-dfc3a26fa786 status: executing error: null sampleFilesResponse: summary: Status Accepted value: data: id: 27b4923f-86dd-4b8b-89ac-dfc3a26fa786 status: queued error: null 401Example: summary: sample error response value: errors: - code: Not Authenticated title: USERNAME-SERIAL does not have permission id: 7af3d86ca5954503b9244f2620fcf5eb 403Example: summary: sample error response value: errors: - code: Forbidden title: USERNAME-SERIAL does not have permission id: 7af3d86ca5954503b9244f2620fcf5eb sampleFilesResponseFailed: summary: Status Failed value: data: id: 27b4923f-86dd-4b8b-89ac-dfc3a26fa786 status: failed error: id: 2df43e85-ea0f-45c6-bf4a-2baf4d1eaa3c code: Geeneric Error title: 'Not a valid request ' sampleFilesResponseCancelled: summary: Status Cancelled value: data: id: 27b4923f-86dd-4b8b-89ac-dfc3a26fa786 status: cancelled error: id: 2df43e85-ea0f-45c6-bf4a-2baf4d1eaa3c code: Error title: Request taking long time postBodyOfSingleTickerLevel2: summary: Single ticker for the given period description: Post body request example to fetch details of the IBM tick data for the period 2020-01-01 to 2020-01-05. value: data: tickers: - IBM mic: XNYS dateRange: start: '2020-01-01' end: '2020-01-05' responseFileType: csv 400Example: summary: Sample error Response value: errors: - code: Bad Request title: parameterError:['_id'] is not a valid parameter(s) id: 7af3d86ca5954503b9244f2620fcf5eb sampleCompletedResponse: summary: Status Done value: data: id: 27b4923f-86dd-4b8b-89ac-dfc3a26fa786 status: created error: null 404Example: summary: sample error response value: errors: - code: Not Found title: id not found id: 7af3d86ca5954503b9244f2620fcf5eb postBodyMultipleTickerLevel2: summary: Multiple tickers for the given period description: Post body request example to fetch details of the IBM and GOOGL tick data for the period 2020-01-01 to 2020-01-05. value: data: tickers: - IBM - GOOGL mic: XNYS dateRange: start: '2020-01-01' end: '2020-01-05' responseFileType: csv 500Example: summary: sample error response value: errors: - code: Internal server error title: An unexpected error happened id: 7af3d86ca5954503b9244f2620fcf5eb sampleGet-FilesResponseLevel2: summary: sample Response data for Level2 value: data: requestTimestamp: '2023-05-16T14:11:06Z' updateTimestamp: '2023-05-16T14:15:18Z' listOfFiles: - fileName: part-00000-e4b0e511-9da2-48e5-9170-65231cd1cda1-c000.csv.gz url: https://fdss3-cts-th-l2-results-prod.s3.amazonaws.com/results/SKAKKIRENI-fds/d6bdf9cc-e566-4fb1-939d-f4036c4d71a2/part-00000-e4b0e511-9da2-48e5-9170-65231cd1cda1-c000.csv.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NAFRGHDF2A35WEG%2F20230609%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230609T150543Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEEcaCXVzLWVhc3QtMSJIMEYCIQDXmsqCGk3%2FaKcpaxhhZxoCu%2B9%2Bcu5nOVCZhMVFLL41swIhAM6CJL1vTvEyrALobdYbOEE0wEP2fhUPpfN7KsLgcKMCKpYDCJD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQAhoMODUyNTYyNjIwODcwIgxIMndyFOnQJQAfgP8q6gKepbh5fCacy9%2BIEQskkC7ZBRD%2BLhJxw366ui4HZHUdL6KzS8NqTWgTuExP3NPpbijN3zShV3JZ7wK5VIAZ4P2082Q5Ntb4SkCPW%2FfHm9z4PEhgh5rloCq42lu4W%2FTbjYY9DKVAGH1CuNatOiFOxF387dyotXUsWRVeQM6X2s2Mj4BEQ51z3qOWpaxQhL1iPXwk2rXQwlUPrICMU3%2FiAlsCOkp55ZKRS0Q42GXMxGjmcswsu%2BM%2BzZsJwmgl%2F8zbpJozLzZcpImkOiNWanpQkmWjVuXmcR52q2bZ4tvx0mtZNCDxOq%2FKySBRMDEJiFhXFxSkoDIxN19xpmJa2Z9vzCmHpA%2FAwuLdKQ9CapBvygkYO3ojf%2Fs0whIR6LWhFMW%2FvW%2FWrFyqfF9XOLtVele1YvFlxKQpCbwT%2FNJWjW9paji%2FbekNEHpNXq1xv%2BwvcbifD7M59NjGbidHeT3jAgdoT8ie%2FfF3BaO1J1sGIDD%2B%2FYykBjqcAeESPCIDl%2FAg2PrcBioBSay%2Fp8DtvCztpb9K2YR6tXoBkiYmy35TbaxUAkopRsyIZRnySyJoemYtRlez5nt9IZk8z2KJI6bTrIY2g7oxeuz5Y0ujsblB2UAYwe%2BuemhV5wLj3QxIDloEe%2B2LYgQq8FtmbBDuyk82B068g2yD%2B7GG%2BIMFjpyDk2f9FM0zAoSdv103xmgXg1sh91oZFA%3D%3D&X-Amz-Signature=235951702d599df97160a2849b31e290461597d11c1f8f54f9f2dec7f03bb331 meta: pagination: total: 256 isEstimatedTotal: false schemas: dateRangeOne: type: object description: Date Range properties: start: description: 'The date for (or from which) the data is required. Supports in YYYY-MM-DD format. ' type: string format: date example: '2012-01-01' end: type: string format: date description: 'The date to which data is required. Supports in YYYY-MM-DD format. ' example: '2012-01-30' submittedResponse: type: object title: Status Response description: Returns Status of the id. properties: data: $ref: '#/components/schemas/StatusOne' tickers: type: array items: type: string minItems: 1 maxItems: 500 description: "The requested list of one or more tickers.

NOTE: Maximum 500 tickers per request.

.\n \n" example: - FDS files: title: Files description: Array of data objects type: object properties: fileName: description: Name of the file(s) generated for the query requested type: string url: description: ' Download link for the TickHistory file with requested parameters

This download link will expire after 24 hours

' type: string completedResponse: type: object title: status description: Returns status. properties: data: $ref: '#/components/schemas/checkFiles' checkFiles: type: object description: check-files properties: id: description: a unique identification for the query requested type: string status: description: The status of the query type: string enum: - queued - executing - created - failed - cancelled error: $ref: '#/components/schemas/ErrorObject' ErrorObject: type: object nullable: true description: error properties: id: description: A UUID for this particular occurrence of the problem. type: string example: adb01824-252f-4420-b0c6-35a1e3507ef5 code: description: status type: string example: GenericError title: description: The plain text error message type: string example: Validation Error meta: title: Meta description: Array of metadata objects type: object properties: pagination: $ref: '#/components/schemas/pagination' level2RequestBody: title: Level2 Request Body description: Level2 request body elements type: object properties: tickers: $ref: '#/components/schemas/tickers' mic: $ref: '#/components/schemas/mic' dateRange: $ref: '#/components/schemas/dateRange' responseFileType: $ref: '#/components/schemas/responseFileType' required: - tickers - mic - dateRange errorExample: type: object description: Specifies the fields in the error message properties: code: description: It specifies the unique code type: string title: description: ' Specifies the error message' type: string id: description: Specifies the id type: string mic: description: 'A four-character code used to identify exchanges in which securities are traded.

**NOTE**:Does not support multiple mic codes

' type: string minItems: 1 maxItems: 1 example: XNYS dateRange: $ref: '#/components/schemas/dateRangeOne' status: type: object description: specifies the error message fields in the response properties: errors: type: array description: An array containing errors items: $ref: '#/components/schemas/errorExample' leveltwoGet-FilesResponse: type: object description: Returns Tick History Files properties: data: $ref: '#/components/schemas/TickDataLevel2' meta: $ref: '#/components/schemas/meta' StatusOne: type: object description: request-files properties: id: description: a unique identification for the query requested type: string status: description: The status of the query type: string enum: - queued - executing - created - failed - cancelled error: $ref: '#/components/schemas/ErrorObject' levelTwoRequest: title: Level2 Request Body description: Level2 request body elements type: object properties: data: $ref: '#/components/schemas/level2RequestBody' required: - data responseFileType: type: string description: Specifies the fileType enum: - csv - parquet default: parquet TickDataLevel2: type: object description: Returns Tick History Files properties: status: description: The status of the request type: string requestTimestamp: description: Timestamp of when request was made type: string format: date-time updateTimestamp: description: :"Timestamp when the file was last updated" type: string format: date-time listOfFiles: type: array description: Data Object items: $ref: '#/components/schemas/files' pagination: title: Pagination description: List of pagination objects type: object properties: total: description: Total number of files the API returns for a particular query type: integer isEstimatedTotal: description: Boolean value that represents whether the total count of files returned is exact or an estimate. This is defaulted to False as the API should always return the exact count type: boolean parameters: _paginationLimit: name: _paginationLimit in: query description: Specifies the maximum number of results to return per response page required: false schema: type: integer default: 20 _paginationOffset: name: _paginationOffset in: query description: Specifies the starting point for pagination. This parameter is used to identify the beginning of next set of results required: false schema: type: integer default: 0 requestIdStatus: name: id in: query description: id returned by files create endpoint to poll and collect status of the query required: true schema: type: string requestId: name: id in: query description: id returned by files create endpoint to poll and collect results of the query required: true schema: type: string securitySchemes: basicAuth: type: http scheme: basic externalDocs: url: https://developer.factset.com/api-catalog/analytics-datastore-api description: API Documentation