TriportRPC

Get wallet transaction history

GEThttps://api.triport.io/v1/polygon/wallet/history/0x0000000000000000000000000000000000001010?limit=2

Returns a paginated list of recent transactions for a Polygon address, newest first, with cursor-based paging.

Polygonbasic tier and above; sustained RPS per tier (see X-RateLimit-Limit), burst ×2

Fetches the transaction history for a single Polygon (PoS) address. Each entry is a PolyTransactionSummary — a compact view of an on-chain transaction (hash, block, counterparties, value, gas, and final status). Results are ordered newest-first.

The endpoint supports two ways to page through a long history. For simple paging, use limit + offset. For stable, drift-free paging over an actively-growing history, prefer the cursor form: pass the hash of the last item you saw as the before query parameter to request the page of transactions that come before it. Cursor paging avoids the duplicate/skip problems that offset can hit when new transactions land between requests.

This is a basic-tier operation. Free-tier keys are accepted for authentication but will receive 403 tier_insufficient.

Parameters

Path parameters

addressstringrequired
Polygon address, 0x-prefixed, 40 hex chars (Ethereum-compatible format). E.g. 0x0000000000000000000000000000000000001010.
Query parametersobject
beforestringoptional
Transaction-hash cursor. Returns the page of transactions that precede this hash. Use the hash of the last item from the previous page.
limitintegeroptional
Page size, 11000. Default 50.
offsetintegeroptional
Number of rows to skip, ≥ 0. Default 0. Ignored in favor of before when a cursor is supplied.

Response

Response fields

FieldTypeDescription
addressstringThe address the history was queried for (echoed back).
itemsarrayPage of transaction summaries, newest-first.
items[].hashstringTransaction hash. Use as the before cursor for the next page.
items[].block_numberinteger (int64)Block height the transaction was included in.
items[].block_hashstringHash of the including block.
items[].block_timeinteger (int64)Block timestamp, UNIX seconds.
items[].fromstringSender address.
items[].tostring | nullRecipient address; null for contract-creation transactions.
items[].value_weistringNative MATIC value transferred, in wei (decimal string, u256-safe).
items[].gas_usedinteger (int64)Gas consumed by the transaction.
items[].gas_price_weistringEffective gas price, in wei (decimal string).
items[].statusstringOne of success, reverted, pending.
pagination.limitintegerPage size applied (11000).
pagination.offsetintegerOffset applied.
pagination.totalintegerTotal rows available. May be absent when too expensive to compute.

Per-transaction fields hash, block_number, and from are always present; the remaining fields may be omitted when not applicable.

Errors

CodeMeaningWhen it happens
401unauthorized / trial_expired / subscription_expiredMissing or invalid credentials, or the key's trial/subscription has ended.
403tier_insufficient / method_unknownKey is below the required basic tier, or the method isn't part of the key's product.
429rate_limitedSustained RPS for the polygon_wallet category exceeded. Honor the Retry-After header.

All errors use the shared envelope (error, message, request_id). See errors.md for the full envelope and per-code fields. Rate-limit responses also carry X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-RateLimit-Category headers.

Examples

JavaScript (fetch)

const address = "0x0000000000000000000000000000000000001010";
const url = new URL(`https://api.triport.io/v1/polygon/wallet/history/${address}`);
url.searchParams.set("limit", "50");


const res = await fetch(url, {
  headers: {
    "Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
});


if (!res.ok) throw new Error(`${res.status} ${(await res.json()).error}`);
const page = await res.json();


// Cursor paging: request the next page using the last hash seen.
const last = page.items.at(-1);
if (last) url.searchParams.set("before", last.hash);

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const page = await client.polygon.wallet.history({
  address: "0x0000000000000000000000000000000000001010",
  limit: 50,
});


// Fetch the following page via the tx-hash cursor.
const last = page.items.at(-1);
const next = last
  ? await client.polygon.wallet.history({
      address: "0x0000000000000000000000000000000000001010",
      limit: 50,
      before: last.hash,
    })
  : null;

Python (triport-sdk)

import os
from triport import Triport


client = Triport(api_key=os.environ["TRIPORT_API_KEY"])


address = "0x0000000000000000000000000000000000001010"
page = client.polygon.wallet.history(address=address, limit=50)


# Cursor paging through the full history.
while page.items:
    for tx in page.items:
        print(tx.hash, tx.status, tx.value_wei)
    page = client.polygon.wallet.history(
        address=address, limit=50, before=page.items[-1].hash
    )

Notes

  • Cursor vs. offset: before is the recommended pager. Because new transactions are prepended as they confirm, plain offset paging can repeat or skip rows on a live address; cursor paging anchored on a tx hash is stable.
  • End of history: keep paging until items comes back empty.
  • pagination.total is best-effort and may be omitted for addresses where a full count is too expensive to compute — don't rely on it for loop termination.
  • Native value only: value_wei is the native MATIC transfer amount. For ERC-20 balances use wallet-tokens; for NFTs use wallet-nfts. For the current native balance see wallet-balance.