{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/farmdash/json-schema/farmdash-scan-funding-response-schema.json",
  "title": "ScanFundingResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/farmdash-research-api-openapi.yml#/components/schemas/ScanFundingResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "tier": {
      "$ref": "#/$defs/Tier"
    },
    "arbOpportunities": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FundingAnalysis"
      }
    },
    "highFunding": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FundingAnalysis"
      }
    },
    "totalScanned": {
      "type": "integer"
    },
    "upgradeMessage": {
      "type": "string"
    },
    "timestamp": {
      "type": "integer"
    },
    "warnings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DustStormWarning"
      }
    }
  },
  "$defs": {
    "DustStormWarning": {
      "type": "object",
      "required": [
        "kind",
        "message"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "dust_storm"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "FundingAnalysis": {
      "type": "object",
      "properties": {
        "coin": {
          "type": "string"
        },
        "fundingRate": {
          "type": "number"
        },
        "annualizedRate": {
          "type": "number"
        },
        "predictedRate": {
          "type": "number"
        },
        "crossVenueDelta": {
          "type": "number"
        },
        "premium": {
          "type": "number"
        },
        "openInterest": {
          "type": "number"
        },
        "isArbOpportunity": {
          "type": "boolean"
        },
        "arbDirection": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "long_spot_short_perp",
            "short_spot_long_perp",
            null
          ]
        }
      }
    },
    "Tier": {
      "type": "string",
      "enum": [
        "scout",
        "pioneer",
        "syndicate"
      ]
    }
  }
}