PollarPollar
Core Concepts

Transaction History

Pollar provides complete transaction history for every wallet through two complementary layers — one from the Stellar network and one from Pollar's own database.


Two-layer architecture

LayerSourceRetention
RecentStellar RPC7 days
FullPollar PostgreSQLIndefinite

The Pollar Server captures every transaction at fee-bump signing time and persists it to PostgreSQL. Because Pollar processes all fee-bumps for your app, it has full visibility without indexing the entire blockchain.

Horizon (the older Stellar API) is formally deprecated by SDF. Pollar uses Stellar RPC exclusively.


SDK — React hook

'use client';
import { usePollar } from '@pollar/react';

export function TxHistory() {
  const { txHistory, loadingHistory, fetchMoreHistory, hasMore } = usePollar();

  return (
    <div>
      <ul>
        {txHistory.map((tx) => (
          <li key={tx.hash}>
            {tx.type === 'send' ? '↑' : '↓'} {tx.amount} {tx.asset}
            <span>{new Date(tx.timestamp).toLocaleDateString()}</span>
          </li>
        ))}
      </ul>
      {hasMore && (
        <button onClick={fetchMoreHistory} disabled={loadingHistory}>
          {loadingHistory ? 'Loading...' : 'Load more'}
        </button>
      )}
    </div>
  );
}

SDK — Core client

const { transactions, nextCursor, hasMore } = await pollar.getHistory({
  walletId: 'wal_abc123',
  limit: 20,        // default: 20, max: 100
  cursor: undefined, // pass nextCursor from previous response to paginate
});

REST API

Available for backend use with your secret key.

GET https://api.pollar.xyz/wallets/:walletId/transactions
Authorization: Bearer sec_testnet_xxxxxxxxxxxxxxxxxxxx

Query parameters:

ParameterTypeDefaultDescription
limitnumber20Transactions per page. Max 100.
cursorstringPagination cursor from previous response.
typestringFilter: payment, activation, trustline.
assetstringFilter by asset code, e.g. USDC.
fromISO 8601Start date.
toISO 8601End date.

Response:

{
  "transactions": [
    {
      "hash": "a1b2c3d4...",
      "type": "payment",
      "asset": "USDC",
      "amount": "10.00",
      "from": "GABC...",
      "to": "GXYZ...",
      "feeSponsored": true,
      "ledger": 1234567,
      "timestamp": "2026-03-15T10:30:00Z"
    }
  ],
  "cursor": "eyJsZWRnZXIiOjEyMzQ1NjZ9",
  "hasMore": true
}

Pagination

Pollar uses cursor-based pagination. Cursors are stable — new transactions don't shift existing pages.

async function getAllTransactions(walletId: string) {
  const all = [];
  let cursor: string | undefined;

  do {
    const page = await pollar.getHistory({ walletId, limit: 100, cursor });
    all.push(...page.transactions);
    cursor = page.nextCursor;
  } while (page.hasMore);

  return all;
}

Transaction types

TypeDescription
paymentAsset transfer between wallets
activationWallet funded — XLM reserve established
trustlineAsset trustline enabled
receiveIncoming payment from outside Pollar

TxRecord type

type TxRecord = {
  hash: string;
  type: 'payment' | 'activation' | 'trustline' | 'receive';
  asset: string;
  amount: string;
  from: string;
  to: string;
  feeSponsored: boolean;
  ledger: number;
  timestamp: string; // ISO 8601
};

On this page

Was this helpful?