{
  "openapi": "3.0.1",
  "info": {
    "title": "Crypto Funding Rates & Open Interest Scraper",
    "description": "Funding rates, open interest and basis for every perpetual and future on Binance, Bybit, OKX, Hyperliquid, Deribit, Bitget, Gate, MEXC, KuCoin and dYdX. Funding normalized to 8h and APR, cross exchange funding arbitrage, long short ratios, Deribit options max pain and monitor alerts.",
    "version": "0.1",
    "x-build-id": "G1Vcp10a72dGcu2ys"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamole~crypto-funding-rates-open-interest/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamole-crypto-funding-rates-open-interest",
        "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/datamole~crypto-funding-rates-open-interest/runs": {
      "post": {
        "operationId": "runs-sync-datamole-crypto-funding-rates-open-interest",
        "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/datamole~crypto-funding-rates-open-interest/run-sync": {
      "post": {
        "operationId": "run-sync-datamole-crypto-funding-rates-open-interest",
        "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": {
          "exchanges": {
            "title": "Exchanges",
            "type": "array",
            "description": "Exchanges to scrape. Binance and Bybit block US servers and go through the proxy below.",
            "items": {
              "type": "string",
              "enum": [
                "binance",
                "bybit",
                "okx",
                "hyperliquid",
                "deribit",
                "bitget",
                "gate",
                "mexc",
                "kucoin",
                "dydx"
              ],
              "enumTitles": [
                "Binance",
                "Bybit",
                "OKX",
                "Hyperliquid",
                "Deribit",
                "Bitget",
                "Gate",
                "MEXC",
                "KuCoin",
                "dYdX"
              ]
            },
            "default": [
              "binance",
              "bybit",
              "okx",
              "hyperliquid",
              "deribit",
              "bitget",
              "gate",
              "mexc",
              "kucoin",
              "dydx"
            ]
          },
          "assets": {
            "title": "Coins (optional)",
            "type": "array",
            "description": "Coin tickers, for example BTC, ETH, SOL or PEPE. Bundled contracts like 1000PEPEUSDT or kPEPE count as PEPE. Empty means every coin.",
            "items": {
              "type": "string"
            }
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "Perpetual swaps, dated futures, or both. Dated futures get the basis annualized to their expiry.",
            "items": {
              "type": "string",
              "enum": [
                "perpetual",
                "future"
              ],
              "enumTitles": [
                "Perpetual swaps",
                "Dated futures"
              ]
            },
            "default": [
              "perpetual"
            ]
          },
          "margins": {
            "title": "Margin types",
            "type": "array",
            "description": "Linear contracts margined in USDT or USDC, inverse contracts margined in the coin itself, or both.",
            "items": {
              "type": "string",
              "enum": [
                "linear",
                "inverse"
              ],
              "enumTitles": [
                "Linear (USDT, USDC)",
                "Inverse (coin margined)"
              ]
            },
            "default": [
              "linear",
              "inverse"
            ]
          },
          "recordTypes": {
            "title": "Rows to save",
            "type": "array",
            "description": "Coin summaries compare each coin across exchanges, contracts give one row per contract and exchange, options give one row per Deribit expiry.",
            "items": {
              "type": "string",
              "enum": [
                "assets",
                "contracts",
                "options"
              ],
              "enumTitles": [
                "Coin summaries across exchanges",
                "Contracts",
                "Deribit options per expiry (BTC, ETH, SOL, XRP and more)"
              ]
            },
            "default": [
              "assets",
              "contracts"
            ]
          },
          "minVolume24hUsd": {
            "title": "Minimum 24h volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip contracts that traded less than this in the last 24 hours. 0 keeps all.",
            "default": 0
          },
          "minOpenInterestUsd": {
            "title": "Minimum open interest (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip contracts with less open interest than this. 0 keeps all.",
            "default": 0
          },
          "minAbsFundingApr": {
            "title": "Minimum funding APR, either sign (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only contracts whose yearly funding is at least this high, positive or negative. 30 keeps contracts above 30% or below -30%. Empty keeps all."
          },
          "onlySignals": {
            "title": "Only rows with signals",
            "type": "boolean",
            "description": "Keep only contracts and coins with at least one signal, such as extreme funding or funding arbitrage.",
            "default": false
          },
          "sortBy": {
            "title": "Sort contracts by",
            "enum": [
              "openInterest",
              "volume",
              "fundingHighest",
              "fundingLowest",
              "fundingAbsolute",
              "basisAbsolute"
            ],
            "type": "string",
            "description": "Order of the contract rows. Coin summaries are always sorted by open interest.",
            "default": "openInterest"
          },
          "extremeFundingApr": {
            "title": "Extreme funding at (% APR)",
            "minimum": 0,
            "type": "integer",
            "description": "Flag contracts whose yearly funding is at least this high or this low. 0 turns the signal off.",
            "default": 50
          },
          "arbitrageMinApr": {
            "title": "Funding arbitrage at (% APR)",
            "minimum": 0,
            "type": "integer",
            "description": "Flag coins whose funding differs by at least this much between two exchanges, a long and short pair that earns the gap. 0 turns the signal off.",
            "default": 20
          },
          "arbitrageMinVolumeUsd": {
            "title": "Arbitrage minimum 24h volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only contracts with this much 24h volume take part in the funding and price comparison, so thin markets do not create fake gaps.",
            "default": 1000000
          },
          "priceDislocationPercent": {
            "title": "Price dislocation at (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Flag coins whose mark price differs by at least this much between exchanges. 0 turns the signal off.",
            "default": 1
          },
          "includeLongShort": {
            "title": "Include long/short ratios",
            "type": "boolean",
            "description": "Share of accounts long and top trader ratio on Binance, Bybit and OKX for the 100 most traded contracts of each. Adds requests and time.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Schedule the run and every row gets the change in open interest, funding and price since the previous run, with open interest jump and funding flip signals.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Use different names to keep separate monitors. Runs with the same name share their memory."
          },
          "oiChangeAlertPercent": {
            "title": "Open interest alert at (%)",
            "minimum": 0,
            "type": "integer",
            "description": "In monitor mode, flag contracts and coins whose open interest moved at least this much since the previous run. 0 turns the signal off.",
            "default": 10
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of rows to save. Coin summaries come first, then contracts, then options. Empty means no limit."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used only for Binance and Bybit, which block US servers. A residential proxy outside the US works best. The other exchanges are called directly.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "DE"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}