{
  "openapi": "3.0.1",
  "info": {
    "title": "Live Order Book Heatmap & Order Flow",
    "description": "Live liquidity heatmap, CVD, book imbalance and liquidations from Binance, Bybit, OKX and BingX in one run. Pay per minute recorded.",
    "version": "0.1",
    "x-build-id": "XpryvusmGHE3iIAsD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gleaming_carp~orderbook-heatmap-live/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gleaming_carp-orderbook-heatmap-live",
        "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/gleaming_carp~orderbook-heatmap-live/runs": {
      "post": {
        "operationId": "runs-sync-gleaming_carp-orderbook-heatmap-live",
        "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/gleaming_carp~orderbook-heatmap-live/run-sync": {
      "post": {
        "operationId": "run-sync-gleaming_carp-orderbook-heatmap-live",
        "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",
        "required": [
          "symbol"
        ],
        "properties": {
          "symbol": {
            "title": "Symbol",
            "type": "string",
            "description": "USDT-margined pair, e.g. BTCUSDT, ETHUSDT, SOLUSDT. Formats like BTC-USDT, BTC/USDT or BTC-USDT-SWAP are accepted.",
            "default": "BTCUSDT"
          },
          "exchanges": {
            "title": "Exchanges",
            "type": "array",
            "description": "Exchanges to stream live (USDT perpetual futures). Binance USD-M futures may be geo-blocked on the server: the Actor then adds Binance spot through Binance's official market-data endpoints and/or another exchange (see 'Automatic fallback').",
            "items": {
              "type": "string",
              "enum": [
                "binance",
                "bybit",
                "okx",
                "bingx"
              ],
              "enumTitles": [
                "Binance (USD-M futures)",
                "Bybit (USDT perpetual)",
                "OKX (USDT swap)",
                "BingX (USDT perpetual, no liquidations feed)"
              ]
            },
            "default": [
              "binance",
              "bybit"
            ]
          },
          "durationMinutes": {
            "title": "Recording duration (minutes)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How long to record live data. You are charged one 'snapshot' event per recorded minute.",
            "default": 1
          },
          "depthLevels": {
            "title": "Order book depth (levels per side)",
            "minimum": 20,
            "maximum": 5000,
            "type": "integer",
            "description": "Price levels per side to use from each book. Each exchange delivers what it supports: Bybit 50/200/1000, OKX 400 by websocket or up to 5000 by REST, Binance 1000 snapshot plus live diffs, BingX up to 1000.",
            "default": 1000
          },
          "priceBucket": {
            "title": "Price bucket size",
            "type": "string",
            "description": "Group resting liquidity into price buckets of this size in quote currency (e.g. 5 for BTC, 0.1 for ETH). Leave empty for automatic (about 0.006% of the price)."
          },
          "priceRangePct": {
            "title": "Heatmap price range (± % of price)",
            "type": "string",
            "description": "Vertical range of the heatmap around the price, e.g. 0.3 = ±0.3%. Leave empty for automatic (±0.15% for 1 minute, wider for longer runs, limited to what the books cover)."
          },
          "bigTradeMinUsd": {
            "title": "Big trade threshold (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Trades at or above this notional are drawn as bubbles and counted as big trades. 0 = automatic (99.5th percentile of trade sizes, at least 10,000 USD).",
            "default": 0
          },
          "sampleIntervalSec": {
            "title": "Book sampling interval (seconds)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How often the order books are sampled into the heatmap and metrics.",
            "default": 1
          },
          "autoFallback": {
            "title": "Automatic fallback",
            "type": "boolean",
            "description": "If none of the selected exchanges is reachable, add Bybit, OKX or BingX automatically; if Binance futures is blocked, add Binance spot via its official market-data endpoints. Recommended.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}