openapi: 3.2.0 info: title: bolsai Auth API description: 'API de dados financeiros do Brasil — ações, FIIs, fundamentos, dividendos, macro. **Autenticação:** Inclua sua API key no header `X-API-Key`. **Criar conta:** Faça login com Google em https://usebolsai.com **Planos:** Grátis (200 req/dia) · Pro R$49/mês (10K req/dia, todos endpoints)' version: 1.0.0 tags: - name: Auth paths: /api/v1/auth/google: get: tags: - Auth summary: Google Login description: Redirect user to Google OAuth consent screen. operationId: google_login_api_v1_auth_google_get responses: '200': description: Successful Response content: application/json: schema: {} security: - ApiKeyHeader: [] /api/v1/auth/google/callback: get: tags: - Auth summary: Google Callback description: Handle Google OAuth callback. operationId: google_callback_api_v1_auth_google_callback_get parameters: - name: code in: query required: false schema: type: string default: '' title: Code - name: state in: query required: false schema: type: string default: '' title: State - name: error in: query required: false schema: type: string default: '' title: Error responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - ApiKeyHeader: [] /api/v1/auth/me: get: tags: - Auth summary: Get Current User description: Get current logged-in user info and usage stats. operationId: get_current_user_api_v1_auth_me_get responses: '200': description: Successful Response content: application/json: schema: {} security: - ApiKeyHeader: [] /api/v1/auth/check-admin: get: tags: - Auth summary: Check Admin description: Check if current session is admin. Used by nginx auth_request. operationId: check_admin_api_v1_auth_check_admin_get responses: '200': description: Successful Response content: application/json: schema: {} security: - ApiKeyHeader: [] /api/v1/auth/logout: get: tags: - Auth summary: Logout description: Clear session and redirect to home. operationId: logout_api_v1_auth_logout_get responses: '200': description: Successful Response content: application/json: schema: {} 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 securitySchemes: ApiKeyHeader: type: apiKey in: header name: X-API-Key description: Get your key at POST /api/v1/keys/register