> ## Documentation Index
> Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# userTwapSliceFills | Hyperliquid Info API

> Hyperliquid userTwapSliceFills: fetch a user's most recent TWAP slice fills for execution-quality analytics on algorithmic orders.

<CardGroup cols={2}>
  <Card title="Credit Cost"> 1 per call</Card>
  <Card title="Processing"> Realtime</Card>
</CardGroup>

The Hyperliquid info endpoint with `type: "userTwapSliceFills"` is used to fetch a user's most recent TWAP slice fills for execution-quality analytics on algorithmic orders.

<Tip>
  Estimate your monthly cost for this API using the [Pricing Calculator](/pricing-calculator?endpoint=%2Fapi-reference%2Fhyperliquid-info%2Fuser-twap-slice-fills).
</Tip>

<Info>
  * Wire-equal to `POST api.hyperliquid.xyz/info` with `{"type": "userTwapSliceFills", "user": "..."}`.
  * Each response contains at most 2,000 most recent TWAP slice fills. Older slices beyond that window are not retrievable from this endpoint.
  * TWAP slice fills have a `hash` of all zeros - use that, or the presence of `twapId`, to distinguish them from regular fills.
  * Use <a href="https://goldrush.dev/docs/api-reference/hyperliquid-info/user-fills-by-time" target="_blank" rel="noopener noreferrer">`userFillsByTime`</a> when you want all fills (regular + TWAP slices) for a wallet within a time window; each TWAP slice there carries the same `twapId` field.
</Info>

Returns a single user’s most recent TWAP slice fills - each individual slice executed as part of a larger TWAP (Time-Weighted Average Price) order. Every entry is a `{fill, twapId}` pair, where `twapId` ties the slice back to its parent TWAP order. Multiple slices from the same TWAP share the same `twapId`.

User-keyed. Use this when you want execution-quality data for TWAP orders specifically - slippage per slice, fills-per-TWAP, realized average price - rather than the unified fills feed from [userFillsByTime](https://goldrush.dev/docs/api-reference/hyperliquid-info/user-fills-by-time).

## Endpoint

```
POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json
```

## Request

<ParamField body="type" type="string" required>
  Always `"userTwapSliceFills"`.
</ParamField>

<ParamField body="user" type="string" required>
  The wallet address (lowercase 0x-prefixed hex).
</ParamField>

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://hypercore.goldrushdata.com/info \
    -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "type": "userTwapSliceFills",
      "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b"
    }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch("https://hypercore.goldrushdata.com/info", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${process.env.GOLDRUSH_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      type: "userTwapSliceFills",
      user: "0x31ca8395cf837de08b24da3f660e77761dfb974b",
    }),
  });

  const slices = await response.json();
  ```

  ```python Python theme={null}
  import os, requests

  response = requests.post(
      "https://hypercore.goldrushdata.com/info",
      headers={"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"},
      json={
          "type": "userTwapSliceFills",
          "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
      },
  )

  slices = response.json()
  ```
</CodeGroup>

## Response

An array of TWAP slice fill objects, most recent first.

```json theme={null}
[
  {
    "fill": {
      "closedPnl": "0.0",
      "coin": "AVAX",
      "crossed": true,
      "dir": "Open Long",
      "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "oid": 90542681,
      "px": "18.435",
      "side": "B",
      "startPosition": "26.86",
      "sz": "93.53",
      "time": 1681222254710,
      "fee": "0.01",
      "feeToken": "USDC",
      "tid": 118906512037719
    },
    "twapId": 3156
  }
]
```

### Field descriptions

<Note>
  All numeric `fill` fields (`px`, `sz`, `startPosition`, `closedPnl`, `fee`) are returned as **decimal strings**, preserving upstream precision. Do not parse them as floats - keep them as strings or use a fixed-precision decimal type.
</Note>

<ResponseField name="fill" type="object">
  The slice's fill payload - the same shape as one entry from [`userFillsByTime`](/api-reference/hyperliquid-info/user-fills-by-time).

  <Expandable title="properties">
    <ResponseField name="coin" type="string">Asset symbol - e.g. `"BTC"`, `"ETH"` for perps; spot pairs use the `@N` form (e.g. `"@107"`).</ResponseField>
    <ResponseField name="px" type="string">Fill execution price for this slice.</ResponseField>
    <ResponseField name="sz" type="string">Slice fill size.</ResponseField>
    <ResponseField name="side" type="string">`"B"` for buy/long, `"A"` for ask/short.</ResponseField>
    <ResponseField name="time" type="int">Unix timestamp in milliseconds when the slice executed.</ResponseField>
    <ResponseField name="startPosition" type="string">Signed position size on the same coin immediately before this slice.</ResponseField>
    <ResponseField name="dir" type="string">Human-readable direction label - e.g. `"Open Long"`, `"Close Short"`, `"Buy"`, `"Sell"`.</ResponseField>
    <ResponseField name="closedPnl" type="string">Realized PnL in USDC attributable to this slice (zero when the slice opens or extends a position).</ResponseField>
    <ResponseField name="hash" type="string">All-zero (`0x000…000`) for TWAP slice fills - the distinguishing marker versus regular fills, which carry an L1 transaction hash.</ResponseField>
    <ResponseField name="oid" type="int">Order ID for the slice.</ResponseField>
    <ResponseField name="tid" type="int">Unique trade ID for the slice.</ResponseField>
    <ResponseField name="crossed" type="boolean">`true` when the slice came from the taker side, `false` when it was the maker side.</ResponseField>
    <ResponseField name="fee" type="string">Trading fee paid for this slice, denominated in `feeToken`.</ResponseField>
    <ResponseField name="feeToken" type="string">Symbol the fee was paid in - typically `"USDC"`.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="twapId" type="int">Identifier of the parent TWAP order. Multiple slice fills from the same TWAP share this value - group by `twapId` to reconstruct per-TWAP execution.</ResponseField>

## Related endpoints

<CardGroup cols={2}>
  <Card title="userTwapSliceFillsByTime" href="/api-reference/hyperliquid-info/user-twap-slice-fills-by-time">fetch a user's TWAP slice fills within a time window for execution-quality reconciliation on algorithmic…</Card>
  <Card title="userFills" href="/api-reference/hyperliquid-info/user-fills">fetch a user's most recent trade fills without specifying a time window.</Card>
  <Card title="userFillsByTime" href="/api-reference/hyperliquid-info/user-fills-by-time">fetch a user’s trade fills within a time window for P\&L recaps and tax ledger reconstruction.</Card>
  <Card title="builderFills" href="/api-reference/hyperliquid-info/builder-fills">fetch a builder’s most recent attributed trade fills for revenue attribution and order-flow analytics.</Card>
</CardGroup>

*Last reviewed: 2026-06-13*
