{
  "openapi": "3.0.1",
  "info": {
    "title": "DeFi TVL and Stablecoin Yield Monitor with Alerts",
    "description": "Screen DeFi protocols by chain, category and TVL change, filter stablecoin yield pools by minimum TVL and APY, and get alerts when thresholds are crossed since your last run. Beta.",
    "version": "0.2",
    "x-build-id": "dQ60Ap5jsjYJObbxn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/transparent_meteorite~defi-protocol-tvl-yields-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-transparent_meteorite-defi-protocol-tvl-yields-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/transparent_meteorite~defi-protocol-tvl-yields-monitor/runs": {
      "post": {
        "operationId": "runs-sync-transparent_meteorite-defi-protocol-tvl-yields-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/transparent_meteorite~defi-protocol-tvl-yields-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-transparent_meteorite-defi-protocol-tvl-yields-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "protocols",
              "yields",
              "alerts"
            ],
            "type": "string",
            "description": "Protocol TVL list, yield pool list, or alerts (compares to the previous run saved in a key-value store; the first alerts run only saves a baseline and is free).",
            "default": "protocols"
          },
          "chains": {
            "title": "Chains",
            "type": "array",
            "description": "Keep only these chains, e.g. Ethereum, Arbitrum, Solana (case-insensitive). Empty = all chains.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Protocol categories",
            "type": "array",
            "description": "Protocols only. e.g. Lending, Dexs, Liquid Staking, Bridge. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "protocols": {
            "title": "Specific protocols",
            "type": "array",
            "description": "Protocols only. DefiLlama slugs or names, e.g. aave-v3, lido. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "minTvlUsd": {
            "title": "Minimum protocol TVL (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Protocols only. Drop protocols with total value locked below this.",
            "default": 100000000
          },
          "minChange1dPct": {
            "title": "Min 1-day TVL change (%)",
            "type": "integer",
            "description": "Protocols only. e.g. 10 keeps protocols whose TVL rose 10% or more in a day."
          },
          "maxChange1dPct": {
            "title": "Max 1-day TVL change (%)",
            "type": "integer",
            "description": "Protocols only. e.g. -10 keeps protocols whose TVL fell 10% or more in a day."
          },
          "minChange7dPct": {
            "title": "Min 7-day TVL change (%)",
            "type": "integer",
            "description": "Protocols only."
          },
          "maxChange7dPct": {
            "title": "Max 7-day TVL change (%)",
            "type": "integer",
            "description": "Protocols only."
          },
          "protocolSortBy": {
            "title": "Sort protocols by",
            "enum": [
              "tvl",
              "change1d",
              "change7d"
            ],
            "type": "string",
            "description": "Protocols only.",
            "default": "tvl"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Cap on rows delivered (and charged) this run.",
            "default": 25
          },
          "stablecoinOnly": {
            "title": "Stablecoin pools only",
            "type": "boolean",
            "description": "Keep only pools DefiLlama flags as stablecoin pools.",
            "default": true
          },
          "minPoolTvlUsd": {
            "title": "Minimum pool TVL (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop thin pools below this TVL.",
            "default": 1000000
          },
          "minApy": {
            "title": "Minimum APY (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep pools with APY at or above this.",
            "default": 3
          },
          "maxApy": {
            "title": "Maximum APY (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop extreme APYs, which are often short-lived or very risky.",
            "default": 100
          },
          "projects": {
            "title": "Pool projects",
            "type": "array",
            "description": "Pools only. DefiLlama project names, e.g. aave-v3, morpho-blue. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "poolSortBy": {
            "title": "Sort pools by",
            "enum": [
              "apy",
              "tvl"
            ],
            "type": "string",
            "description": "Pools only.",
            "default": "apy"
          },
          "excludeOutliers": {
            "title": "Exclude DefiLlama outlier pools",
            "type": "boolean",
            "description": "Drop pools DefiLlama flags as statistical outliers.",
            "default": true
          },
          "order": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Applies to protocol and pool lists.",
            "default": "desc"
          },
          "alertOn": {
            "title": "Watch",
            "enum": [
              "both",
              "protocols",
              "pools"
            ],
            "type": "string",
            "description": "Which side to compare. Uses the filters above to decide what is watched.",
            "default": "both"
          },
          "tvlDropPct": {
            "title": "Alert: protocol TVL fell by at least (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Versus the previous run.",
            "default": 10
          },
          "tvlRisePct": {
            "title": "Alert: protocol TVL rose by at least (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Versus the previous run. 0 = off.",
            "default": 0
          },
          "apyAbove": {
            "title": "Alert: pool APY crossed above (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Fires when a pool goes from below to at/above this APY since the previous run. 0 = off.",
            "default": 0
          },
          "apyBelow": {
            "title": "Alert: pool APY crossed below (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Fires when a pool goes from above to at/below this APY. 0 = off.",
            "default": 0
          },
          "poolTvlDropPct": {
            "title": "Alert: pool TVL fell by at least (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Versus the previous run. 0 = off.",
            "default": 0
          },
          "flagNewPools": {
            "title": "Alert: new pool now matches filters",
            "type": "boolean",
            "description": "Flag pools that match your filters now but were not in the previous run.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store holding the last-run snapshot. Change it to keep separate monitors or to reset the baseline.",
            "default": "defi-monitor-state"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}