dex

Get Historical Time Series

Retrieves a chronological series of historical price data (transaction hash, timestamp, trade price) for a specified DEX pool. This time series data supports thorough price analysis, backtesting, and liquidity monitoring, enabling more informed DeFi strategies.

💡 Compute Unit Value: 100 (Fixed)

get/defi/v1/dex/gethistoricaltimeseries

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/dex/gethistoricaltimeseries
  • Auth
    API key in header X-API-Key

Query parameters

dexId'1000' | '1300' | '1305' | '1306' | '1307' | '1308' | '1309' | '1100' | '1200' | '1201'

The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more here.

Example:1000
endBlockstring

Last block of the range.

Example:100010
startBlockstring

Starting block of the range.

Example:100000
poolAddressstring required

Pool address whose liquidity is to be fetched.

Example:0xfad57d2039c21811c8f2b5d5b65308aa99d31559

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "pair": "WBTC/WETH",
    "priceData": [
      {
        "hash": "0xab976730855f2319b3713478799f7aad6027419eba6f3788256b354ed0432381",
        "timestamp": 1703757971,
        "price": "17.99472597437422"
      },
      {
        "hash": "0x37d7a68ba4e4c9cd2e254108f40a7823e8eb9821ff5d6d3745801c6513732b78",
        "timestamp": 1703755007,
        "price": "18.010292734804654"
      },
      {
        "hash": "0xb5fcf54cba69bff0185ceda061d7308d56ec471a4113f4f4e1f2ee04e28523e1",
        "timestamp": 1703753111,
        "price": "18.025965450635685"
      },
      {
        "hash": "0x06b4e398e852f6cbd4e08450703f757d75c0d685d1038380c79cd04fe27bb836",
        "timestamp": 1703752775,
        "price": "18.02635771905701"
      },
      {
        "hash": "0x5421f0b31d5e7538307b2971eeb98df755ced06d650174050d8fd29429a9eb80",
        "timestamp": 1703747675,
        "price": "18.132953404785805"
      },
      {
        "hash": "0xf05259997b701905248694f0d4cc3e45194819e7bc9bb16d706e25618dfcea90",
        "timestamp": 1703747579,
        "price": "18.128817077523507"
      },
      {
        "hash": "0xc067a858610595cf81a8c076f98931e998c324c1be6cc1c4df43691d93e067e5",
        "timestamp": 1703741147,
        "price": "18.11268829405827"
      },
      {
        "hash": "0xee1a68eef523811d1e865b2dfed610666c45982a6b0c30231488f41b033353b2",
        "timestamp": 1703740199,
        "price": "18.076013983785323"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.