Skip to main content

Partner Stats

The stats endpoints return metrics scoped to your partner account — not platform-wide totals. Use them to build dashboards, monitor performance, or integrate your volume data into internal reporting.
All stats endpoints require full API key authentication (Authorization: <partnerId>:<apiSecret>). The public partner-id header does not grant access.

GET /v2/stats/volume

Returns cumulative volume metrics for your partner account.

Endpoint

GET /v2/stats/volume

Parameters

None.

Example Request

curl -X GET "https://api-partner.houdiniswap.com/v2/stats/volume" \
  -H "Authorization: <partnerId>:<apiSecret>"

Example Response

{
  "count": 1284,
  "totalTransactedUSD": 4821903.55,
  "totalOrders": 1284,
  "thisMonthVolumeUsd": 312450.20,
  "lastMonthVolumeUsd": 498201.75,
  "thisMonthOrders": 215
}

Response Fields

FieldTypeDescription
countnumberTotal completed transactions (all time)
totalTransactedUSDnumberTotal transacted value in USD (all time)
totalOrdersnumberAlias for count
thisMonthVolumeUsdnumberTransacted value in USD for the current calendar month
lastMonthVolumeUsdnumberTransacted value in USD for the previous calendar month
thisMonthOrdersnumberCompleted transactions in the current calendar month

GET /v2/stats/weeklyVolume

Returns a per-week breakdown of your partner volume, ordered chronologically.

Endpoint

GET /v2/stats/weeklyVolume

Parameters

None.

Example Request

curl -X GET "https://api-partner.houdiniswap.com/v2/stats/weeklyVolume" \
  -H "Authorization: <partnerId>:<apiSecret>"

Example Response

[
  {
    "week": 15,
    "year": 2026,
    "count": 87,
    "anonymous": 34,
    "volume": 41250.00,
    "commission": 103.13
  },
  {
    "week": 16,
    "year": 2026,
    "count": 112,
    "anonymous": 45,
    "volume": 58930.50,
    "commission": 147.33
  }
]

Response Fields

FieldTypeDescription
weeknumberISO week number (1–53)
yearnumberYear
countnumberTotal transactions for the week
anonymousnumberNumber of private (anonymous) transactions
volumenumberTotal transaction volume in USD
commissionnumberCommission earned in USD for the week

GET /v2/stats/chart

Returns time-series data for a given metric over a custom date range. Useful for building volume charts in dashboards or analytics tools.

Endpoint

GET /v2/stats/chart

Parameters

FieldTypeRequiredDescription
metricstringYesMetric to chart. Currently supported: volume
fromstringYesStart of range (ISO 8601, e.g. 2026-01-01T00:00:00Z)
tostringYesEnd of range (ISO 8601, e.g. 2026-04-22T23:59:59Z)
granularitystringNoBucket size: day (default) or month

Example Request

curl -X GET "https://api-partner.houdiniswap.com/v2/stats/chart?metric=volume&from=2026-03-23T00:00:00Z&to=2026-04-22T23:59:59Z&granularity=day" \
  -H "Authorization: <partnerId>:<apiSecret>"

Example Response

[
  { "date": "2026-03-23", "volumeUsd": 12430.50, "count": 28 },
  { "date": "2026-03-24", "volumeUsd": 9870.00, "count": 21 },
  { "date": "2026-03-25", "volumeUsd": 15210.75, "count": 35 }
]

Response Fields

FieldTypeDescription
datestringBucket date. Format: YYYY-MM-DD for day, YYYY-MM for month
volumeUsdnumberTotal transacted value in USD for the bucket
countnumberNumber of completed transactions in the bucket
Days or months with no activity are omitted from the response. Your charting code should fill in zero values for missing dates.

Code Example

Fetch all three stats endpoints and log a summary:
const BASE = "https://api-partner.houdiniswap.com/v2";
const AUTH = `${process.env.PARTNER_ID}:${process.env.API_SECRET}`;

const headers = { Authorization: AUTH };

// Volume summary
const volumeRes = await fetch(`${BASE}/stats/volume`, { headers });
const volume = await volumeRes.json();
console.log(`All-time: ${volume.count} orders / $${volume.totalTransactedUSD.toFixed(2)}`);
console.log(`This month: ${volume.thisMonthOrders} orders / $${volume.thisMonthVolumeUsd.toFixed(2)}`);

// Last 30 days chart (daily granularity)
const to = new Date().toISOString();
const from = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString();
const chartRes = await fetch(
  `${BASE}/stats/chart?metric=volume&from=${from}&to=${to}&granularity=day`,
  { headers }
);
const chart = await chartRes.json();
console.log(`Chart data points: ${chart.length}`);

// Weekly breakdown
const weeklyRes = await fetch(`${BASE}/stats/weeklyVolume`, { headers });
const weekly = await weeklyRes.json();
const latestWeek = weekly[weekly.length - 1];
console.log(`Week ${latestWeek.week}/${latestWeek.year}: $${latestWeek.volume} volume, $${latestWeek.commission} commission`);