Company Financials

Company Financials · Ações GPT

Company Financials API

An API to retrieve company basic financials such as margin, P/E ratio, 52-week high/low, etc.

  • GET /stock/metricGet Company Financials

    Retrieve company basic financials for the specified symbol and metric.

Esquema API original
{
  "openapi": "3.1.0",
  "info": {
    "title": "Company Financials API",
    "description": "An API to retrieve company basic financials such as margin, P/E ratio, 52-week high/low, etc.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://finnhub.io/api/v1"
    }
  ],
  "paths": {
    "/stock/metric": {
      "get": {
        "summary": "Get Company Financials",
        "operationId": "getCompanyFinancials",
        "description": "Retrieve company basic financials for the specified symbol and metric.",
        "parameters": [
          {
            "in": "query",
            "name": "symbol",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Symbol of the company."
          },
          {
            "in": "query",
            "name": "metric",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "all"
              ]
            },
            "description": "Metric type. Can be 'all'."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with company financials data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFinancialsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "FinnhubToken": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CompanyFinancialsResponse": {
        "type": "object",
        "properties": {
          "series": {
            "type": "object",
            "additionalProperties": true
          },
          "metric": {
            "type": "object",
            "additionalProperties": true
          },
          "metricType": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "FinnhubToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Finnhub-Token"
      }
    }
  },
  "security": [
    {
      "FinnhubToken": []
    }
  ]
}