FUNCTOR API

API reference · testnet

Explorer and replay

Look up any block, transaction or account, and re-execute every block yourself. Hyperliquid's node is closed source; here anyone can check that the published history and the published code agree.

Requests

POST /explorer with a JSON body whose type selects the request. blockDetails, txDetails and userDetails use Hyperliquid's request and response shapes, so Hyperliquid explorer tools work with a changed URL. Errors answer 400 (malformed) or 404 (not found, or no longer retained) with {"error": "…"}.

blockDetails Hyperliquid-compatible

One block: height, blockTime, hash, proposer, numTxs and txs (Hyperliquid's fields), plus prevHash, stateRoot, systemTxs (counts of the oracle update, market-maker and unwind transactions, which the node generates itself and replay recomputes) and prices (the oracle prices, in ticks). txs lists the oracle update and every user and faucet transaction in block order, then node-level actions (approveAgent). Headers are kept 30 days.

FieldTypeRequired
heightinteger ≥ 1yes

IP weight

2

Request

{
  "type": "blockDetails",
  "height": 111
}

Response

{
  "type": "blockDetails",
  "blockDetails": {
    "blockTime": 1793872031657,
    "hash": "0xc198a17f78665abebf7ac2076f7ff9b92cdc981eedb63e8c84a52900aad10468",
    "height": 111,
    "numTxs": 130,
    "prevHash": "0x39604cd5e186dc96b7fa43db5344d51c53e96ff77003d5d3fa7ed0ba1a2639e4",
    "prices": [
      [
        0,
        80314
      ],
      [
        1,
        24135
      ]
    ],
    "proposer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
    "stateRoot": "0x56ceb2291d07e50bb45139dfc4cd95d6b31a65d9954a594222e203b92ab96568",
    "systemTxs": {
      "flpUnwind": 0,
      "marketMaker": 128,
      "oracle": 1,
      "strategies": 0
    },
    "txs": [
      {
        "action": {
          "prices": [
            [
              "BTC",
              80314
            ],
            [
              "ETH",
              24135
            ]
          ],
          "type": "oraclePrices"
        },
        "block": 111,
        "error": null,
        "hash": "0x89318cae10cdc0d373f8c680b402a071958481fda5b626fd94cbc8d2f2c57d71",
        "index": 0,
        "input": null,
        "kind": "oracle",
        "pq": false,
        "sender": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
        "signer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
        "time": 1793872031657,
        "user": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3"
      },
      {
        "action": {
          "account": "0x152ba6647eaac163e28a51c787656c4cf627c3d1",
          "isBuy": true,
          "market": 0,
          "price": 76305,
          "reduceOnly": false,
          "size": 10,
          "tif": "Gtc",
          "type": "order"
        },
        "block": 111,
        "error": "TooManyOpenOrdersForEquity { open: 0, limit: 0 }",
        "hash": "0xe5d812961f51719972b4a9c5fc489869574292859ad71651dd606fce9f3cf1ff",
        "index": 129,
        "input": "{\"ByAgent\":{\"agent\":\"0x68d3477d16e5fc8ceb3d0cefad5cc32087f7b800\",\"action\":{\"PlaceOrder\":{\"market\":0,\"side\":\"Bid\",\"limit\":76305,\"size\":10,\"tif\":\"Gtc\",\"reduce_only\":false}}}}",
        "kind": "user",
        "pq": false,
        "sender": "0x152ba6647eaac163e28a51c787656c4cf627c3d1",
        "signer": "0x68d3477d16e5fc8ceb3d0cefad5cc32087f7b800",
        "time": 1793872031657,
        "user": "0x152ba6647eaac163e28a51c787656c4cf627c3d1"
      }
    ]
  }
}

txDetails Hyperliquid-compatible

One transaction by hash: time, user, action (as signed), block, hash, error (null or why it failed in its block), plus index (position in the block), signer (the key that signed: the wallet or its session key), sender and input (the exact chain action, as JSON text) and kind (user, faucet, node). The hash is returned by /exchange when you submit. Kept permanently.

FieldTypeRequired
hash0x + 64 hexyes

IP weight

2

Request

{
  "type": "txDetails",
  "hash": "0xe5d812961f51719972b4a9c5fc489869574292859ad71651dd606fce9f3cf1ff"
}

Response

{
  "type": "txDetails",
  "tx": {
    "action": {
      "account": "0x152ba6647eaac163e28a51c787656c4cf627c3d1",
      "isBuy": true,
      "market": 0,
      "price": 76305,
      "reduceOnly": false,
      "size": 10,
      "tif": "Gtc",
      "type": "order"
    },
    "block": 111,
    "error": "TooManyOpenOrdersForEquity { open: 0, limit: 0 }",
    "hash": "0xe5d812961f51719972b4a9c5fc489869574292859ad71651dd606fce9f3cf1ff",
    "index": 129,
    "input": "{\"ByAgent\":{\"agent\":\"0x68d3477d16e5fc8ceb3d0cefad5cc32087f7b800\",\"action\":{\"PlaceOrder\":{\"market\":0,\"side\":\"Bid\",\"limit\":76305,\"size\":10,\"tif\":\"Gtc\",\"reduce_only\":false}}}}",
    "kind": "user",
    "pq": false,
    "sender": "0x152ba6647eaac163e28a51c787656c4cf627c3d1",
    "signer": "0x68d3477d16e5fc8ceb3d0cefad5cc32087f7b800",
    "time": 1793872031657,
    "user": "0x152ba6647eaac163e28a51c787656c4cf627c3d1"
  }
}

userDetails Hyperliquid-compatible

An account's newest 300 transactions, newest first (Hyperliquid's limit).

FieldTypeRequired
useraddressyes

IP weight

4

Request

{
  "type": "userDetails",
  "user": "0x152ba6647eaac163e28a51c787656c4cf627c3d1"
}

Response

{
  "type": "userDetails",
  "txs": [
    {
      "action": {
        "account": "0x152ba6647eaac163e28a51c787656c4cf627c3d1",
        "isBuy": true,
        "market": 0,
        "price": 76305,
        "reduceOnly": false,
        "size": 10,
        "tif": "Gtc",
        "type": "order"
      },
      "block": 111,
      "error": "TooManyOpenOrdersForEquity { open: 0, limit: 0 }",
      "hash": "0xe5d812961f51719972b4a9c5fc489869574292859ad71651dd606fce9f3cf1ff",
      "index": 129,
      "input": "{\"ByAgent\":{\"agent\":\"0x68d3477d16e5fc8ceb3d0cefad5cc32087f7b800\",\"action\":{\"PlaceOrder\":{\"market\":0,\"side\":\"Bid\",\"limit\":76305,\"size\":10,\"tif\":\"Gtc\",\"reduce_only\":false}}}}",
      "kind": "user",
      "pq": false,
      "sender": "0x152ba6647eaac163e28a51c787656c4cf627c3d1",
      "signer": "0x68d3477d16e5fc8ceb3d0cefad5cc32087f7b800",
      "time": 1793872031657,
      "user": "0x152ba6647eaac163e28a51c787656c4cf627c3d1"
    },
    {
      "action": {
        "account": "0x152ba6647eaac163e28a51c787656c4cf627c3d1",
        "isBuy": true,
        "market": 0,
        "price": 82690,
        "reduceOnly": false,
        "size": 10,
        "tif": "Ioc",
        "type": "order"
      },
      "block": 101,
      "error": "Ch(InsufficientMargin)",
      "hash": "0xe264bd972dad5f76954d225a6e21d44f3bdbbe1a4619313136622e12236a5cf8",
      "index": 129,
      "input": "{\"ByAgent\":{\"agent\":\"0x68d3477d16e5fc8ceb3d0cefad5cc32087f7b800\",\"action\":{\"PlaceOrder\":{\"market\":0,\"side\":\"Bid\",\"limit\":82690,\"size\":10,\"tif\":\"Ioc\",\"reduce_only\":false}}}}",
      "kind": "user",
      "pq": false,
      "sender": "0x152ba6647eaac163e28a51c787656c4cf627c3d1",
      "signer": "0x68d3477d16e5fc8ceb3d0cefad5cc32087f7b800",
      "time": 1793872001444,
      "user": "0x152ba6647eaac163e28a51c787656c4cf627c3d1"
    }
  ]
}

recentBlocks

The newest blocks, newest first, each in the blockDetails shape.

FieldTypeRequired
nintegerno (default 20, at most 50)

IP weight

2

Request

{
  "type": "recentBlocks",
  "n": 2
}

Response

{
  "type": "recentBlocks",
  "blocks": [
    {
      "blockTime": 1793872145102,
      "hash": "0x510240df300b2805dc4c6bebc9bf15d5234a066a19f566fe2e5457f664cd95c8",
      "height": 144,
      "numTxs": 129,
      "prevHash": "0x4f280e04ea750f9ef7bdf036ea569fe7eb3897183de7b49f2d3f58ca8d912ab5",
      "prices": [
        [
          0,
          80360
        ],
        [
          1,
          24151
        ]
      ],
      "proposer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
      "stateRoot": "0x55896e5760a12bde558b526c3647ad7168052609c9caf0f10d414310b07eec93",
      "systemTxs": {
        "flpUnwind": 0,
        "marketMaker": 128,
        "oracle": 1,
        "strategies": 0
      },
      "txs": [
        {
          "action": {
            "prices": [
              [
                "BTC",
                80360
              ],
              [
                "ETH",
                24151
              ]
            ],
            "type": "oraclePrices"
          },
          "block": 144,
          "error": null,
          "hash": "0x4ea92ea454bf2093bb5d5a6b83bd09a93c07ff0ac2ad1c1c3ab79a1a1c8d4975",
          "index": 0,
          "input": null,
          "kind": "oracle",
          "pq": false,
          "sender": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
          "signer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
          "time": 1793872145102,
          "user": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3"
        }
      ]
    },
    {
      "blockTime": 1793872141380,
      "hash": "0x4f280e04ea750f9ef7bdf036ea569fe7eb3897183de7b49f2d3f58ca8d912ab5",
      "height": 143,
      "numTxs": 129,
      "prevHash": "0xfc366e49edc926de8fad467ed62d38581a7ffcd390cefb988afcf8612cf82617",
      "prices": [
        [
          0,
          80300
        ],
        [
          1,
          24132
        ]
      ],
      "proposer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
      "stateRoot": "0xd40d54bd94868de325d904a6498c62a627bd0b38f08fadc34078809631546e97",
      "systemTxs": {
        "flpUnwind": 0,
        "marketMaker": 128,
        "oracle": 1,
        "strategies": 0
      },
      "txs": [
        {
          "action": {
            "prices": [
              [
                "BTC",
                80300
              ],
              [
                "ETH",
                24132
              ]
            ],
            "type": "oraclePrices"
          },
          "block": 143,
          "error": null,
          "hash": "0xac4fab1c34b6c6c8be0b5e0a182e4e60f26744f8fd16f62be732bb1d655fb3c7",
          "index": 0,
          "input": null,
          "kind": "oracle",
          "pq": false,
          "sender": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
          "signer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
          "time": 1793872141380,
          "user": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3"
        }
      ]
    }
  ]
}

replayInputs

Full records of a range of blocks, for re-executing them (see Replay below).

FieldTypeRequired
fromheightyes
toheight ≥ from, at most 500 blocksyes

IP weight

20

Request

{
  "type": "replayInputs",
  "from": 143,
  "to": 144
}

Response

{
  "type": "replayInputs",
  "blocks": [
    {
      "blockTime": 1793872141380,
      "hash": "0x4f280e04ea750f9ef7bdf036ea569fe7eb3897183de7b49f2d3f58ca8d912ab5",
      "height": 143,
      "numTxs": 129,
      "prevHash": "0xfc366e49edc926de8fad467ed62d38581a7ffcd390cefb988afcf8612cf82617",
      "prices": [
        [
          0,
          80300
        ],
        [
          1,
          24132
        ]
      ],
      "proposer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
      "stateRoot": "0xd40d54bd94868de325d904a6498c62a627bd0b38f08fadc34078809631546e97",
      "systemTxs": {
        "flpUnwind": 0,
        "marketMaker": 128,
        "oracle": 1,
        "strategies": 0
      },
      "txs": [
        {
          "action": {
            "prices": [
              [
                "BTC",
                80300
              ],
              [
                "ETH",
                24132
              ]
            ],
            "type": "oraclePrices"
          },
          "block": 143,
          "error": null,
          "hash": "0xac4fab1c34b6c6c8be0b5e0a182e4e60f26744f8fd16f62be732bb1d655fb3c7",
          "index": 0,
          "input": null,
          "kind": "oracle",
          "pq": false,
          "sender": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
          "signer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
          "time": 1793872141380,
          "user": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3"
        }
      ]
    },
    {
      "blockTime": 1793872145102,
      "hash": "0x510240df300b2805dc4c6bebc9bf15d5234a066a19f566fe2e5457f664cd95c8",
      "height": 144,
      "numTxs": 129,
      "prevHash": "0x4f280e04ea750f9ef7bdf036ea569fe7eb3897183de7b49f2d3f58ca8d912ab5",
      "prices": [
        [
          0,
          80360
        ],
        [
          1,
          24151
        ]
      ],
      "proposer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
      "stateRoot": "0x55896e5760a12bde558b526c3647ad7168052609c9caf0f10d414310b07eec93",
      "systemTxs": {
        "flpUnwind": 0,
        "marketMaker": 128,
        "oracle": 1,
        "strategies": 0
      },
      "txs": [
        {
          "action": {
            "prices": [
              [
                "BTC",
                80360
              ],
              [
                "ETH",
                24151
              ]
            ],
            "type": "oraclePrices"
          },
          "block": 144,
          "error": null,
          "hash": "0x4ea92ea454bf2093bb5d5a6b83bd09a93c07ff0ac2ad1c1c3ab79a1a1c8d4975",
          "index": 0,
          "input": null,
          "kind": "oracle",
          "pq": false,
          "sender": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
          "signer": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3",
          "time": 1793872145102,
          "user": "0xf3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3"
        }
      ]
    }
  ]
}

genesis

What replay starts from: genesisMs, founder, networkVersion, strategySeed (the Trend strategy's daily-close history the node was given before block 1, market id → [day, price], with its strategySeedSource; replay applies it, since the strategies' orders are recomputed), the retained header range (oldestHeader, newestHeader) and the daily checkpoints (height, stateRoot, url).

IP weight

2

Request

{
  "type": "genesis"
}

Response

{
  "type": "genesis",
  "genesisMs": 1793871799580,
  "founder": "0xf6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6",
  "networkVersion": "v10-btc-spot",
  "strategySeed": {
    "0": [
      [
        20633,
        59474.01
      ],
      [
        20634,
        60162.73
      ]
    ],
    "1": [
      [
        20633,
        1569.41
      ],
      [
        20634,
        1610.62
      ]
    ],
    "2": [
      [
        20633,
        71.28
      ],
      [
        20634,
        75.05
      ]
    ]
  },
  "strategySeedSource": "Coinbase daily candles (api.exchange.coinbase.com), closes at 00:00 UTC",
  "oldestHeader": 1,
  "newestHeader": 144,
  "checkpoints": [
    {
      "height": 0,
      "stateRoot": "0x66f8564d365c51c914396aff530e51747494db211f136d72d5126fcd03491ef9",
      "time": 1793871799633,
      "url": "/checkpoint/0"
    }
  ]
}

What is kept

DataKept
Block headers, with the oracle prices30 days
User, faucet and node-level transactionspermanently
Daily checkpoints of the whole statethe newest 30
Market-maker and unwind transactionsnot stored: the node generates them, and replay recomputes them exactly

Replay: check every block yourself

Each block's inputs are its time, its oracle prices (in ticks) and its user transactions in order; the market maker's and the strategies' orders are recomputed from them. A node that starts from genesis (genesis, with its strategySeed applied before block 1) or from a checkpoint (GET /checkpoint/<height>, whose state root must equal that block's header) and re-executes the inputs must produce every block's hash and stateRoot exactly. The reference tool uses the same WebAssembly node the test node runs:

node testnet/replay.mjs                       # the newest 200 blocks
node testnet/replay.mjs --from 1 --to 5000    # from genesis, while it is retained

It reports the first block whose hash or state root differs, if any. Transaction hashes: a signed request's is keccak256(EIP-712 digest ‖ signature), returned by /exchange when you submit.

Generated from the node's source code by tools/api-docs.mjs; examples are real responses from https://api.functorfund.com. Questions: Telegram. Changes: News.

On this page

RequestsblockDetailstxDetailsuserDetailsrecentBlocksreplayInputsgenesisWhat is keptReplay