{
  "openapi": "3.0.1",
  "info": {
    "title": "Crypto Exchange Market Data — Spot, Perps, Futures & Options",
    "description": "Public market data from 11 crypto exchanges (Binance, Bybit, OKX, Bitget, Gate, KuCoin, MEXC, Coinbase, Kraken, Deribit, Hyperliquid) in one row shape: tickers, funding, open interest, candles, order books, options greeks, tokenized stocks and TradFi perps.",
    "version": "0.1",
    "x-build-id": "AbfRRG3bXYWPISGUO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~crypto-exchange-market-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-crypto-exchange-market-data",
        "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/teodor_banea~crypto-exchange-market-data/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-crypto-exchange-market-data",
        "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/teodor_banea~crypto-exchange-market-data/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-crypto-exchange-market-data",
        "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": "What to get",
            "enum": [
              "tickers",
              "instruments",
              "fundingHistory",
              "candles",
              "orderBook",
              "openInterestHistory"
            ],
            "type": "string",
            "description": "Choose the data to return. Tickers = a price/volume/open-interest/funding snapshot of every selected market. Instruments = contract specs. The other modes read history for up to Maximum markets markets.",
            "default": "tickers"
          },
          "exchanges": {
            "title": "Exchanges",
            "type": "array",
            "description": "Select the exchanges to read. Leave empty for all 11.",
            "items": {
              "type": "string",
              "enum": [
                "binance",
                "bybit",
                "okx",
                "bitget",
                "gate",
                "kucoin",
                "mexc",
                "coinbase",
                "kraken",
                "deribit",
                "hyperliquid"
              ],
              "enumTitles": [
                "Binance",
                "Bybit",
                "OKX",
                "Bitget",
                "Gate",
                "KuCoin",
                "MEXC",
                "Coinbase",
                "Kraken",
                "Deribit",
                "Hyperliquid"
              ]
            },
            "default": [
              "binance",
              "bybit",
              "okx",
              "bitget",
              "gate",
              "kucoin",
              "mexc",
              "coinbase",
              "kraken",
              "deribit",
              "hyperliquid"
            ]
          },
          "marketTypes": {
            "title": "Market types",
            "type": "array",
            "description": "Select the market types. Options are left out by default (about 15,000 markets across venues) — add them when you need them. X Perps are OKX's 5-year contracts that pay funding.",
            "items": {
              "type": "string",
              "enum": [
                "spot",
                "perpetual",
                "xperp",
                "future",
                "option"
              ],
              "enumTitles": [
                "Spot",
                "Perpetual swaps",
                "X Perps (OKX 5-year funding contracts)",
                "Dated futures",
                "Options"
              ]
            },
            "default": [
              "spot",
              "perpetual",
              "xperp",
              "future"
            ]
          },
          "underlyingTypes": {
            "title": "Underlying types",
            "type": "array",
            "description": "Keep only markets on these underlyings, e.g. Stocks for tokenized stocks and stock perps on every venue. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "crypto",
                "stock",
                "etf",
                "index",
                "commodity",
                "fx",
                "preipo",
                "rates",
                "other"
              ],
              "enumTitles": [
                "Crypto",
                "Stocks",
                "ETFs",
                "Indices",
                "Commodities and metals",
                "Forex",
                "Pre-IPO companies",
                "Interest rates",
                "Other non-crypto"
              ]
            }
          },
          "baseAssets": {
            "title": "Base assets",
            "type": "array",
            "description": "Keep only markets whose base asset or underlying ticker is one of these (case-insensitive). AAPL matches AAPLX, rAAPL, xyz:AAPL and AAPL stock perps. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "quoteAssets": {
            "title": "Quote assets",
            "type": "array",
            "description": "Keep only markets quoted in these assets, e.g. USDT, USDC or USD. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "symbols": {
            "title": "Symbols",
            "type": "array",
            "description": "Add specific markets by native symbol (BTC-USDT-SWAP, BTCUSDT, PF_XBTUSD) or unified symbol (BTC/USDT:USDT). With no other filter set, only these markets are read.",
            "items": {
              "type": "string"
            }
          },
          "minVolume24hUsd": {
            "title": "Minimum 24h volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only markets that traded at least this much in the last 24 hours (USD). Leave empty for no minimum."
          },
          "interval": {
            "title": "Interval",
            "enum": [
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "4h",
              "1d",
              "1w"
            ],
            "type": "string",
            "description": "Choose the candle interval (Candles) or the sampling interval (Open-interest history). Venues that lack an interval skip it with a warning.",
            "default": "1d"
          },
          "startDate": {
            "title": "From",
            "type": "string",
            "description": "Enter the start of the history window (UTC date) or a period such as \"90 days\". Default: 30 days ago."
          },
          "endDate": {
            "title": "To",
            "type": "string",
            "description": "Enter the end of the history window (UTC date). Leave empty for now."
          },
          "orderBookDepth": {
            "title": "Order book depth",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Set the levels per side for Order books. Hyperliquid always publishes 20.",
            "default": 20
          },
          "maxMarkets": {
            "title": "Maximum markets",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit the markets read in the history modes (taken by 24h volume, in turn from each exchange).",
            "default": 10
          },
          "enrichPerMarket": {
            "title": "Include per-market details",
            "type": "boolean",
            "description": "Read details that venues only publish per market: Binance futures open interest, Deribit option greeks and bid/ask sizes, Hyperliquid best bid/ask and Coinbase spot bid/ask. Up to 500 extra calls per exchange — narrow the filters to cover every market.",
            "default": true
          },
          "includeCrossExchangeStats": {
            "title": "Include cross-exchange price stats",
            "type": "boolean",
            "description": "Add the cross-exchange median price, each market's deviation from it and the number of exchanges listing the asset (tickers only).",
            "default": true
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Limit the rows returned. Tickers and Instruments keep the most traded markets of each exchange in turn. 0 = unlimited (capped at 200,000).",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}