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

# getRunningTwaps

> Read a venue's currently running TWAP parent orders directly from the provider plugin

Fetch the account's currently running TWAP parent orders directly from a registered provider plugin. Child slice orders are excluded — only the parent appears.

<Info>
  The examples on this page use **Hyperliquid** (`provider: 'hyperliquid'`). Replace the `provider` value with any supported DEX from `getProviders()`.
</Info>

`getRunningTwaps` is an optional capability on the `PerpsProvider` plugin interface — not every registered provider implements it. Call it through the plugin instance resolved from the client, the same way any direct-to-venue read is reached:

```typescript theme={null}
import { createPerpsClient } from '@lifi/perps-sdk';
import { hyperliquidProvider } from '@lifi/perps-sdk-provider-hyperliquid';
import { lighterProvider } from '@lifi/perps-sdk-provider-lighter';

const client = createPerpsClient({
  integrator: 'my-app',
  providers: [hyperliquidProvider(), lighterProvider()],
});

const twaps = await client.getProvider('hyperliquid')?.getRunningTwaps?.({
  address: userAddress,
});

for (const twap of twaps ?? []) {
  console.log(twap.twapId, twap.status, twap.filledSize, '/', twap.totalSize);
}
```

## Parameters

| Parameter  | Type                | Required | Description                                              |
| ---------- | ------------------- | -------- | -------------------------------------------------------- |
| `address`  | `Address`           | Yes      | User's wallet address                                    |
| `marketId` | `string`            | No       | Filter by the canonical `Market.id` (not display symbol) |
| `options`  | `SDKRequestOptions` | No       | Request options (e.g. `signal` for cancellation)         |

## Returns

`TwapOrder[]`:

| Field             | Type              | Description                                                                             |
| ----------------- | ----------------- | --------------------------------------------------------------------------------------- |
| `twapId`          | `string`          | Provider-native TWAP identifier, stringified — this is the id `cancelTwapOrder` expects |
| `market`          | `MarketDisplay`   | Market identity                                                                         |
| `side`            | `'BUY' \| 'SELL'` | Order direction                                                                         |
| `totalSize`       | `string`          | Total base-asset size the TWAP was placed for                                           |
| `filledSize`      | `string`          | Base-asset size executed so far                                                         |
| `avgFillPrice`    | `string?`         | Volume-weighted average fill price; absent until the first child fill                   |
| `startedAt`       | `string`          | ISO 8601 timestamp the TWAP started executing                                           |
| `durationSeconds` | `number`          | Total execution window in seconds                                                       |
| `status`          | `TwapOrderStatus` | See below                                                                               |

## TwapOrderStatus

| Value       | Description                  |
| ----------- | ---------------------------- |
| `RUNNING`   | Still executing child slices |
| `COMPLETED` | Ran to completion            |
| `CANCELLED` | Cancelled before completion  |

<Info>
  On Lighter, `placeTwapOrder`'s own result carries a submit-time transaction hash on `twapId` — Lighter assigns the parent's real order index asynchronously. This read resolves that real index (`TwapOrder.twapId`), which is the value `cancelTwapOrder` actually expects.
</Info>

**API Reference:** [placeTwapOrder / cancelTwapOrder](/sdk/trading/twap-orders) — the write-side counterpart. Direct-to-venue reads like this one have no LI.FI HTTP endpoint.
