pigi.finance Hacks API

The hacks API from pigi.finance — 1 operation(s) for hacks.

GitHub OpenAPI

Operations 1

GET /hacks DeFi and TradFi hack / loss events #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pigi-finance:pigi-finance-hacks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pigi-finance-hacks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: pigi.finance Vault Intelligence Hacks API
  version: 1.0.0
  description: 'Programmatic access to pigi.finance DeFi vault data: APR, APY, TVL (with 30-day moving averages) across daily and weekly/monthly/quarterly/yearly windows, plus holder counts, vault risk ratings, cumulative protocol ratings and DeFi/T-Bill reference rates. Authenticate by exchanging your API key for a short-lived JWT, then send `Authorization: Bearer ` on every request.


    RISK BANDS ARE NOT CREDIT RATINGS. A pigi risk band (`band`, `risk_band`) and its 0-100 score are a relative assessment of the risk of loss to a depositor''s position in a DeFi vault, compared across the vaults pigi tracks; a protocol band applies the same scale to a protocol as a dependency of the vaults that deposit into it. They are not credit ratings issued in accordance with Regulation (EC) No 1060/2009 on credit rating agencies, and pigi is not a registered or certified credit rating agency in the EU, the UK or anywhere else. A band does not address the ability or willingness of any person, protocol or issuer to meet payment or other financial obligations, and is not an opinion on the creditworthiness of any entity, debt or financial instrument. Fields carry the bare letter ("A" .. "F"); pigi displays bands with the (rb) suffix, e.g. B(rb). Nothing in this API is financial advice. Methodology: https://app.pigi.finance/risk


    PLANS (free / pro / custom — https://pigi.finance/defi-api). Every plan gets every rate, TVL and window figure, the holder COUNT (`Vault.holders`), Basic risk (`/vaults/{id}/risk`: band, score, history, floors) and the protocol ratings (`/protocols`, `/protocols/{node_id}`: score, band, node rating, vault contributions). Pro adds the holder LIST (`/vaults/{id}/holders`, with its concentration block) and the holder-analytics fields on `Vault` (`deposit_count`, `active_addresses_30d`, `tvl_concentration_top10pct`). Custom adds the `full` risk decomposition and the protocol `rubric`. A gated FIELD is served as null and named in a top-level `plan_required` object (`{ "": "" }`); a gated ENDPOINT answers 403 `{ "error": "plan_required", "required": "" }`. A null with no marker is a real null (not indexed yet, vault not assessed). Gated elements below carry `x-plan`.'
servers:
- url: https://pigi.finance/api/v1
security:
- bearerAuth: []
tags:
- name: hacks
paths:
  /hacks:
    get:
      tags:
      - hacks
      summary: DeFi and TradFi hack / loss events
      description: 'Hack and loss events: every tracked DeFi exploit plus a reference set of major TradFi banking losses. `summary` covers the entire filtered set (not just the returned page), so total losses for a window can be read without paging through every event.'
      parameters:
      - in: query
        name: category
        schema:
          type: string
          enum:
          - defi
          - tradfi
          - all
          default: all
      - in: query
        name: type
        description: 'What kind of protocol was hit. Case-insensitive. DeFi events only — TradFi rows carry no type, so this filter excludes them.

          '
        schema:
          type: string
          enum:
          - DeFi
          - Dexes
          - Bridges
          - all
          default: all
      - in: query
        name: from
        description: Only events on/after this date (YYYY-MM-DD or ISO 8601).
        schema:
          type: string
      - in: query
        name: to
        description: Only events on/before this date, inclusive of the whole day.
        schema:
          type: string
      - in: query
        name: min_amount
        description: Only events at or above this USD amount.
        schema:
          type: number
      - in: query
        name: sort
        schema:
          type: string
          enum:
          - date_asc
          - date_desc
          - amount_desc
          - amount_asc
          default: date_asc
      - in: query
        name: limit
        schema:
          type: integer
          default: 100
          maximum: 1000
      - in: query
        name: offset
        schema:
          type: integer
          default: 0
      responses:
        '200':
          description: Hack events, a summary of the filtered set, and pagination
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Hack'
                  summary:
                    type: object
                    description: Totals over the ENTIRE filtered set, not just the returned page.
                    properties:
                      count:
                        type: integer
                      total_amount_hacked:
                        type: number
                        description: Sum of amount_hacked (USD).
                      first_date:
                        type:
                        - string
                        - 'null'
                      last_date:
                        type:
                        - string
                        - 'null'
                  pagination:
                    type: object
                    properties:
                      total:
                        type: integer
                      limit:
                        type: integer
                      offset:
                        type: integer
                      hasMore:
                        type: boolean
        '400':
          description: Invalid query parameter
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: invalid_parameter
                  detail:
                    type: string
      operationId: getHacks
      x-operation-id-source: derived
components:
  schemas:
    Hack:
      type: object
      description: A single hack / loss event.
      properties:
        id:
          type: integer
        date:
          type: string
          description: ISO 8601 timestamp of the event.
        name:
          type: string
          description: Protocol (DeFi) or institution (TradFi) that suffered the loss.
        amount_hacked:
          type: number
          description: Amount lost, in USD.
        category:
          type: string
          enum:
          - defi
          - tradfi
        type:
          type: string
          enum:
          - DeFi
          - Dexes
          - Bridges
          description: 'What kind of protocol was hit: DeFi (lending, yield, staking, stablecoins), Dexes, or Bridges. Present on DeFi events only — TradFi events are bank failures, which this taxonomy does not describe, so they omit the field.

            '
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT