Skip to content
Alchemy Logo

builderFills stream

Beta

HyperCore APIs are in beta. Message fields, limits, and behavior may change, including breaking changes. To request access, contact [email protected].

Fills for orders placed with one or more builder codes.

{
  "method": "subscribe",
  "subscriptionId": "builders_01",
  "subscription": {
    "type": "builderFills",
    "builders": [
      "0x2222222222222222222222222222222222222222"
    ]
  }
}

ParameterTypeRequiredDescription
buildersstring[]YesBuilder addresses. Always an array, even for one builder. 1 to 200 addresses.
fromBlockintegerNoReplay from this block (inclusive), then continue live. Omit for live only.
aggregateByTimebooleanNoMerge a taker order's partial fills in the same block. Default false.

Each fill includes the builder it was attributed to.

{
  "channel": "subscriptionResponse",
  "subscriptionId": "builders_01",
  "data": {
    "type": "builderFills",
    "builders": [
      "0x2222222222222222222222222222222222222222"
    ]
  }
}

Each message carries the fills from one block.

{
  "seq": 1,
  "channel": "builderFills",
  "subscriptionId": "builders_01",
  "data": {
    "blockNumber": 1183759646,
    "blockTime": 1791999593756,
    "fills": [
      [
        "0x654086857e1fad6dcf05cf6695cce51ea3984268",
        {
          "coin": "BTC",
          "px": "81772.0",
          "sz": "0.00067",
          "side": "B",
          "time": 1791999593756,
          "startPosition": "-0.37115",
          "dir": "Close Short",
          "closedPnl": "0.012",
          "hash": "0x5a1e...",
          "oid": 574446008493,
          "crossed": true,
          "fee": "0.0246",
          "tid": 87654321,
          "feeToken": "USDC",
          "twapId": null,
          "builder": "0x2222222222222222222222222222222222222222"
        }
      ]
    ]
  }
}
FieldDescription
data.blockNumberBlock the fills came from. Persist it to resume.
data.blockTimeBlock time, Unix milliseconds.
data.fillsArray of [user, fill] pairs.

FieldTypeDescription
coinstringMarket. See coin names.
pxstringExecution price.
szstringExecuted size.
sidestringB (buy) or A (sell), for this user.
timeintegerFill time, Unix milliseconds.
startPositionstringPosition size before the fill.
dirstringDisplay direction, for example Open Long or Close Short.
closedPnlstringRealized profit or loss from this fill.
hashstringTransaction hash.
oidintegerID of the order that filled.
crossedbooleantrue if this side was the taker.
feestringFee paid; negative for a rebate.
tidintegerTrade ID. Both sides of a trade share the same tid.
feeTokenstringToken the fee was paid in.
twapIdinteger or nullTWAP order ID, if the fill came from a TWAP.
liquidationobjectPresent on liquidation fills: liquidatedUser, markPx, method.
builderstringPresent when the order used a builder code.

Fill objects follow Hyperliquid's native fill format, so conditional fields such as builderFee, deployerFee, priorityGas, and cloid can also appear. Ignore fields you don't use.

aggregateByTime (default false) merges a taker order's partial fills within the same block into one record: sz, fee, closedPnl, and, when present, builderFee, deployerFee, and priorityGas are summed, and px is the size-weighted average price, which isn't rounded to the tick size. Other fields, including tid, hash, and startPosition, come from the first partial fill. Maker fills are never merged.

Pass fromBlock to replay from a recent block, inclusive. After a disconnect, resubscribe with fromBlock set to the last processed blockNumber plus one and deduplicate on tid plus user. If the block is older than the replay window, you receive a gap message for the missing range, then data from the oldest available block. See replay and recovery.

{"method":"unsubscribe","subscriptionId":"builders_01"}
Was this page helpful?