{
  "openapi": "3.0.1",
  "info": {
    "title": "On-Chain Crypto Metrics API - Glassnode MVRV, SOPR, Flows",
    "description": "Pull Bitcoin and Ethereum on-chain metrics from the Glassnode API into a dataset: MVRV, SOPR, NUPL, exchange balances and flows, active addresses, supply, miner, futures, options and ETF data, bulk multi-asset snapshots, metric metadata and asset lists. Bring your own API key.",
    "version": "0.1",
    "x-build-id": "ejRb3bR49PVqAjkBM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~onchain-crypto-metrics-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-onchain-crypto-metrics-api",
        "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/nabeelbaghoor~onchain-crypto-metrics-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-onchain-crypto-metrics-api",
        "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/nabeelbaghoor~onchain-crypto-metrics-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-onchain-crypto-metrics-api",
        "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 read",
            "enum": [
              "metricSeries",
              "bulkMetric",
              "metricMetadata",
              "dataLag",
              "metricCatalog",
              "assets",
              "referenceList",
              "apiUsage"
            ],
            "type": "string",
            "description": "Metric time series reads each metric for each asset, one request per pair, as timestamped values. Bulk metric reads one metric for many assets (or all, with *) in one request over a window of up to 31 daily days. Metric metadata describes a metric: its assets, resolutions, exchanges, networks, time range and variants. Metric data lag shows how late new values arrive. The metric catalogue lists every metric path your filters allow. Assets lists Glassnode's assets with contracts and external IDs. Reference list reads exchanges, networks, miners or tags. API credit usage shows this month's credits.",
            "default": "metricSeries"
          },
          "metrics": {
            "title": "Metrics",
            "type": "array",
            "description": "Metric paths as the Glassnode docs list them below /v1/metrics, one per line, for example market/price_usd_close, market/mvrv, indicators/sopr, indicators/net_unrealized_profit_loss, addresses/active_count, distribution/balance_exchanges, transactions/transfers_volume_exchanges_net or derivatives/futures_open_interest_sum. The metric catalogue mode lists every path.",
            "items": {
              "type": "string"
            }
          },
          "assets": {
            "title": "Assets",
            "type": "array",
            "description": "Glassnode asset IDs such as BTC, ETH, SOL or USDT, one per line. The time series reads each asset separately (1 data credit for BTC, 2 for any other asset per request). Bulk metric reads them all in one request; * means every asset. Metric metadata and data lag narrow to an asset when one is set; the catalogue lists metrics those assets support.",
            "items": {
              "type": "string"
            }
          },
          "since": {
            "title": "Since",
            "type": "string",
            "description": "Start of the window: a date such as 2025-01-01, a UTC date and time, or a unix time in seconds. Leave empty to read the last lookback days. Set it to 2009-01-01 for full Bitcoin history."
          },
          "until": {
            "title": "Until",
            "type": "string",
            "description": "End of the window, in the same forms as Since. Leave empty for the latest value."
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many days back to read when Since is empty. A bulk request spans at most 10 days at 10m or 1h, 31 days at 24h and 93 days at 1w or 1month, so the bulk window is shortened to fit.",
            "default": 30
          },
          "resolution": {
            "title": "Resolution",
            "enum": [
              "24h",
              "1h",
              "10m",
              "1w",
              "1month"
            ],
            "type": "string",
            "description": "Data point interval. Each metric offers its own set and your plan decides which you may read; the Light API on the Advanced plan serves daily only. A metric with no daily resolution uses its only documented one.",
            "default": "24h"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "native",
              "usd"
            ],
            "type": "string",
            "description": "For metrics that take a currency, such as exchange balances, transfer volumes and open interest. Left off metrics that do not.",
            "default": "native"
          },
          "exchanges": {
            "title": "Exchanges",
            "type": "array",
            "description": "For metrics broken down by exchange, such as exchange balances, inflows, outflows and futures open interest. Names such as binance, coinbase, bybit, okex or aggregated, one per line. The time series reads each exchange separately; bulk reads them together. Left off metrics that take no exchange.",
            "items": {
              "type": "string"
            }
          },
          "networks": {
            "title": "Networks",
            "type": "array",
            "description": "For token metrics broken down by chain, such as stablecoin supply and balances. Names such as eth, arb, base, opt, sol, trx or aggregated, one per line; the provider defaults to eth. Left off metrics that take no network.",
            "items": {
              "type": "string"
            }
          },
          "extraParameters": {
            "title": "Extra metric parameters",
            "type": "object",
            "description": "Advanced. Drill-down parameters the Glassnode metadata documents, passed through verbatim: miner, maturity, period, quote_symbol, from_exchange and to_exchange, for example {\"miner\": \"foundry_usa\"} or {\"from_exchange\": \"binance\", \"to_exchange\": \"coinbase\"}. Use the metric metadata mode to see which a metric takes."
          },
          "assetFilter": {
            "title": "Asset filter (CEL)",
            "type": "string",
            "description": "Assets mode and the asset tag, category and blockchain lists. A Common Expression Language filter, for example asset.id=='USDT', asset.external_ids.coingecko=='tether', asset.blockchains.exists(b, b.blockchain=='ETH') or asset.semantic_tags.exists(t, t=='stablecoin')."
          },
          "listType": {
            "title": "Reference list",
            "enum": [
              "exchanges",
              "networks",
              "miners",
              "metricTags",
              "assetTags",
              "assetCategories",
              "assetBlockchains"
            ],
            "type": "string",
            "description": "Reference list mode. Which list to read.",
            "default": "exchanges"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for, across all metrics and assets. When one series is longer than the rows left, its newest points are kept.",
            "default": 500
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing. The provider allows 600 requests a minute by default and returns 429 above it, which the actor waits out and retries. The Light API is also capped at 50 calls a day.",
            "default": 120
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own Glassnode API key, from the API page of your Glassnode Studio settings. Stored as a secret and sent only in the X-Api-Key header; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}