> For the complete documentation index, see [llms.txt](https://docs.coinmarketman.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coinmarketman.com/endpoints/trader-and-wallet-data.md). Agents can also search and read this documentation through its [MCP server](https://docs.coinmarketman.com/~gitbook/mcp).

# Trader & Wallet Data

The Trader & Wallet Data endpoints provide comprehensive access to wallet information, user accounts, favorite tracking, and liquidation risk data. These endpoints allow you to retrieve detailed wallet analytics, manage claimed accounts, track favorite positions and accounts, and monitor liquidation risks across different market segments.

### Get Wallets: Profiles & Performance <a href="#get-wallets" id="get-wallets"></a>

`GET /api/external/wallets`

{% hint style="success" %}
**Unique to HyperTracker Users**

Get enriched wallet profiles, portfolio balances, trading performance and risk metrics in a single paginated response.
{% endhint %}

Look up a wallet or discover traders by cohort and open-position status. Each result includes identity and cohort membership; equity across perps, spot, staking, vaults and individual DEXs; exposure and liquidation proximity; activity counts; and **24h, 7d, 30d and all-time P\&L, percentage returns, volume and peak equity**.

Combine filters and sorting to find wallets such as Money Printers with open positions, ranked by perp margin equity. To build a cohort watchlist, see [Get Wallets in a Cohort](https://docs.coinmarketman.com/endpoints/cohort-intelligence.md#get-wallets-in-a-cohort).

**Query Parameters**

All parameters are optional. Omit a filter to include all wallets for that criterion.

<table><thead><tr><th width="169.8984375">Parameter</th><th width="156.01953125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code></td><td>string</td><td>Look up one wallet by its address.</td></tr><tr><td><code>segmentIds</code></td><td>array of numbers</td><td>Filter by one or more cohort IDs. For a single cohort, use <code>segmentIds=8</code> for Money Printers or <code>segmentIds=5</code> for Whales. See the <a href="https://docs.coinmarketman.com/endpoints/cohort-intelligence.md#cohort-ids">cohort ID table</a>.</td></tr><tr><td><code>hasOpenPositions</code></td><td>boolean</td><td><code>true</code>: wallets with open perp positions. <code>false</code>: wallets without open perp positions. Omit to include both.</td></tr><tr><td><code>orderBy</code></td><td>string</td><td>Sort field. Default: <code>openValue</code>. See supported fields below.</td></tr><tr><td><code>order</code></td><td>string</td><td>Sort direction: <code>asc</code> or <code>desc</code>. Default: <code>desc</code>.</td></tr><tr><td><code>offset</code></td><td>number</td><td>Number of matching wallets to skip. Start at <code>0</code> and increase for each page.</td></tr><tr><td><code>limit</code></td><td>number</td><td>Maximum wallets per page, up to <strong>500</strong>. Smaller pages usually return faster.</td></tr></tbody></table>

<details>

<summary>Supported Sort Fields</summary>

`address`, `totalEquity`, `earliestActivityAt`, `perpPnl`, `perpEquity`, `perpMarginEquity`, `perpBias`, `openValue`, `sumUpnl`, `closestLiqProgress`, `countOpenPositions`, `exposureRatio`.

Use `countOpenPositions` to sort by the response field `countOpenPerps`.

</details>

Request Examples

Retrieve Money Printers with open perp positions, sorted by perp margin equity from highest to lowest.

{% tabs %}
{% tab title="Curl" %}
{% code collapsedlinecount="10" %}

```bash
curl --request GET \
  --url 'https://ht-api.coinmarketman.com/api/external/wallets?segmentIds=8&hasOpenPositions=true&orderBy=perpMarginEquity&order=desc&offset=0&limit=50' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Accept: application/json'
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code collapsedlinecount="10" %}

```javascript
const params = new URLSearchParams({
  segmentIds: '8',
  hasOpenPositions: 'true',
  orderBy: 'perpMarginEquity',
  order: 'desc',
  offset: '0',
  limit: '50'
});

const response = await fetch(
  `https://ht-api.coinmarketman.com/api/external/wallets?${params}`,
  {
    headers: {
      Authorization: 'Bearer YOUR_API_KEY',
      Accept: 'application/json'
    }
  }
);

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const wallets = await response.json();
console.log(wallets);
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code collapsedlinecount="10" %}

```python
import requests

response = requests.get(
    "https://ht-api.coinmarketman.com/api/external/wallets",
    params={
        "segmentIds": 8,
        "hasOpenPositions": "true",
        "orderBy": "perpMarginEquity",
        "order": "desc",
        "offset": 0,
        "limit": 50,
    },
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Accept": "application/json",
    },
    timeout=30,
)
response.raise_for_status()

wallets = response.json()
print(wallets)
```

{% endcode %}
{% endtab %}
{% endtabs %}

Response

> **200 Success:** Returns `totalCount` (all matching wallets) and `items` (the current page of enriched wallet records).

Keep the filters and sort order unchanged while increasing `offset` by the number of returned items until you reach `totalCount` or receive an empty page.

**Equity field change:** `perpEquity` now returns plain perp equity across all DEXs. The margin-equity value previously returned under that name is now `perpMarginEquity`.

<details>

<summary>Response Fields</summary>

Fields below belong to each object in `items`. Missing or unavailable values may be `null`; do not treat them as zero.

**Identity and membership**

<table><thead><tr><th width="203.875">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code></td><td>Wallet address.</td></tr><tr><td><code>segments</code></td><td>Cohort IDs currently assigned to the wallet.</td></tr><tr><td><code>xUserId</code>, <code>displayName</code>, <code>emoji</code>, <code>verified</code></td><td>Identity and verification fields, where available.</td></tr><tr><td><code>showName</code></td><td>Resolved display information, containing <code>text</code> and <code>emoji</code>.</td></tr><tr><td><code>favoriteCount</code></td><td>Number of users who have favourited the wallet.</td></tr><tr><td><code>earliestActivityAt</code></td><td>Earliest recorded wallet activity, as an ISO 8601 timestamp.</td></tr><tr><td><code>walletAge</code></td><td>Whole days since <code>earliestActivityAt</code>.</td></tr><tr><td><code>vault</code></td><td>Vault information when applicable.</td></tr></tbody></table>

**Equity and exposure**

<table><thead><tr><th width="225.796875">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>totalEquity</code></td><td>Total wallet equity in USD.</td></tr><tr><td><code>perpEquity</code></td><td>Plain perp equity across all DEXs, in USD.</td></tr><tr><td><code>perpMarginEquity</code></td><td>Perp margin equity in USD. This can differ from plain perp equity, for example when spot USDC contributes to unified-account margin.</td></tr><tr><td><code>spotEquity</code>, <code>stakeEquity</code>, <code>vaultEquity</code></td><td>Spot, staking and vault equity respectively, in USD.</td></tr><tr><td><code>&#x3C;dex>Equity</code></td><td>Equity for each HIP-3 DEX, for example <code>xyzEquity</code>. These fields are added dynamically as DEXs are supported; empty DEX balances are <code>0</code>. DEX perp equity is already included in <code>perpEquity</code>.</td></tr><tr><td><code>perpPnl</code></td><td>Wallet-level perp P&#x26;L in USD. See the timeframe fields below for period-specific performance.</td></tr><tr><td><code>openValue</code></td><td>Total value of open perp positions in USD.</td></tr><tr><td><code>sumUpnl</code></td><td>Unrealized P&#x26;L across open perp positions, in USD.</td></tr><tr><td><code>exposureRatio</code>, <code>perpBias</code></td><td>Perp exposure ratio and directional bias.</td></tr><tr><td><code>closestLiq</code></td><td>Closest liquidation information, containing <code>coin</code> and <code>progress</code>.</td></tr></tbody></table>

**Performance across timeframes**

Each family below is returned with the suffixes `24h`, `7d`, `30d` and `All`, for example `perpPnlUsd7d` or `peakCombinedEquityAll`.

<table><thead><tr><th width="193.84375">Field family</th><th>Description</th></tr></thead><tbody><tr><td><code>perpPnlUsd*</code></td><td>Perp P&#x26;L in USD for the period.</td></tr><tr><td><code>perpPnlPercent*</code></td><td>Perp P&#x26;L percentage for the period.</td></tr><tr><td><code>combinedPnlUsd*</code></td><td>Overall wallet P&#x26;L in USD for the period.</td></tr><tr><td><code>combinedPnlPercent*</code></td><td>Overall wallet P&#x26;L percentage for the period.</td></tr><tr><td><code>perpVolume*</code></td><td>Perp trading volume in USD for the period.</td></tr><tr><td><code>combinedVolume*</code></td><td>Overall trading volume in USD for the period.</td></tr><tr><td><code>peakPerpEquity*</code></td><td>Highest recorded perp equity in USD during the period.</td></tr><tr><td><code>peakCombinedEquity*</code></td><td>Highest recorded overall equity in USD during the period.</td></tr></tbody></table>

Percentage values are already percentages: `8.37` means **8.37%**. A percentage may be `null` when it cannot be calculated.

**Activity and referrals**

<table><thead><tr><th width="158.4765625">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>countOpenPerps</code></td><td>Number of open perp positions.</td></tr><tr><td><code>countHoldings</code></td><td>Number of nonzero spot token holdings, excluding outcome tokens.</td></tr><tr><td><code>countOutcomes</code></td><td>Number of outcome token holdings.</td></tr><tr><td><code>countFills30d</code></td><td>Fill count for the previous <strong>30 complete UTC days</strong>, excluding today. Updated around <strong>01:00 UTC</strong>.</td></tr><tr><td><code>countOpenOrders</code></td><td>Open perp orders across main and HIP-3 DEXs, from a <strong>5-minute snapshot</strong>.</td></tr><tr><td><code>refCode</code></td><td>Referral code, available after it has been used for a signup.</td></tr><tr><td><code>countReferrals</code></td><td>Number of referrals.</td></tr></tbody></table>

Values reflect the latest available snapshots, and some fields refresh independently. Use the [state update webhook](https://docs.coinmarketman.com/webhooks.md) to trigger fresh reads; activity counters follow the schedules noted above.

</details>

<details>

<summary>Response Example</summary>

Example for a single-wallet lookup using `address=0xb83de012dba672c76a7dbbbf3e459cb59d7d6e36`.

{% code expandable="true" collapsedlinecount="10" %}

```json
{
  "totalCount": 1,
  "items": [
    {
      "xUserId": null,
      "displayName": null,
      "emoji": null,
      "verified": false,
      "segments": [7, 8],
      "address": "0xb83de012dba672c76a7dbbbf3e459cb59d7d6e36",
      "favoriteCount": 142,
      "totalEquity": 190435868.03896025,
      "earliestActivityAt": "2025-02-26T22:50:00.204Z",
      "perpPnl": 135150818.29505,
      "perpEquity": 132668244.5070491,
      "perpMarginEquity": 139526722.36237657,
      "exposureRatio": 4.28,
      "perpBias": -4.27,
      "openValue": 597153030.698814,
      "sumUpnl": 1472720.159972011,
      "vault": null,
      "closestLiq": {
        "coin": "HYPE",
        "progress": 5.2
      },
      "showName": {
        "text": "Abraxas Capital",
        "emoji": null
      },
      "ioEquity": 0,
      "kmEquity": 0,
      "flxEquity": 0,
      "xyzEquity": 4963936.881896,
      "abcdEquity": 0,
      "cashEquity": 0,
      "hynaEquity": 0,
      "mktsEquity": 0,
      "paraEquity": 0,
      "vntlEquity": 0,
      "perpPnlUsd24h": -7837711.527187,
      "perpPnlPercent24h": -5.7,
      "combinedPnlUsd24h": -6642977.785244,
      "combinedPnlPercent24h": -3.2,
      "perpVolume24h": 1285973.1,
      "combinedVolume24h": 2257230.29,
      "peakPerpEquity24h": 137592075.054884,
      "peakCombinedEquity24h": 207584454.003163,
      "perpPnlUsd7d": 11923740.297972,
      "perpPnlPercent7d": 8.37,
      "combinedPnlUsd7d": 11511151.677811,
      "combinedPnlPercent7d": 4.8,
      "perpVolume7d": 33043938.44,
      "combinedVolume7d": 40316301.05,
      "peakPerpEquity7d": 154363951.839607,
      "peakCombinedEquity7d": 251312557.700815,
      "perpPnlUsd30d": 92308427.695648,
      "perpPnlPercent30d": 124.92,
      "combinedPnlUsd30d": 81617592.778926,
      "combinedPnlPercent30d": 38.69,
      "perpVolume30d": 409676043.47,
      "combinedVolume30d": 437774774.71,
      "peakPerpEquity30d": 166204154.260879,
      "peakCombinedEquity30d": 292565490.178478,
      "perpPnlUsdAll": 135150818.29505,
      "perpPnlPercentAll": 435.22,
      "combinedPnlUsdAll": 139896860.017249,
      "combinedPnlPercentAll": 91.63,
      "perpVolumeAll": 5591985064.03,
      "combinedVolumeAll": 5927391454.57,
      "peakPerpEquityAll": 166204154.260879,
      "peakCombinedEquityAll": 292565490.178478,
      "spotEquity": 48501457.53085216,
      "stakeEquity": 9276092.107961,
      "vaultEquity": 0,
      "walletAge": 607,
      "countOpenPerps": 32,
      "countHoldings": 7,
      "countOutcomes": 0,
      "countFills30d": 580003,
      "countOpenOrders": 0,
      "refCode": "EGAF",
      "countReferrals": 3
    }
  ]
}
```

{% endcode %}

</details>

***

### Get Closed Trades

`/api/external/closed-trades`

{% hint style="success" %}
**Unique to HyperTracker Users**

HyperTracker reconstructs full closed trades from raw Hyperliquid fills. Our real-time fill catcher detects trade closures instantly and builds completed trades within \~10 seconds of the final fill.
{% endhint %}

Returns closed trades for a given wallet address with optional close-time filters. Results use cursor-based pagination.

Each closed trade includes a string `id` and a unique `hash`. Each closed trade also includes MAE/MFE values. Percentages are relative to `avgEntry` and never negative (`5` = 5%). All four fields are `null` when journey data is unavailable.

If `startTime` is omitted, the API uses the current time minus 7 days. If `endTime` is omitted, the API uses the current time.

Closed trade history is available back to **July 2025**, but each individual request must use a `startTime` and `endTime` no more than **30 days apart**. For full wallet history, query multiple 30-day windows.

<figure><img src="https://797705725-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkv2IiibnImsf0K43fna%2Fuploads%2Fw6H9Z9izlPxKh7piWg7s%2FScreenshot%202026-04-27%20at%2021.02.52.png?alt=media&amp;token=93cb934b-b11c-4d18-9f71-e4be1085e675" alt=""><figcaption></figcaption></figure>

<details>

<summary>Query Parameters</summary>

<table><thead><tr><th width="116.4296875">Parameter</th><th width="88.953125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code></td><td><code>string</code></td><td><strong>Required.</strong> Wallet address to fetch closed trades for.</td></tr><tr><td><code>startTime</code></td><td><code>string</code></td><td>Start time using the close time filter. If omitted, current time minus 7 days is used.</td></tr><tr><td><code>endTime</code></td><td><code>string</code></td><td>End time using the close time filter. If omitted, current time is used.</td></tr><tr><td><code>limit</code></td><td><code>number</code></td><td>Limit number of results returned. Default: <code>100</code>.</td></tr><tr><td><code>nextCursor</code></td><td><code>string</code></td><td>Cursor for pagination. Use the cursor returned in the previous response.</td></tr></tbody></table>

</details>

<details>

<summary>MAE/MFE Fields</summary>

| Field        | Type               | Description                                                           |
| ------------ | ------------------ | --------------------------------------------------------------------- |
| `maePrice`   | `number` or `null` | Worst price during the trade: lowest for a long, highest for a short. |
| `maePercent` | `number` or `null` | Adverse move as a percentage of `avgEntry`.                           |
| `mfePrice`   | `number` or `null` | Best price during the trade: highest for a long, lowest for a short.  |
| `mfePercent` | `number` or `null` | Favorable move as a percentage of `avgEntry`.                         |

</details>

Request Examples

{% tabs %}
{% tab title="Curl" %}
{% code collapsedlinecount="10" %}

```bash
curl --request GET \
  --url 'https://ht-api.coinmarketman.com/api/external/closed-trades?address=0x1234567890abcdef1234567890abcdef123&startTime=2026-04-24T18:27:01.112Z&endTime=2026-04-25T18:27:01.112Z&limit=100' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code collapsedlinecount="10" %}

```javascript
const url = new URL("https://ht-api.coinmarketman.com/api/external/closed-trades");
url.searchParams.set("address", "0x1234567890abcdef1234567890abcdef123");
url.searchParams.set("startTime", "2026-04-24T18:27:01.112Z");
url.searchParams.set("endTime", "2026-04-25T18:27:01.112Z");
url.searchParams.set("limit", "100");

const response = await fetch(url.toString(), {
  headers: {
    Authorization: "Bearer YOUR_API_KEY"
  }
});

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

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code collapsedlinecount="10" %}

```python
import requests

response = requests.get(
    "https://ht-api.coinmarketman.com/api/external/closed-trades",
    params={
        "address": "0x1234567890abcdef1234567890abcdef123",
        "startTime": "2026-04-24T18:27:01.112Z",
        "endTime": "2026-04-25T18:27:01.112Z",
        "limit": 100,
    },
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
    },
)

closed_trades = response.json()
```

{% endcode %}
{% endtab %}
{% endtabs %}

Response

> 200 Success: Returns closed trades for the requested wallet address, plus `nextCursor` when more results are available.

<details>

<summary>Response Example</summary>

{% code expandable="true" %}

```json
{
  "trades": [
    {
      "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872",
      "hash": "AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_oQAAAZ3DsRHQ",
      "id": "2834337",
      "firstFillId": "4173483420183166976",
      "lastFillId": "4174768354139046111",
      "side": "long",
      "coin": "HYPE",
      "avgExit": 41.27894955,
      "avgEntry": 41.20505691,
      "duration": 20520738,
      "openTime": "2026-04-25T02:28:54.062Z",
      "closeTime": "2026-04-25T08:10:54.800Z",
      "partial": false,
      "totalSize": 9888.88,
      "totalUsd": 407471.86317,
      "realizedPnlUsd": 456.493719,
      "countFills": 222,
      "fee": 244.702221,
      "feeUsd": 244.702221,
      "fundingUsd": -29.51952,
      "maePrice": 41.04,
      "maePercent": 0.4005744012452672,
      "mfePrice": 41.31,
      "mfePercent": 0.2546849776939163
    },
    {
      "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872",
      "hash": "AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_pQAAAZ3CWZGk",
      "id": "2834341",
      "firstFillId": "4172269172799045632",
      "lastFillId": "4173359299923279879",
      "side": "long",
      "coin": "APE",
      "avgExit": 0.21069315,
      "avgEntry": 0.18391122,
      "duration": 17384919,
      "openTime": "2026-04-24T21:05:58.221Z",
      "closeTime": "2026-04-25T01:55:43.140Z",
      "partial": false,
      "totalSize": 300000,
      "totalUsd": 55173.365152,
      "realizedPnlUsd": 8146.304316,
      "countFills": 79,
      "fee": 35.514352,
      "feeUsd": 35.514352,
      "fundingUsd": 147.238731,
      "maePrice": 0.1654,
      "maePercent": 10.065302160466336,
      "mfePrice": 0.22225,
      "mfePercent": 20.84635184302514
    },
    {
      "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872",
      "hash": "AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_oAAAAZ3BKAEK",
      "id": "2834336",
      "firstFillId": "4168100949987950592",
      "lastFillId": "4172104336249192555",
      "side": "long",
      "coin": "HYPE",
      "avgExit": 41.28423397,
      "avgEntry": 41.19775521,
      "duration": 64270533,
      "openTime": "2026-04-24T02:30:47.109Z",
      "closeTime": "2026-04-24T20:21:57.642Z",
      "partial": false,
      "totalSize": 18888.88,
      "totalUsd": 778179.45434,
      "realizedPnlUsd": 1038.070115,
      "countFills": 513,
      "fee": 445.895464,
      "feeUsd": 445.895464,
      "fundingUsd": -149.521431,
      "maePrice": 40.683,
      "maePercent": 1.2494739273441036,
      "mfePrice": 41.402,
      "mfePercent": 0.4957667935034177
    },
    {
      "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872",
      "hash": "AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_nwAAAZ29OyD_",
      "id": "2834335",
      "firstFillId": "4167958335598886922",
      "lastFillId": "4168002097020666029",
      "side": "long",
      "coin": "HYPE",
      "avgExit": 41.49192731,
      "avgEntry": 41.36552905,
      "duration": 697130,
      "openTime": "2026-04-24T01:52:45.013Z",
      "closeTime": "2026-04-24T02:04:22.143Z",
      "partial": false,
      "totalSize": 9888.88,
      "totalUsd": 409058.75295,
      "realizedPnlUsd": 999.005607,
      "countFills": 258,
      "fee": 245.810103,
      "feeUsd": 245.810103,
      "fundingUsd": -5.12145,
      "maePrice": 41.335,
      "maePercent": 0.07380311747759066,
      "mfePrice": 41.54,
      "mfePercent": 0.4217786016688209
    }
  ],
  "nextCursor": null
}
```

{% endcode %}

</details>

***

### Get Closed Trades Summary

`/api/external/closed-trades/summary`

{% hint style="success" %}
**Unique to HyperTracker Users**

HyperTracker reconstructs completed trades from raw Hyperliquid fills, allowing you to analyze full closed trade performance instead of isolated executions.

Closed trades are updated in near real time, usually within \~10 seconds of the final fill.
{% endhint %}

Returns a closed trade performance summary for a given Hyperliquid wallet address.

This endpoint provides a wallet-level summary and per-coin breakdown of the wallet’s closed trade history, including trade count, win rate, long/short behavior, realized PnL, fees, trade size, volume, duration, profit factor, payoff ratio, and expectancy.

Use this endpoint to quickly profile a wallet’s trading performance, identify which coins it performs best or worst on, and understand the wallet’s overall trading behavior across a selected interval.

<details>

<summary>Query Parameters</summary>

<table><thead><tr><th width="108.3359375">Parameter</th><th width="91.78515625">Type</th><th width="108.34375">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code></td><td>string</td><td>Yes</td><td>Hyperliquid wallet address to analyze.</td></tr><tr><td><code>interval</code></td><td>string</td><td>No</td><td>Supported values: <code>all</code>, <code>365d</code>, <code>180d</code>, <code>90d</code>, <code>30d</code>, <code>last50</code>. Defaults to <code>all</code>. Date-based intervals include trades closed inside the selected lookback window. <code>last50</code> returns the wallet’s latest 50 closed trades.</td></tr></tbody></table>

</details>

Request Examples

{% tabs %}
{% tab title="Curl" %}
{% code collapsedlinecount="10" %}

```bash
curl --request GET \
  --url 'https://ht-api.coinmarketman.com/api/external/closed-trades/summary?address=0x1234567890abcdef1234567890abcdef123&interval=90d' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code collapsedlinecount="10" %}

```javascript
const url = new URL("https://ht-api.coinmarketman.com/api/external/closed-trades/summary");

url.searchParams.set("address", "0x1234567890abcdef1234567890abcdef123");
url.searchParams.set("interval", "90d");

const response = await fetch(url.toString(), {
  method: "GET",
  headers: {
    Authorization: "Bearer YOUR_API_KEY"
  }
});

const data = await response.json();

console.log(data);
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code collapsedlinecount="10" %}

```python
import requests

response = requests.get(
    "https://ht-api.coinmarketman.com/api/external/closed-trades/summary",
    params={
        "address": "0x1234567890abcdef1234567890abcdef123",
        "interval": "90d",
    },
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
    },
)

closed_trades_summary = response.json()

print(closed_trades_summary)
```

{% endcode %}
{% endtab %}
{% endtabs %}

Response

> 200 Success: Returns aggregate closed trade summary metrics for the requested wallet address and interval.

<details>

<summary>Response Example</summary>

{% code expandable="true" collapsedlinecount="10" %}

```json
{
  "address": "0x08c14b32c8a48894e4b933090ebcc9ce33b21135",
  "range": "last90Days",
  "updatedAt": "2026-05-18T14:57:14.513Z",
  "summary": {
    "totalTrades": 5,
    "wins": 2,
    "losses": 3,
    "winRate": 0.4,
    "longTrades": 4,
    "shortTrades": 1,
    "avgDuration": 3350607932.8,
    "medianDuration": 356975871,
    "totalWinningPnl": 403761.852268,
    "totalLosingPnl": -81226.363194,
    "netPnl": 322535.48907400004,
    "avgGain": 201880.926134,
    "avgLoss": -27075.454398,
    "medianGain": 201880.92613399998,
    "medianLoss": -20528.9729675,
    "profitFactor": 4.9708227278828225,
    "payoffRatio": 7.456234091824234,
    "expectancy": 64507.097814800014,
    "expectancyPct": 0.09855711028876689,
    "totalFeesPaid": 3041.606564,
    "avgTradeSize": 654514.9063908,
    "medianSizeUsd": 820777.412166,
    "totalVolumeUsd": 6919131.016628566
  },
  "coins": [
    {
      "coin": "CHIP",
      "totalTrades": 2,
      "wins": 0,
      "losses": 2,
      "winRate": 0,
      "longTrades": 1,
      "shortTrades": 1,
      "avgDuration": 68448196,
      "medianDuration": 68448196,
      "totalWinningPnl": 0,
      "totalLosingPnl": -76455.817003,
      "netPnl": -76455.817003,
      "avgGain": null,
      "avgLoss": -38227.9085015,
      "medianGain": null,
      "medianLoss": -38227.9085015,
      "profitFactor": 0,
      "payoffRatio": null,
      "expectancy": null,
      "expectancyPct": null,
      "totalFeesPaid": 863.791462,
      "avgTradeSize": 530387.2365255,
      "medianSizeUsd": 530387.2365255,
      "totalVolumeUsd": 2079537.07409862,
      "volumeSharePct": 0.30054887949092496
    },
    {
      "coin": "HYPE",
      "totalTrades": 1,
      "wins": 1,
      "losses": 0,
      "winRate": 1,
      "longTrades": 1,
      "shortTrades": 0,
      "avgDuration": 12767828087,
      "medianDuration": 12767828087,
      "totalWinningPnl": 399804.399324,
      "totalLosingPnl": 0,
      "netPnl": 399804.399324,
      "avgGain": 399804.399324,
      "avgLoss": null,
      "medianGain": 399804.399324,
      "medianLoss": null,
      "profitFactor": null,
      "payoffRatio": null,
      "expectancy": null,
      "expectancyPct": null,
      "totalFeesPaid": 1150.763003,
      "avgTradeSize": 1068234.92828,
      "medianSizeUsd": 1068234.92828,
      "totalVolumeUsd": 2557254.526871981,
      "volumeSharePct": 0.3695918635918583
    },
    {
      "coin": "BERA",
      "totalTrades": 1,
      "wins": 1,
      "losses": 0,
      "winRate": 1,
      "longTrades": 1,
      "shortTrades": 0,
      "avgDuration": 3491339314,
      "medianDuration": 3491339314,
      "totalWinningPnl": 3957.452944,
      "totalLosingPnl": 0,
      "netPnl": 3957.452944,
      "avgGain": 3957.452944,
      "avgLoss": null,
      "medianGain": 3957.452944,
      "medianLoss": null,
      "profitFactor": null,
      "payoffRatio": null,
      "expectancy": null,
      "expectancyPct": null,
      "totalFeesPaid": 88.281962,
      "avgTradeSize": 98893.964763,
      "medianSizeUsd": 98893.964763,
      "totalVolumeUsd": 196182.757177915,
      "volumeSharePct": 0.028353669948788962
    },
    {
      "coin": "BTC",
      "totalTrades": 1,
      "wins": 0,
      "losses": 1,
      "winRate": 0,
      "longTrades": 1,
      "shortTrades": 0,
      "avgDuration": 356975871,
      "medianDuration": 356975871,
      "totalWinningPnl": 0,
      "totalLosingPnl": -4770.546191,
      "netPnl": -4770.546191,
      "avgGain": null,
      "avgLoss": -4770.546191,
      "medianGain": null,
      "medianLoss": -4770.546191,
      "profitFactor": 0,
      "payoffRatio": null,
      "expectancy": null,
      "expectancyPct": null,
      "totalFeesPaid": 938.770137,
      "avgTradeSize": 1044671.16586,
      "medianSizeUsd": 1044671.16586,
      "totalVolumeUsd": 2086156.65848005,
      "volumeSharePct": 0.3015055869684277
    }
  ]
}
```

{% endcode %}

</details>

<details>

<summary>Response Fields</summary>

<table><thead><tr><th width="122.90234375">Field</th><th width="84.5625">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code></td><td>string</td><td>Wallet address used for the query.</td></tr><tr><td><code>range</code></td><td>string</td><td>Resolved interval used for the summary.</td></tr><tr><td><code>updatedAt</code></td><td>string</td><td>Timestamp of the latest summary update for this wallet.</td></tr><tr><td><code>summary</code></td><td>object</td><td>Wallet-level closed trade summary metrics.</td></tr><tr><td><code>coins</code></td><td>array</td><td>Per-coin closed trade summary metrics.</td></tr></tbody></table>

</details>

<details>

<summary>Summary Object</summary>

<table><thead><tr><th width="169.8359375">Field</th><th width="136.99609375">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>totalTrades</code></td><td>number</td><td>Total number of closed trades in the selected interval.</td></tr><tr><td><code>wins</code></td><td>number</td><td>Number of profitable closed trades.</td></tr><tr><td><code>losses</code></td><td>number</td><td>Number of losing closed trades.</td></tr><tr><td><code>winRate</code></td><td>number</td><td>Win rate as a decimal. Example: <code>0.4</code> = 40%.</td></tr><tr><td><code>longTrades</code></td><td>number</td><td>Number of closed trades opened long.</td></tr><tr><td><code>shortTrades</code></td><td>number</td><td>Number of closed trades opened short.</td></tr><tr><td><code>avgDuration</code></td><td>number</td><td>Average trade duration.</td></tr><tr><td><code>medianDuration</code></td><td>number</td><td>Median trade duration.</td></tr><tr><td><code>totalWinningPnl</code></td><td>number</td><td>Gross realized PnL from winning trades.</td></tr><tr><td><code>totalLosingPnl</code></td><td>number</td><td>Gross realized PnL from losing trades. Returned as a negative value.</td></tr><tr><td><code>netPnl</code></td><td>number</td><td>Net realized PnL across all included closed trades.</td></tr><tr><td><code>avgGain</code></td><td>number/null</td><td>Average PnL of winning trades. Returns <code>null</code> if there are no winning trades.</td></tr><tr><td><code>avgLoss</code></td><td>number/null</td><td>Average PnL of losing trades. Returns <code>null</code> if there are no losing trades.</td></tr><tr><td><code>medianGain</code></td><td>number/null</td><td>Median PnL of winning trades. Returns <code>null</code> if there are no winning trades.</td></tr><tr><td><code>medianLoss</code></td><td>number/null</td><td>Median PnL of losing trades. Returns <code>null</code> if there are no losing trades.</td></tr><tr><td><code>profitFactor</code></td><td>number/null</td><td>Gross winning PnL divided by absolute gross losing PnL: <code>totalWinningPnl / abs(totalLosingPnl)</code>. Example: <code>2.98</code> means the wallet made $2.98 in winning PnL for every $1 lost. Returns <code>null</code> if there are no losing trades.</td></tr><tr><td><code>payoffRatio</code></td><td>number/null</td><td>Average winner divided by absolute average loser: <code>avgGain / abs(avgLoss)</code>. Example: <code>1.36</code> means the average winning trade is 1.36x the size of the average losing trade. Returns <code>null</code> if there are no wins or no losses.</td></tr><tr><td><code>expectancy</code></td><td>number/null</td><td>Average expected PnL per trade: <code>(winRate * avgGain) + ((1 - winRate) * avgLoss)</code>. Returns <code>null</code> if there are no wins or no losses.</td></tr><tr><td><code>expectancyPct</code></td><td>number/null</td><td>Average expected PnL per trade as a percentage of average trade size: <code>expectancy / avgTradeSize</code>. Example: <code>0.0325</code> = 3.25%. Returns <code>null</code> if expectancy or average trade size is unavailable.</td></tr><tr><td><code>totalFeesPaid</code></td><td>number</td><td>Total fees paid across included closed trades.</td></tr><tr><td><code>avgTradeSize</code></td><td>number</td><td>Average trade size in USD.</td></tr><tr><td><code>medianSizeUsd</code></td><td>number</td><td>Median trade size in USD.</td></tr><tr><td><code>totalVolumeUsd</code></td><td>number</td><td>Total traded volume in USD across included closed trades.</td></tr></tbody></table>

</details>

<details>

<summary>Coins Object</summary>

Each object in the `coins` array contains the same core performance metrics, scoped to a specific coin.

<table><thead><tr><th width="161.921875">Field</th><th width="139.953125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>coin</code></td><td>string</td><td>Coin symbol.</td></tr><tr><td><code>totalTrades</code></td><td>number</td><td>Number of closed trades for this coin.</td></tr><tr><td><code>wins</code></td><td>number</td><td>Number of profitable closed trades for this coin.</td></tr><tr><td><code>losses</code></td><td>number</td><td>Number of losing closed trades for this coin.</td></tr><tr><td><code>winRate</code></td><td>number</td><td>Coin-specific win rate as a decimal. Example: <code>0.4</code> = 40%.</td></tr><tr><td><code>longTrades</code></td><td>number</td><td>Number of long trades for this coin.</td></tr><tr><td><code>shortTrades</code></td><td>number</td><td>Number of short trades for this coin.</td></tr><tr><td><code>avgDuration</code></td><td>number</td><td>Average trade duration for this coin.</td></tr><tr><td><code>medianDuration</code></td><td>number</td><td>Median trade duration for this coin.</td></tr><tr><td><code>totalWinningPnl</code></td><td>number</td><td>Gross realized PnL from winning trades on this coin.</td></tr><tr><td><code>totalLosingPnl</code></td><td>number</td><td>Gross realized PnL from losing trades on this coin. Returned as a negative value.</td></tr><tr><td><code>netPnl</code></td><td>number</td><td>Net realized PnL for this coin.</td></tr><tr><td><code>avgGain</code></td><td>number/null</td><td>Average PnL of winning trades for this coin.</td></tr><tr><td><code>avgLoss</code></td><td>number/null</td><td>Average PnL of losing trades for this coin.</td></tr><tr><td><code>medianGain</code></td><td>number/null</td><td>Median PnL of winning trades for this coin.</td></tr><tr><td><code>medianLoss</code></td><td>number/null</td><td>Median PnL of losing trades for this coin.</td></tr><tr><td><code>profitFactor</code></td><td>number/null</td><td>Gross winning PnL divided by absolute gross losing PnL for this coin. Returns <code>null</code> if there are no losing trades.</td></tr><tr><td><code>payoffRatio</code></td><td>number/null</td><td>Average winner divided by absolute average loser for this coin. Returns <code>null</code> if there are no wins or no losses.</td></tr><tr><td><code>expectancy</code></td><td>number/null</td><td>Average expected PnL per trade for this coin. Returns <code>null</code> if there are no wins or no losses.</td></tr><tr><td><code>expectancyPct</code></td><td>number/null</td><td>Average expected PnL per trade as a percentage of average trade size for this coin.</td></tr><tr><td><code>totalFeesPaid</code></td><td>number</td><td>Total fees paid on this coin.</td></tr><tr><td><code>avgTradeSize</code></td><td>number</td><td>Average trade size in USD for this coin.</td></tr><tr><td><code>medianSizeUsd</code></td><td>number</td><td>Median trade size in USD for this coin.</td></tr><tr><td><code>totalVolumeUsd</code></td><td>number</td><td>Total traded volume in USD for this coin.</td></tr><tr><td><code>volumeSharePct</code></td><td>number</td><td>This coin’s share of the wallet’s total volume in the selected interval. Example: <code>0.3695</code> = 36.95%.</td></tr></tbody></table>

</details>

{% hint style="info" %}
Notes

* `winRate`, `expectancyPct`, and `volumeSharePct` are returned as decimals. Example: `0.4` = 40%.
* `totalLosingPnl`, `avgLoss`, and `medianLoss` are returned as negative values.
* `avgGain`, `avgLoss`, `medianGain`, `medianLoss`, `profitFactor`, `payoffRatio`, `expectancy`, and `expectancyPct` may return `null` when there is not enough data to calculate the metric.
* The `coins` array only includes coins traded by the wallet within the selected interval.
* `last50` is trade-count based, not date based.
  {% endhint %}

***

### Get Closed Trade Fills

`/api/external/closed-trades/{hash}/fills`

<figure><img src="https://797705725-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkv2IiibnImsf0K43fna%2Fuploads%2Fjj9cwHChhniyC4tPaTyP%2FScreenshot%202026-04-25%20at%2016.16.59.png?alt=media&amp;token=7a61bbc9-913e-4c3a-a002-ff7e686049f5" alt=""><figcaption></figcaption></figure>

*Returns the fills used to build a specific closed trade. Pass the `hash` from a closed trade record to inspect the underlying executions. Results use cursor-based pagination and can be filtered by fill time.*

<details>

<summary>Path Parameters</summary>

| Parameter | Type     | Description                                                              |
| --------- | -------- | ------------------------------------------------------------------------ |
| `hash`    | `string` | **Required.** Closed trade hash returned by the closed trades endpoints. |

</details>

<details>

<summary>Query Parameters</summary>

| Parameter    | Type     | Description                                                              |
| ------------ | -------- | ------------------------------------------------------------------------ |
| `startTime`  | `string` | Start time using the fill time filter.                                   |
| `endTime`    | `string` | End time using the fill time filter.                                     |
| `limit`      | `number` | Limit number of results returned. Default: `100`.                        |
| `nextCursor` | `string` | Cursor for pagination. Use the cursor returned in the previous response. |

</details>

Request Examples

{% tabs %}
{% tab title="Curl" %}

```bash
curl --request GET \
  --url 'https://ht-api.coinmarketman.com/api/external/closed-trades/AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_pQAAAZ3CWZGk/fills?limit=100' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const hash = "AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_pQAAAZ3CWZGk";
const url = new URL(
  `https://ht-api.coinmarketman.com/api/external/closed-trades/${encodeURIComponent(hash)}/fills`
);

url.searchParams.set("limit", "100");

const response = await fetch(url.toString(), {
  headers: {
    Authorization: "Bearer YOUR_API_KEY"
  }
});

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

{% endtab %}

{% tab title="Python" %}

```python
import requests

hash_value = "AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_pQAAAZ3CWZGk"

response = requests.get(
    f"https://ht-api.coinmarketman.com/api/external/closed-trades/{hash_value}/fills",
    params={
        "limit": 100,
    },
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
    },
)

closed_trade_fills = response.json()
```

{% endtab %}
{% endtabs %}

Response

> 200 Success: Returns the fills for the requested closed trade, plus `nextCursor` when more results are available.

<details>

<summary>Response Example</summary>

{% code expandable="true" collapsedlinecount="10" %}

```json
{
  "fills": [
    {
      "oid": 397489630486,
      "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872",
      "coin": "APE",
      "fullCoinName": "APE",
      "fillType": "perp",
      "px": 0.20782,
      "sz": 1539.6,
      "side": "A",
      "time": "2026-04-25T01:55:43.140Z",
      "startPosition": 1539.6,
      "dir": "Close Long",
      "closedPnl": 36.811836,
      "hash": "0x8f2f96e11ce0452d90a90439eac02c01fa00aec6b7e363ff32f84233dbe41f18",
      "crossed": true,
      "fee": 0.095987,
      "builderFee": 0,
      "tid": 1016229429903918,
      "feeToken": "USDC",
      "builder": "",
      "createdAt": "2026-04-25T01:55:44.310Z",
      "id": "4173359299923279879",
      "blockNumber": 971685932,
      "liquidatedUser": "",
      "liquidationMarkPx": 0,
      "liquidationMethod": ""
    },
    {
      "oid": 397489630486,
      "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872",
      "coin": "APE",
      "fullCoinName": "APE",
      "fillType": "perp",
      "px": 0.20787,
      "sz": 53,
      "side": "A",
      "time": "2026-04-25T01:55:43.140Z",
      "startPosition": 1592.6,
      "dir": "Close Long",
      "closedPnl": 1.26988,
      "hash": "0x8f2f96e11ce0452d90a90439eac02c01fa00aec6b7e363ff32f84233dbe41f18",
      "crossed": true,
      "fee": 0.003305,
      "builderFee": 0,
      "tid": 1013975703140241,
      "feeToken": "USDC",
      "builder": "",
      "createdAt": "2026-04-25T01:55:44.310Z",
      "id": "4173359299923279877",
      "blockNumber": 971685932,
      "liquidatedUser": "",
      "liquidationMarkPx": 0,
      "liquidationMethod": ""
    },
    {
      "oid": 397489630486,
      "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872",
      "coin": "APE",
      "fullCoinName": "APE",
      "fillType": "perp",
      "px": 0.20791,
      "sz": 45954.4,
      "side": "A",
      "time": "2026-04-25T01:55:43.140Z",
      "startPosition": 47547,
      "dir": "Close Long",
      "closedPnl": 1102.9056,
      "hash": "0x8f2f96e11ce0452d90a90439eac02c01fa00aec6b7e363ff32f84233dbe41f18",
      "crossed": true,
      "fee": 2.866313,
      "builderFee": 0,
      "tid": 1031035244652855,
      "feeToken": "USDC",
      "builder": "",
      "createdAt": "2026-04-25T01:55:44.310Z",
      "id": "4173359299923279875",
      "blockNumber": 971685932,
      "liquidatedUser": "",
      "liquidationMarkPx": 0,
      "liquidationMethod": ""
    }
  ]
}
```

{% endcode %}

</details>

***

### Get Closed Trade By Hash

`/api/external/closed-trades/{hash}`

Returns a single closed trade, with the same fields as an item in the closed trades list. Use the `hash` returned by the list.

<details>

<summary>Path Parameters</summary>

| Parameter | Type     | Description                                                         |
| --------- | -------- | ------------------------------------------------------------------- |
| `hash`    | `string` | **Required.** Closed trade hash returned by the closed trades list. |

</details>

Request Examples

{% tabs %}
{% tab title="Curl" %}

```bash
curl --request GET \
  --url 'https://ht-api.coinmarketman.com/api/external/closed-trades/AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_pQAAAZ3CWZGk' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const hash = "AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_pQAAAZ3CWZGk";

const response = await fetch(
  `https://ht-api.coinmarketman.com/api/external/closed-trades/${encodeURIComponent(hash)}`,
  {
    headers: {
      Authorization: "Bearer YOUR_API_KEY"
    }
  }
);

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

{% endtab %}

{% tab title="Python" %}

```python
import requests

hash_value = "AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_pQAAAZ3CWZGk"

response = requests.get(
    f"https://ht-api.coinmarketman.com/api/external/closed-trades/{hash_value}",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
    },
)

closed_trade = response.json()
```

{% endtab %}
{% endtabs %}

Response

> 200 Success: Returns the requested closed trade.

<details>

<summary>Response Example</summary>

{% code expandable="true" %}

```json
{
  "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872",
  "hash": "AgymbDC-wsT-OGGpTk20pJijWHIAAAAAACs_pQAAAZ3CWZGk",
  "id": "2834341",
  "firstFillId": "4172269172799045632",
  "lastFillId": "4173359299923279879",
  "side": "long",
  "coin": "APE",
  "avgExit": 0.21069315,
  "avgEntry": 0.18391122,
  "duration": 17384919,
  "openTime": "2026-04-24T21:05:58.221Z",
  "closeTime": "2026-04-25T01:55:43.140Z",
  "partial": false,
  "totalSize": 300000,
  "totalUsd": 55173.365152,
  "realizedPnlUsd": 8146.304316,
  "countFills": 79,
  "fee": 35.514352,
  "feeUsd": 35.514352,
  "fundingUsd": 147.238731,
  "maePrice": 0.1654,
  "maePercent": 10.065302160466336,
  "mfePrice": 0.22225,
  "mfePercent": 20.84635184302514
}
```

{% endcode %}

</details>

***

### Get Fills <a href="#get-user-fills" id="get-user-fills"></a>

`GET /api/external/fills`

{% hint style="success" %}
**Historical fills with flexible filters**

Retrieve individual trade executions by wallet, builder, coin or minimum fill value. Complete fill data is available from **July 2025**.
{% endhint %}

Each fill includes its execution price, size, side, timestamp, wallet, position impact and fee details. Combine filters to narrow the results—for example, retrieve only BTC fills made by a particular wallet through a particular builder.

**Time ranges**

Requests can span multiple days. The permitted range depends on your filters:

| Filters                                                                                 | Allowed range                                                                                 |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| One wallet, one builder, or one wallet + one builder                                    | Up to **365 days per query**                                                                  |
| Multiple wallets without a builder filter, or multiple builders without a wallet filter | Divide 365 by the number of wallets or builders, rounded down: **2 → 182 days; 10 → 36 days** |
| Coin only, without a wallet, builder or minimum fill value                              | `start` must be within the **last 30 days**                                                   |
| `minNotional ≥ 10000`, without a wallet or builder                                      | Up to **365 days per query**, optionally filtered by coin                                     |

Adding a coin or side filter does not extend the allowed range. Adding `minNotional` to a wallet or builder query does not remove the limit based on the number of wallets or builders. If a request exceeds its allowed range, the API returns a `400` error stating the maximum.

The 365-day limit applies to each query's duration, not to how far back you can query available history. To retrieve longer histories, split the period into smaller windows and paginate through each.

Use UTC timestamps. `end` must be later than `start`. If you omit `end`, the API returns fills through the end of the UTC day containing `start`. Supply both dates when you want a specific multi-day period.

**Filtering by fill value**

Set `minNotional` to return fills where `px × sz` meets or exceeds your threshold.

* With a wallet or builder filter, any value **≥ 0** is supported.
* Without a wallet or builder filter, the minimum is **10000**.
* The threshold applies to each individual fill, not the combined order or position.
* Notional is calculated in the market's quote currency, without conversion to USD.

Provide at least one of `address`, `builder`, `coin` or `minNotional`.

<details>

<summary>Query Parameters</summary>

| Parameter     | Type             | Description                                                                                                                                                                   |
| ------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address`     | array of strings | Filter by wallet addresses. Send as `address[]=0x...`; repeat the parameter for additional wallets.                                                                           |
| `builder`     | array of strings | Filter by builder addresses. Send as `builder[]=0x...`; repeat for additional builders. When combined with `address`, a fill must match both filters.                         |
| `coin`        | array of strings | Filter by coin symbols, such as `BTC`, `ETH` or `xyz:LITE`. Send as `coin[]=BTC&coin[]=ETH`.                                                                                  |
| `minNotional` | number           | Minimum individual fill value, calculated as `px × sz`. Must be ≥ 0; values below 10000 require `address` or `builder`.                                                       |
| `start`       | string           | Start of the requested time window, in ISO 8601 format. Use a UTC timestamp ending in `Z`.                                                                                    |
| `end`         | string           | End of the requested time window, in ISO 8601 format. Must be later than `start` and within the applicable range limit. If omitted, defaults to the end of the UTC start day. |
| `side`        | string           | Fill side: `B` for buy or `A` for sell.                                                                                                                                       |
| `limit`       | number           | Maximum number of fills returned in each response.                                                                                                                            |
| `nextCursor`  | string           | Cursor returned by the previous response. Omit it for the first page.                                                                                                         |

Values within the same array select any of those values; different filters narrow the results together. Use bracketed parameter names even when sending only one value.

</details>

**Request Examples**

Retrieve a wallet's fills across an eight-day period. All three examples send the same filters and dates.

{% tabs %}
{% tab title="cURL" %}
{% code collapsedlinecount="10" %}

```bash
curl --get 'https://ht-api.coinmarketman.com/api/external/fills' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Accept: application/json' \
  --data-urlencode 'address[]=0x6e010dee6510fe74b27304c2449b8cd76f688ccb' \
  --data-urlencode 'start=2025-11-01T00:00:00.000Z' \
  --data-urlencode 'end=2025-11-09T00:00:00.000Z' \
  --data-urlencode 'limit=50'
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code collapsedlinecount="10" %}

```python
import requests

response = requests.get(
    "https://ht-api.coinmarketman.com/api/external/fills",
    params={
        "address[]": ["0x6e010dee6510fe74b27304c2449b8cd76f688ccb"],
        "start": "2025-11-01T00:00:00.000Z",
        "end": "2025-11-09T00:00:00.000Z",
        "limit": 50,
    },
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Accept": "application/json",
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code collapsedlinecount="10" %}

```javascript
const params = new URLSearchParams({
  start: "2025-11-01T00:00:00.000Z",
  end: "2025-11-09T00:00:00.000Z",
  limit: "50",
});
params.append("address[]", "0x6e010dee6510fe74b27304c2449b8cd76f688ccb");

const response = await fetch(
  `https://ht-api.coinmarketman.com/api/external/fills?${params}`,
  {
    headers: {
      Authorization: "Bearer YOUR_API_KEY",
      Accept: "application/json",
    },
  }
);
if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
```

{% endcode %}
{% endtab %}
{% endtabs %}

<details>

<summary>More Filter Examples</summary>

Use these filter combinations with `start` and `end`. Replace `YOUR_WALLET` and `BUILDER_ADDRESS` with the relevant addresses.

| Goal                                                          | Filters                                                             |
| ------------------------------------------------------------- | ------------------------------------------------------------------- |
| Fills from a builder                                          | `builder[]=BUILDER_ADDRESS`                                         |
| A wallet's fills through a builder                            | `address[]=YOUR_WALLET&builder[]=BUILDER_ADDRESS`                   |
| A wallet's BTC fills                                          | `address[]=YOUR_WALLET&coin[]=BTC`                                  |
| Recent BTC fills across wallets                               | `coin[]=BTC` — choose a start within the last 30 days               |
| BTC fills of at least 100,000 in quote-currency notional      | `coin[]=BTC&minNotional=100000` — historical windows up to 365 days |
| Large fills across all coins                                  | `minNotional=100000`                                                |
| A wallet's fills of at least 1,000 in quote-currency notional | `address[]=YOUR_WALLET&minNotional=1000`                            |

To include several wallets, repeat `address[]`. For example, `address[]=WALLET_1&address[]=WALLET_2` permits a window of up to 182 days. Use the same repeated-parameter format for `builder[]` and `coin[]`.

</details>

**Response and Pagination**

> **200 Success:** Returns `fills` (the current page of matching executions) and `nextCursor`.

Results are returned oldest first. Keep your filters and dates unchanged, and pass the returned `nextCursor` into the next request. Continue until `nextCursor` is `null`.

For a history longer than the allowed window, finish every page of the current window before moving to the next. The range limit and the page size are separate: a valid multi-day query can still need many page requests.

<details>

<summary>Pagination Example (Python)</summary>

This example retrieves all pages for the same wallet and period as the request examples above.

```python
import requests

url = "https://ht-api.coinmarketman.com/api/external/fills"
params = {
    "address[]": ["0x6e010dee6510fe74b27304c2449b8cd76f688ccb"],
    "start": "2025-11-01T00:00:00.000Z",
    "end": "2025-11-09T00:00:00.000Z",
    "limit": 50,
}
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

with requests.Session() as session:
    while True:
        response = session.get(url, params=params, headers=headers, timeout=30)
        response.raise_for_status()
        data = response.json()

        for fill in data["fills"]:
            print(fill)  # Process or store each fill here.

        cursor = data["nextCursor"]
        if cursor is None:
            break
        params["nextCursor"] = cursor
```

</details>

<details>

<summary>Response Example</summary>

Illustrative response with one fill shown. The wallet and timestamp match the request above. `CURSOR_FROM_RESPONSE` is a placeholder; use the actual cursor returned by the API, or stop when it is `null`.

{% code expandable="true" collapsedlinecount="10" %}

```json
{
  "fills": [
    {
      "oid": 227532187118,
      "address": "0x6e010dee6510fe74b27304c2449b8cd76f688ccb",
      "coin": "NEAR",
      "fullCoinName": "NEAR",
      "fillType": "perp",
      "px": 3.0437,
      "sz": 116.8,
      "side": "B",
      "time": "2025-11-08T11:52:15.332Z",
      "startPosition": 705085.9,
      "dir": "Open Long",
      "closedPnl": 0,
      "hash": "0x11ad8c71bc4e4f4e1327042f14e224020488005757416e20b57637c47b422938",
      "crossed": false,
      "fee": 0.01422,
      "builderFee": 0,
      "tid": 774735923292070,
      "feeToken": "USDC",
      "builder": ""
    }
  ],
  "nextCursor": "CURSOR_FROM_RESPONSE"
}
```

{% endcode %}

</details>

<details>

<summary>Notes on Fill Data</summary>

TWAP fills are listed with the address `0x0000000000000000000000000000000000000000000000000000000000000000`.

For executions belonging to a reconstructed closed trade, use [Get Closed Trade Fills](https://docs.coinmarketman.com/endpoints/trader-and-wallet-data.md#get-closed-trade-fills).

</details>

***

### Get User Funding Fills

`/api/external/fundings`

{% hint style="success" %}
**Unique to HyperTracker**
{% endhint %}

Retrieves a paginated list of funding payments received or paid by a wallet.

Funding is charged or paid hourly while a perp position is open. This endpoint allows you to review a wallet’s full funding history, including the market, position size, funding rate, funding amount, timestamp, and block number for each funding event.

HyperTracker stores funding history from July 2025 onwards, giving access to historical user funding data beyond what is typically available from standard Hyperliquid queries.

<details>

<summary>Query Parameters</summary>

<table><thead><tr><th width="113.57464599609375">Parameter</th><th width="84.3255615234375">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code></td><td><code>string</code></td><td>Wallet address to retrieve funding fills for. Required.</td></tr><tr><td><code>coin</code></td><td><code>string</code></td><td>Optional coin symbol filter. Use this to return funding fills for a specific market only, for example <code>ETH</code>, <code>BTC</code>, <code>HYPE</code>, or <code>xyz:SP500</code>.</td></tr><tr><td><code>startTime</code></td><td><code>string</code></td><td>Optional start time for the requested funding history. If omitted, current time minus 7 days is used. The requested time range cannot exceed 1 month.</td></tr><tr><td><code>endTime</code></td><td><code>string</code></td><td>Optional end time for the requested funding history. If omitted, current time is used. The requested time range cannot exceed 1 month.</td></tr><tr><td><code>limit</code></td><td><code>number</code></td><td>Maximum number of funding records to return.</td></tr><tr><td><code>nextCursor</code></td><td><code>string</code></td><td>Cursor used for pagination. Use the <code>nextCursor</code> value from the previous response to request the next page of results.</td></tr></tbody></table>

</details>

Request Examples

{% tabs %}
{% tab title="Curl" %}
{% code collapsedlinecount="10" %}

```bash
curl --request GET \
  --url 'https://ht-api.coinmarketman.com/api/external/fundings?address=0x45d26f28196d226497130c4bac709d808fed4029&limit=10' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Accept: application/json'
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code collapsedlinecount="10" %}

```javascript
const response = await fetch(
  'https://ht-api.coinmarketman.com/api/external/fundings?address=0x45d26f28196d226497130c4bac709d808fed4029&limit=10',
  {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Accept': 'application/json'
    }
  }
);

const data = await response.json();
console.log(data);
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code collapsedlinecount="10" %}

```python
import requests

url = "https://ht-api.coinmarketman.com/api/external/fundings"

params = {
    "address": "0x45d26f28196d226497130c4bac709d808fed4029",
    "limit": 10
}

headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

print(data)
```

{% endcode %}
{% endtab %}
{% endtabs %}

Response

> **200 Success:** Returns a paginated list of funding fills for the supplied wallet address.

<details>

<summary>Response Fields</summary>

| Field                      | Type     | Description                                                                                                                                       |
| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fundings`                 | `array`  | Array of funding fill records matching the supplied filters.                                                                                      |
| `fundings[].time`          | `string` | Timestamp of the funding event in ISO 8601 format.                                                                                                |
| `fundings[].blockNumber`   | `number` | Hyperliquid block number associated with the funding event.                                                                                       |
| `fundings[].address`       | `string` | Wallet address that paid or received the funding.                                                                                                 |
| `fundings[].coin`          | `string` | Market symbol for the funding event.                                                                                                              |
| `fundings[].fundingAmount` | `number` | Funding amount paid or received by the wallet. Positive values represent funding received. Negative values represent funding paid.                |
| `fundings[].szi`           | `number` | Signed position size at the time of funding. Positive values usually indicate a long position. Negative values usually indicate a short position. |
| `fundings[].fundingRate`   | `number` | Funding rate applied for the funding interval.                                                                                                    |
| `nextCursor`               | `string` | Cursor for pagination. Pass this value as `nextCursor` in the next request to retrieve the next page.                                             |

</details>

<details>

<summary>Response Example</summary>

{% code collapsedlinecount="10" %}

```json
{
  "fundings": [
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "ZRO",
      "fundingAmount": 0.721909,
      "szi": -57600,
      "fundingRate": 0.0000112708
    },
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "xyz:XYZ100",
      "fundingAmount": -32.342499,
      "szi": 170,
      "fundingRate": 0.00000625
    },
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "xyz:SP500",
      "fundingAmount": 61.279887,
      "szi": 460,
      "fundingRate": -0.000017539
    },
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "xyz:MU",
      "fundingAmount": 31.322839,
      "szi": -1700,
      "fundingRate": 0.0000188889
    },
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "xyz:CL",
      "fundingAmount": 6.971355,
      "szi": -12720,
      "fundingRate": 0.00000625
    },
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "xyz:BRENTOIL",
      "fundingAmount": 75.432298,
      "szi": -25920,
      "fundingRate": 0.0000318821
    },
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "XRP",
      "fundingAmount": 1.972793,
      "szi": -149000,
      "fundingRate": 0.0000101629
    },
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "XPL",
      "fundingAmount": 1.738125,
      "szi": -1500000,
      "fundingRate": 0.0000125
    },
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "VVV",
      "fundingAmount": 0.980372,
      "szi": -15800,
      "fundingRate": 0.0000040723
    },
    {
      "time": "2026-05-29T14:00:00.045Z",
      "blockNumber": 1015113827,
      "address": "0x45d26f28196d226497130c4bac709d808fed4029",
      "coin": "VIRTUAL",
      "fundingAmount": -1.188879,
      "szi": -94500,
      "fundingRate": -0.0000178602
    }
  ],
  "nextCursor": "eyJ0aW1lIjoxNzgwMDYzMjAwMDQ1LCJibG9ja051bWJlciI6MTAxNTExMzgyNywiY29pbiI6IlZJUlRVQUwifQ.NR9JdFT8bt2rV4Lspmqe2t8fBCW_faisn7CJ2XLRbAU"
}
```

{% endcode %}

</details>

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coinmarketman.com/endpoints/trader-and-wallet-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
