{
  "openapi": "3.0.3",
  "info": {
    "title": "ifin API Reference",
    "version": "0.1.0",
    "description": "Insidra source API for bluedoor Financial Data.\nFocused congressional and insider trading analytics.\nCoverage: Congress trades; Congress analytics; 24h insider analytics; Search.\nGenerated from the live source contract and representative live API responses on 2026-06-07T01:30:59.456Z."
  },
  "servers": [
    {
      "url": "https://api.ifin.bluedoor.sh",
      "description": "ifin source API"
    }
  ],
  "externalDocs": {
    "description": "Insidra source API docs",
    "url": "https://bluedoor.sh/apis/financial-data/sources/ifin"
  },
  "tags": [
    {
      "name": "Congress"
    }
  ],
  "paths": {
    "/v1/search": {
      "get": {
        "operationId": "ifin_get_search",
        "summary": "Search",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "description": "Substring match against ticker symbol or company name (case-insensitive)."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Bypass the edge cache when truthy."
          },
          {
            "name": "x-ifin-contact",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Optional contact email for higher public rate limits and support diagnostics."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Bearer <key>"
            },
            "description": "Optional API-key authorization for higher-volume access tiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ifin_get_searchResponse"
                },
                "examples": {
                  "live": {
                    "summary": "Live response",
                    "value": {
                      "meta": {
                        "provider": "insidra",
                        "route": "search_index",
                        "contract": "insidra.search.index",
                        "cache": "hit",
                        "identity_tier": "contact",
                        "ttl_seconds": 21600,
                        "generated_at": "2026-06-07T01:06:41.938Z"
                      },
                      "data": {
                        "query": "AAPL",
                        "limit": 50,
                        "total": {
                          "stocks": 1,
                          "congress": 0
                        },
                        "stocks": [
                          {
                            "symbol": "AAPL",
                            "name": "APPLE INC"
                          }
                        ],
                        "congress": []
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. A required parameter is missing, malformed, or outside the supported range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 400 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "bad_request",
                        "message": "Required query parameter is missing or invalid."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. API-key authenticated tiers use an Authorization bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 401 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "unauthorized",
                        "message": "A valid API key is required for this tier."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The requested route, resource, or symbol could not be resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 404 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "not_found",
                        "message": "The requested resource was not found."
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Source API routes are documented as HTTP GET unless otherwise specified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 405 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "method_not_allowed",
                        "message": "This route does not support the requested HTTP method."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 429 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the rate-limit reset."
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream source error. The source service rejected or failed the upstream request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 502 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_error",
                        "message": "The upstream source returned an error."
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Origin circuit open or origin failure detected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 503 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "service_unavailable",
                        "message": "The service is temporarily unavailable."
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Upstream timeout. The upstream source did not return within the source API timeout window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 504 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_timeout",
                        "message": "The upstream source timed out."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "ContactEmail": []
          },
          {
            "BearerAuth": []
          },
          {
            "IfinApiKey": []
          }
        ],
        "description": "Searches Insidra data and returns source-native matches and identifiers.",
        "x-source-api": "ifin",
        "x-source-name": "Insidra",
        "x-source-upstream": "insidra.com",
        "x-docs-example-url": "https://api.ifin.bluedoor.sh/v1/search?q=AAPL",
        "x-docs-example-status": 200,
        "x-docs-captured-at": "2026-06-07T01:36:11.094Z"
      }
    },
    "/v1/congress/analytics": {
      "get": {
        "operationId": "ifin_get_congress_analytics",
        "summary": "Analytics",
        "parameters": [
          {
            "name": "refresh",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Bypass the edge cache when truthy."
          },
          {
            "name": "x-ifin-contact",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Optional contact email for higher public rate limits and support diagnostics."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Bearer <key>"
            },
            "description": "Optional API-key authorization for higher-volume access tiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ifin_get_congress_analyticsResponse"
                },
                "examples": {
                  "live": {
                    "summary": "Live response",
                    "value": {
                      "meta": {
                        "provider": "insidra",
                        "route": "congress_analytics",
                        "contract": "insidra.congress.analytics",
                        "cache": "miss",
                        "identity_tier": "contact",
                        "ttl_seconds": 900,
                        "generated_at": "2026-06-07T01:36:11.498Z"
                      },
                      "data": {
                        "sentiment": {
                          "buy_count": 5,
                          "sell_count": 1,
                          "buy_percentage": 83,
                          "period": "90 days"
                        },
                        "top_stocks": [
                          {
                            "ticker": "VZ",
                            "buys": 0,
                            "sells": 1,
                            "total_trades": 1,
                            "total_volume": 8000,
                            "sentiment": "bearish"
                          },
                          {
                            "ticker": "SONY",
                            "buys": 1,
                            "sells": 0,
                            "total_trades": 1,
                            "total_volume": 8000,
                            "sentiment": "bullish"
                          },
                          {
                            "ticker": "NEWT",
                            "buys": 1,
                            "sells": 0,
                            "total_trades": 1,
                            "total_volume": 8000,
                            "sentiment": "bullish"
                          }
                        ],
                        "top_representatives": [],
                        "by_party": []
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. A required parameter is missing, malformed, or outside the supported range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 400 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "bad_request",
                        "message": "Required query parameter is missing or invalid."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. API-key authenticated tiers use an Authorization bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 401 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "unauthorized",
                        "message": "A valid API key is required for this tier."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The requested route, resource, or symbol could not be resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 404 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "not_found",
                        "message": "The requested resource was not found."
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Source API routes are documented as HTTP GET unless otherwise specified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 405 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "method_not_allowed",
                        "message": "This route does not support the requested HTTP method."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 429 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the rate-limit reset."
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream source error. The source service rejected or failed the upstream request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 502 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_error",
                        "message": "The upstream source returned an error."
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Origin circuit open or origin failure detected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 503 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "service_unavailable",
                        "message": "The service is temporarily unavailable."
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Upstream timeout. The upstream source did not return within the source API timeout window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 504 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_timeout",
                        "message": "The upstream source timed out."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "ContactEmail": []
          },
          {
            "BearerAuth": []
          },
          {
            "IfinApiKey": []
          }
        ],
        "description": "Returns analytics with source-native disclosure fields and issuer identifiers.",
        "tags": [
          "Congress"
        ],
        "x-source-api": "ifin",
        "x-source-name": "Insidra",
        "x-source-upstream": "insidra.com",
        "x-docs-example-url": "https://api.ifin.bluedoor.sh/v1/congress/analytics",
        "x-docs-example-status": 200,
        "x-docs-captured-at": "2026-06-07T01:36:11.510Z"
      }
    },
    "/v1/congress/trades": {
      "get": {
        "operationId": "ifin_get_congress_trades",
        "summary": "Trades",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Bypass the edge cache when truthy."
          },
          {
            "name": "x-ifin-contact",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Optional contact email for higher public rate limits and support diagnostics."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Bearer <key>"
            },
            "description": "Optional API-key authorization for higher-volume access tiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ifin_get_congress_tradesResponse"
                },
                "examples": {
                  "live": {
                    "summary": "Live response",
                    "value": {
                      "meta": {
                        "provider": "insidra",
                        "route": "congress_trades",
                        "contract": "insidra.congress.trades",
                        "cache": "miss",
                        "identity_tier": "contact",
                        "ttl_seconds": 300,
                        "generated_at": "2026-06-07T01:36:11.985Z"
                      },
                      "data": {
                        "pagination": {
                          "limit": 3,
                          "offset": 0,
                          "total": 36846,
                          "has_more": true
                        },
                        "trades": [
                          {
                            "id": 36292,
                            "year": 2026,
                            "external_id": "20034133",
                            "representative": "Richard W. Allen",
                            "district": "GA12",
                            "party": "Republican",
                            "transaction_code": "ST",
                            "transaction_type": "S",
                            "ticker": "INTU",
                            "description": null,
                            "transaction_date": "2026-02-19",
                            "notification_date": "2026-03-05",
                            "digitally_signed_date": "2026-03-11",
                            "amount": 1001,
                            "is_partial": false,
                            "image_url": "https://www.congress.gov/img/member/a000372_200.jpg",
                            "slug": "rick-w-allen"
                          },
                          {
                            "id": 36293,
                            "year": 2026,
                            "external_id": "20034133",
                            "representative": "Richard W. Allen",
                            "district": "GA12",
                            "party": "Republican",
                            "transaction_code": "ST",
                            "transaction_type": "S",
                            "ticker": "INTU",
                            "description": null,
                            "transaction_date": "2026-02-18",
                            "notification_date": "2026-03-05",
                            "digitally_signed_date": "2026-03-11",
                            "amount": 15001,
                            "is_partial": false,
                            "image_url": "https://www.congress.gov/img/member/a000372_200.jpg",
                            "slug": "rick-w-allen"
                          },
                          {
                            "id": 36294,
                            "year": 2026,
                            "external_id": "20034133",
                            "representative": "Richard W. Allen",
                            "district": "GA12",
                            "party": "Republican",
                            "transaction_code": "ST",
                            "transaction_type": "P",
                            "ticker": "KMI",
                            "description": null,
                            "transaction_date": "2026-02-19",
                            "notification_date": "2026-03-05",
                            "digitally_signed_date": "2026-03-11",
                            "amount": 1001,
                            "is_partial": false,
                            "image_url": "https://www.congress.gov/img/member/a000372_200.jpg",
                            "slug": "rick-w-allen"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. A required parameter is missing, malformed, or outside the supported range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 400 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "bad_request",
                        "message": "Required query parameter is missing or invalid."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. API-key authenticated tiers use an Authorization bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 401 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "unauthorized",
                        "message": "A valid API key is required for this tier."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The requested route, resource, or symbol could not be resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 404 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "not_found",
                        "message": "The requested resource was not found."
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Source API routes are documented as HTTP GET unless otherwise specified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 405 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "method_not_allowed",
                        "message": "This route does not support the requested HTTP method."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 429 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the rate-limit reset."
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream source error. The source service rejected or failed the upstream request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 502 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_error",
                        "message": "The upstream source returned an error."
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Origin circuit open or origin failure detected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 503 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "service_unavailable",
                        "message": "The service is temporarily unavailable."
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Upstream timeout. The upstream source did not return within the source API timeout window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 504 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_timeout",
                        "message": "The upstream source timed out."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "ContactEmail": []
          },
          {
            "BearerAuth": []
          },
          {
            "IfinApiKey": []
          }
        ],
        "description": "Returns trades with source-native disclosure fields and issuer identifiers.",
        "tags": [
          "Congress"
        ],
        "x-source-api": "ifin",
        "x-source-name": "Insidra",
        "x-source-upstream": "insidra.com",
        "x-docs-example-url": "https://api.ifin.bluedoor.sh/v1/congress/trades?limit=3",
        "x-docs-example-status": 200,
        "x-docs-captured-at": "2026-06-07T01:36:11.995Z"
      }
    },
    "/v1/insider/analytics/24h": {
      "get": {
        "operationId": "ifin_get_insider_analytics_24h",
        "summary": "24-hour insider analytics",
        "parameters": [
          {
            "name": "refresh",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Bypass the edge cache when truthy."
          },
          {
            "name": "x-ifin-contact",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Optional contact email for higher public rate limits and support diagnostics."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Bearer <key>"
            },
            "description": "Optional API-key authorization for higher-volume access tiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ifin_get_insider_analytics_24hResponse"
                },
                "examples": {
                  "live": {
                    "summary": "Live response",
                    "value": {
                      "meta": {
                        "provider": "insidra",
                        "route": "insider_analytics_24h",
                        "contract": "insidra.insider.analytics_24h",
                        "cache": "miss",
                        "identity_tier": "contact",
                        "ttl_seconds": 300,
                        "generated_at": "2026-06-07T01:36:12.332Z"
                      },
                      "data": {
                        "total_24h": 1,
                        "buys_24h": 1,
                        "sells_24h": 0,
                        "volume_usd_24h": 97389.6,
                        "buy_volume_usd_24h": 97389.6,
                        "sell_volume_usd_24h": 0,
                        "unique_insiders_24h": 1,
                        "avg_trade_size_24h": 97389.6,
                        "largest_trade_24h": 97389.6,
                        "most_active_stock_24h": "WHF",
                        "most_active_stock_count": 1,
                        "most_active_stock_sentiment": 100,
                        "most_active_stock_biggest_trade": 97389.6,
                        "ten_percent_owner_percentage": 0,
                        "largest_trade_stock": "WHF",
                        "largest_trade_insider": "BOLDUC JOHN",
                        "largest_trade_type": "P",
                        "time_window_hours": 24,
                        "has_recent_data": true
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. A required parameter is missing, malformed, or outside the supported range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 400 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "bad_request",
                        "message": "Required query parameter is missing or invalid."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. API-key authenticated tiers use an Authorization bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 401 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "unauthorized",
                        "message": "A valid API key is required for this tier."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The requested route, resource, or symbol could not be resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 404 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "not_found",
                        "message": "The requested resource was not found."
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Source API routes are documented as HTTP GET unless otherwise specified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 405 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "method_not_allowed",
                        "message": "This route does not support the requested HTTP method."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 429 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the rate-limit reset."
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream source error. The source service rejected or failed the upstream request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 502 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_error",
                        "message": "The upstream source returned an error."
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Origin circuit open or origin failure detected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 503 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "service_unavailable",
                        "message": "The service is temporarily unavailable."
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Upstream timeout. The upstream source did not return within the source API timeout window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 504 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_timeout",
                        "message": "The upstream source timed out."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "ContactEmail": []
          },
          {
            "BearerAuth": []
          },
          {
            "IfinApiKey": []
          }
        ],
        "description": "Returns 24-hour insider analytics with insider, issuer, transaction, and filing fields where available.",
        "x-source-api": "ifin",
        "x-source-name": "Insidra",
        "x-source-upstream": "insidra.com",
        "x-docs-example-url": "https://api.ifin.bluedoor.sh/v1/insider/analytics/24h",
        "x-docs-example-status": 200,
        "x-docs-captured-at": "2026-06-07T01:36:12.342Z"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ContactEmail": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Ifin-Contact"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API keys are available by emailing sam@bluedoor.sh."
      },
      "IfinApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Ifin-Key"
      }
    },
    "schemas": {
      "ErrorEnvelope": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "ok": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ifin_get_searchResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "provider": {
                "type": "string"
              },
              "route": {
                "type": "string"
              },
              "contract": {
                "type": "string"
              },
              "cache": {
                "type": "string"
              },
              "identity_tier": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              },
              "generated_at": {
                "type": "string"
              }
            },
            "required": [
              "cache",
              "contract",
              "generated_at",
              "identity_tier",
              "provider",
              "route",
              "ttl_seconds"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "query": {
                "type": "string"
              },
              "limit": {
                "type": "integer"
              },
              "total": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "stocks": {
                    "type": "integer"
                  },
                  "congress": {
                    "type": "integer"
                  }
                },
                "required": [
                  "congress",
                  "stocks"
                ]
              },
              "stocks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "symbol"
                  ]
                }
              },
              "congress": {
                "type": "array",
                "items": {}
              }
            },
            "required": [
              "congress",
              "limit",
              "query",
              "stocks",
              "total"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "ifin_get_congress_analyticsResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "provider": {
                "type": "string"
              },
              "route": {
                "type": "string"
              },
              "contract": {
                "type": "string"
              },
              "cache": {
                "type": "string"
              },
              "identity_tier": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              },
              "generated_at": {
                "type": "string"
              }
            },
            "required": [
              "cache",
              "contract",
              "generated_at",
              "identity_tier",
              "provider",
              "route",
              "ttl_seconds"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "sentiment": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "buy_count": {
                    "type": "integer"
                  },
                  "sell_count": {
                    "type": "integer"
                  },
                  "buy_percentage": {
                    "type": "integer"
                  },
                  "period": {
                    "type": "string"
                  }
                },
                "required": [
                  "buy_count",
                  "buy_percentage",
                  "period",
                  "sell_count"
                ]
              },
              "top_stocks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "ticker": {
                      "type": "string"
                    },
                    "buys": {
                      "type": "integer"
                    },
                    "sells": {
                      "type": "integer"
                    },
                    "total_trades": {
                      "type": "integer"
                    },
                    "total_volume": {
                      "type": "integer"
                    },
                    "sentiment": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "buys",
                    "sells",
                    "sentiment",
                    "ticker",
                    "total_trades",
                    "total_volume"
                  ]
                }
              },
              "top_representatives": {
                "type": "array",
                "items": {}
              },
              "by_party": {
                "type": "array",
                "items": {}
              }
            },
            "required": [
              "by_party",
              "sentiment",
              "top_representatives",
              "top_stocks"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "ifin_get_congress_tradesResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "provider": {
                "type": "string"
              },
              "route": {
                "type": "string"
              },
              "contract": {
                "type": "string"
              },
              "cache": {
                "type": "string"
              },
              "identity_tier": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              },
              "generated_at": {
                "type": "string"
              }
            },
            "required": [
              "cache",
              "contract",
              "generated_at",
              "identity_tier",
              "provider",
              "route",
              "ttl_seconds"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "pagination": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "limit": {
                    "type": "integer"
                  },
                  "offset": {
                    "type": "integer"
                  },
                  "total": {
                    "type": "integer"
                  },
                  "has_more": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "has_more",
                  "limit",
                  "offset",
                  "total"
                ]
              },
              "trades": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "year": {
                      "type": "integer"
                    },
                    "external_id": {
                      "type": "string"
                    },
                    "representative": {
                      "type": "string"
                    },
                    "district": {
                      "type": "string"
                    },
                    "party": {
                      "type": "string"
                    },
                    "transaction_code": {
                      "type": "string"
                    },
                    "transaction_type": {
                      "type": "string"
                    },
                    "ticker": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true
                    },
                    "transaction_date": {
                      "type": "string"
                    },
                    "notification_date": {
                      "type": "string"
                    },
                    "digitally_signed_date": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "integer"
                    },
                    "is_partial": {
                      "type": "boolean"
                    },
                    "image_url": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "description",
                    "digitally_signed_date",
                    "district",
                    "external_id",
                    "id",
                    "image_url",
                    "is_partial",
                    "notification_date",
                    "party",
                    "representative",
                    "slug",
                    "ticker",
                    "transaction_code",
                    "transaction_date",
                    "transaction_type",
                    "year"
                  ]
                }
              }
            },
            "required": [
              "pagination",
              "trades"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "ifin_get_insider_analytics_24hResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "provider": {
                "type": "string"
              },
              "route": {
                "type": "string"
              },
              "contract": {
                "type": "string"
              },
              "cache": {
                "type": "string"
              },
              "identity_tier": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              },
              "generated_at": {
                "type": "string"
              }
            },
            "required": [
              "cache",
              "contract",
              "generated_at",
              "identity_tier",
              "provider",
              "route",
              "ttl_seconds"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "total_24h": {
                "type": "integer"
              },
              "buys_24h": {
                "type": "integer"
              },
              "sells_24h": {
                "type": "integer"
              },
              "volume_usd_24h": {
                "type": "number"
              },
              "buy_volume_usd_24h": {
                "type": "number"
              },
              "sell_volume_usd_24h": {
                "type": "integer"
              },
              "unique_insiders_24h": {
                "type": "integer"
              },
              "avg_trade_size_24h": {
                "type": "number"
              },
              "largest_trade_24h": {
                "type": "number"
              },
              "most_active_stock_24h": {
                "type": "string"
              },
              "most_active_stock_count": {
                "type": "integer"
              },
              "most_active_stock_sentiment": {
                "type": "integer"
              },
              "most_active_stock_biggest_trade": {
                "type": "number"
              },
              "ten_percent_owner_percentage": {
                "type": "integer"
              },
              "largest_trade_stock": {
                "type": "string"
              },
              "largest_trade_insider": {
                "type": "string"
              },
              "largest_trade_type": {
                "type": "string"
              },
              "time_window_hours": {
                "type": "integer"
              },
              "has_recent_data": {
                "type": "boolean"
              }
            },
            "required": [
              "avg_trade_size_24h",
              "buy_volume_usd_24h",
              "buys_24h",
              "has_recent_data",
              "largest_trade_24h",
              "largest_trade_insider",
              "largest_trade_stock",
              "largest_trade_type",
              "most_active_stock_24h",
              "most_active_stock_biggest_trade",
              "most_active_stock_count",
              "most_active_stock_sentiment",
              "sell_volume_usd_24h",
              "sells_24h",
              "ten_percent_owner_percentage",
              "time_window_hours",
              "total_24h",
              "unique_insiders_24h",
              "volume_usd_24h"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      }
    }
  },
  "x-generated-at": "2026-06-07T01:30:59.456Z",
  "x-source-api": "ifin",
  "x-source-base-url": "https://api.ifin.bluedoor.sh"
}
