{
  "openapi": "3.0.1",
  "info": {
    "title": "Crypto Perp Funding Rate, OI & Delta-Neutral Carry Arbitrage",
    "description": "Real-time crypto perpetual futures funding rates, open interest, mark-index basis, extreme cash-and-carry anomalies, and fee-adjusted cross-venue delta-neutral carry arbitrage across Hyperliquid, dYdX v4, Kraken Futures & OKX. 100% public APIs, AI Agent & MCP ready.",
    "version": "1.0",
    "x-build-id": "RdC9HmhaA7j2oJhAv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/conscious_chuckwalla~crypto-funding-rate-carry-arb/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-conscious_chuckwalla-crypto-funding-rate-carry-arb",
        "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/conscious_chuckwalla~crypto-funding-rate-carry-arb/runs": {
      "post": {
        "operationId": "runs-sync-conscious_chuckwalla-crypto-funding-rate-carry-arb",
        "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/conscious_chuckwalla~crypto-funding-rate-carry-arb/run-sync": {
      "post": {
        "operationId": "run-sync-conscious_chuckwalla-crypto-funding-rate-carry-arb",
        "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": "Intelligence Mode",
            "enum": [
              "all",
              "carry_arbitrage",
              "extreme_anomalies",
              "markets"
            ],
            "type": "string",
            "description": "Choose which records to emit. 'all' outputs cross-venue delta-neutral carry signals, extreme single-venue cash-and-carry anomalies, and top normalized perpetual markets. 'carry_arbitrage' emits only cross-venue carry pairs. 'extreme_anomalies' emits only |APR| >= threshold single-venue opportunities. 'markets' emits normalized perpetual snapshots.",
            "default": "all"
          },
          "venues": {
            "title": "Perpetual Futures Venues",
            "type": "array",
            "description": "US-accessible perpetual exchanges queried concurrently via official public APIs. Supported values: 'hyperliquid', 'dydx', 'kraken', 'okx', 'bitget'. Include at least 2 venues for cross-venue carry arbitrage.",
            "items": {
              "type": "string"
            },
            "default": [
              "hyperliquid",
              "dydx",
              "kraken",
              "okx"
            ]
          },
          "symbols": {
            "title": "Canonical Asset Filter (Optional)",
            "type": "array",
            "description": "Optional list of canonical base tickers to scan (e.g., 'BTC', 'ETH', 'SOL', 'XRP', 'DOGE', 'SUI', 'PEPE', 'HYPE'). Automatically matches scaled contracts such as kPEPE / 1000PEPE and XBT. Leave empty to scan all active perpetuals.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResults": {
            "title": "Maximum Dataset Output Records",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Upper cap on total records pushed to the dataset (protects user budget under Pay-Per-Event billing). Default 60 returns a rich mix of carry signals, anomalies, and liquid perp markets.",
            "default": 60
          },
          "minOpenInterestUsd": {
            "title": "Minimum Open Interest per Leg (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum open interest in USD required on each perpetual contract leg to qualify for cross-venue carry arbitrage, extreme anomalies, and market snapshots.",
            "default": 100000
          },
          "minVolume24hUsd": {
            "title": "Minimum 24h Notional Volume (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Filter out inactive perpetual contracts with 24-hour USD trading volume below this floor.",
            "default": 25000
          },
          "holdingDays": {
            "title": "Target Holding Horizon (Days)",
            "minimum": 0.25,
            "maximum": 365,
            "type": "number",
            "description": "Holding period (in days) over which 4-fill entry+exit taker fees across both legs (Hyperliquid 3.5 bps, dYdX 5 bps, Kraken 5 bps, OKX 5 bps) are amortized to compute net_carry_apr_pct.",
            "default": 7
          },
          "minGrossSpreadAprPct": {
            "title": "Minimum Cross-Venue Gross Funding Spread (% APR)",
            "minimum": 0,
            "maximum": 5000,
            "type": "number",
            "description": "Minimum gross annualized funding rate differential (short_apr - long_apr) required to emit a cross-venue delta-neutral carry signal.",
            "default": 5
          },
          "minNetCarryAprPct": {
            "title": "Minimum Fee-Adjusted Net Carry (% APR)",
            "minimum": -500,
            "maximum": 5000,
            "type": "number",
            "description": "Minimum net annualized carry APR after deducting round-trip taker fees over holdingDays. Set to 0 to keep only profitable post-fee carry trades at your target horizon.",
            "default": 0
          },
          "extremeFundingAprPct": {
            "title": "Extreme Single-Venue Anomaly Threshold (|APR| %)",
            "minimum": 5,
            "maximum": 10000,
            "type": "number",
            "description": "Absolute annualized funding rate threshold (default 50% APR) used to flag extreme single-venue cash-and-carry (spot + perp) opportunities.",
            "default": 50
          },
          "sortBy": {
            "title": "Market Snapshot Sort Order",
            "enum": [
              "open_interest_usd",
              "volume_24h_usd",
              "abs_funding_apr",
              "abs_basis_bps"
            ],
            "type": "string",
            "description": "Ordering applied to normalized perpetual market snapshot records.",
            "default": "open_interest_usd"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}