API reference

GET /v1/trades

One endpoint, one version, one exact-match member parameter. The public contract is stable and intentionally decoupled from FMP field names.

Endpoint

https://capitolgains.xyz/v1/trades

Price$0.05 per call
NetworkBase Sepolia
AssetUSDC
VersionV1
copy-paste requestbash
curl "https://capitolgains.xyz/v1/trades?member=John%20Fetterman&from=2026-04-01&to=2026-04-30"

Parameters

Query parameters

V1 requires exact display-name matching. Future versions may add fuzzy matching or a names endpoint; this version is deliberately explicit.

NameRequiredFormatBehavior
memberYesExact nameMust be Gary Peters or John Fetterman.
fromNoYYYY-MM-DDInclusive lower transaction_date bound.
toNoYYYY-MM-DDInclusive upper transaction_date bound.

Response

Stable JSON shape

The response exposes normalized transaction fields. raw_json is intentionally not public.

Free static sample

This is committed fixture data, not a live paid request.

sample responsejson
{
  "member": {
    "id": "7bb1c798-afe2-4ba4-bdff-cb7cf1d8bbf6",
    "normalized_name": "john fetterman",
    "display_name": "John Fetterman",
    "first_name": "John",
    "last_name": "Fetterman",
    "chamber": "senate",
    "office": "John Fetterman",
    "party": "D",
    "state": "PA",
    "bioguide_id": "F000479"
  },
  "trades": [
    {
      "id": "b127c34f-3a6d-4419-a9d9-3f47e1c8edbf",
      "member_id": "7bb1c798-afe2-4ba4-bdff-cb7cf1d8bbf6",
      "symbol": "BXSL",
      "transaction_date": "2026-04-13",
      "disclosure_date": "2026-05-06",
      "owner": "",
      "asset_description": "BLACKSTONE SECURED LENDING F",
      "asset_type": "Corporate Bond",
      "transaction_type": "Sale",
      "amount_raw": "$1,001 - $15,000",
      "amount_range_low": 1001,
      "amount_range_high": 15000,
      "comment": null,
      "source_link": "https://efdsearch.senate.gov/search/view/ptr/f34c4d7a-29ba-48fb-beea-d94c1368cc99/",
      "fetched_at": "2026-05-26T15:45:13.448Z"
    },
    {
      "id": "725aab07-37d2-4f98-a407-40d965f44711",
      "member_id": "7bb1c798-afe2-4ba4-bdff-cb7cf1d8bbf6",
      "symbol": "ATH",
      "transaction_date": "2026-04-10",
      "disclosure_date": "2026-05-06",
      "owner": "",
      "asset_description": "Athene Holding Ltd",
      "asset_type": "Corporate Bond",
      "transaction_type": "Purchase",
      "amount_raw": "$1,001 - $15,000",
      "amount_range_low": 1001,
      "amount_range_high": 15000,
      "comment": null,
      "source_link": "https://efdsearch.senate.gov/search/view/ptr/f34c4d7a-29ba-48fb-beea-d94c1368cc99/",
      "fetched_at": "2026-05-26T15:45:13.448Z"
    }
  ],
  "metadata": {
    "count": 2,
    "cache_hit": true,
    "as_of": "2026-05-26T15:45:14.471Z",
    "fetched_at": "2026-05-26T15:45:14.471Z"
  }
}
fixture-backed examplejson
{
  "member": {
    "id": "7bb1c798-afe2-4ba4-bdff-cb7cf1d8bbf6",
    "normalized_name": "john fetterman",
    "display_name": "John Fetterman",
    "first_name": "John",
    "last_name": "Fetterman",
    "chamber": "senate",
    "office": "John Fetterman",
    "party": "D",
    "state": "PA",
    "bioguide_id": "F000479"
  },
  "trades": [
    {
      "id": "b127c34f-3a6d-4419-a9d9-3f47e1c8edbf",
      "member_id": "7bb1c798-afe2-4ba4-bdff-cb7cf1d8bbf6",
      "symbol": "BXSL",
      "transaction_date": "2026-04-13",
      "disclosure_date": "2026-05-06",
      "owner": "",
      "asset_description": "BLACKSTONE SECURED LENDING F",
      "asset_type": "Corporate Bond",
      "transaction_type": "Sale",
      "amount_raw": "$1,001 - $15,000",
      "amount_range_low": 1001,
      "amount_range_high": 15000,
      "comment": null,
      "source_link": "https://efdsearch.senate.gov/search/view/ptr/f34c4d7a-29ba-48fb-beea-d94c1368cc99/",
      "fetched_at": "2026-05-26T15:45:13.448Z"
    },
    {
      "id": "725aab07-37d2-4f98-a407-40d965f44711",
      "member_id": "7bb1c798-afe2-4ba4-bdff-cb7cf1d8bbf6",
      "symbol": "ATH",
      "transaction_date": "2026-04-10",
      "disclosure_date": "2026-05-06",
      "owner": "",
      "asset_description": "Athene Holding Ltd",
      "asset_type": "Corporate Bond",
      "transaction_type": "Purchase",
      "amount_raw": "$1,001 - $15,000",
      "amount_range_low": 1001,
      "amount_range_high": 15000,
      "comment": null,
      "source_link": "https://efdsearch.senate.gov/search/view/ptr/f34c4d7a-29ba-48fb-beea-d94c1368cc99/",
      "fetched_at": "2026-05-26T15:45:13.448Z"
    }
  ],
  "metadata": {
    "count": 2,
    "cache_hit": true,
    "as_of": "2026-05-26T15:45:14.471Z",
    "fetched_at": "2026-05-26T15:45:14.471Z"
  }
}

Errors

Typed error bodies

A malformed paid request can settle and then return a validation error. Clients should validate locally before paying.

400missing_membermember is absent or blank.
400invalid_datefrom or to is not a valid YYYY-MM-DD date.
400invalid_date_rangefrom is later than to.
402payment_requiredx402 payment requirements are returned before route execution.
404member_not_foundmember is not one of the exact V1 names.
502upstream_failureFMP failed during a cold or stale cache refresh.

Payment

How x402 payment works

x402 turns HTTP 402 into a machine-payable API handshake. Agents receive payment requirements, sign a USDC payment on Base Sepolia, then retry the same request.

A funded Base Sepolia wallet is required. Capitol Gains uses x402 exact payments and returns JSON after settlement. Learn more at x402.org.