openapi: 3.2.0 info: title: Bolsai Financials API version: 1.0.0 description: 'Operations tagged Financials across 2 of this provider''s published API definitions: bolsai-gpt-actions-schema.json, bolsai-openapi-original.json. Each path carries the servers of the definition it was published in.' servers: - url: https://usebolsai.com/api/v1 tags: - name: Financials paths: /financials/{ticker}: get: operationId: getFinancialStatements summary: Demonstrações financeiras da CVM description: DRE, balanço patrimonial (BPA/BPP), fluxo de caixa (DFC_MI) e DVA. Dados brutos da CVM. parameters: - name: ticker in: path required: true schema: type: string pattern: ^[A-Za-z]{4}\d{0,2}$ - name: report_type in: query schema: type: string enum: - DFP - ITR default: DFP description: DFP=anual, ITR=trimestral - name: statement_type in: query schema: type: string enum: - BPA - BPP - DRE - DFC_MI - DVA description: Tipo de demonstração - name: reference_date in: query schema: type: string format: date description: Data de referência - name: limit in: query schema: type: integer default: 1000 minimum: 1 maximum: 5000 responses: '200': description: Linhas do demonstrativo financeiro tags: - Financials security: - oauth2: [] servers: - url: https://usebolsai.com/api/v1 /api/v1/financials/{ticker}: get: tags: - Financials summary: Get Financials operationId: get_financials_api_v1_financials__ticker__get parameters: - name: ticker in: path required: true schema: type: string pattern: ^[A-Za-z][A-Za-z0-9]{3}\d{0,2}$ description: Ticker title: Ticker description: Ticker - name: report_type in: query required: false schema: type: string description: DFP (annual) or ITR (quarterly) default: DFP title: Report Type description: DFP (annual) or ITR (quarterly) - name: statement_type in: query required: false schema: anyOf: - type: string - type: 'null' description: BPA, BPP, DRE, DFC_MI, DVA title: Statement Type description: BPA, BPP, DRE, DFC_MI, DVA - name: reference_date in: query required: false schema: anyOf: - type: string format: date - type: 'null' title: Reference Date - name: limit in: query required: false schema: type: integer maximum: 5000 minimum: 1 default: 1000 title: Limit - name: format in: query required: false schema: type: string description: 'Response format: json or csv' default: json title: Format description: 'Response format: json or csv' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FinancialsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - ApiKeyHeader: [] components: schemas: HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError FinancialsResponse: properties: ticker: type: string title: Ticker cvm_code: type: string title: Cvm Code report_type: type: string title: Report Type count: type: integer title: Count statements: items: $ref: '#/components/schemas/FinancialLineItem' type: array title: Statements type: object required: - ticker - cvm_code - report_type - count - statements title: FinancialsResponse FinancialLineItem: properties: reference_date: type: string format: date title: Reference Date statement_type: type: string title: Statement Type account_code: type: string title: Account Code account_name: type: string title: Account Name value: type: number title: Value type: object required: - reference_date - statement_type - account_code - account_name - value title: FinancialLineItem securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://usebolsai.com/api/v1/oauth/authorize tokenUrl: https://usebolsai.com/api/v1/oauth/token scopes: {} ApiKeyHeader: type: apiKey in: header name: X-API-Key description: Get your key at POST /api/v1/keys/register x-refined-from: - bolsai-gpt-actions-schema.json - bolsai-openapi-original.json