Skip to main content
Use this recipe for an activity summary in your app. /api/v2/activity returns an aggregate snapshot across Route’s tracked settlement contracts. It does not return a wallet’s trade history or a list of individual transactions.

Read the totals

Run this with Node.js 20 or later:

Label the numbers accurately

transactions counts unique successful swap transactions. Approvals and failed transactions are excluded. Historical settlement contracts and early tests are included. Label estimatedVolumeUsd as estimated volume. It values one side of each swap using USDG or an indexed ETH price, rather than the dollar price when each historical trade happened. Swaps without a supported pricing asset are counted in unpricedSwaps. A null volume means pricing was unavailable; do not display it as zero.

Handle stale snapshots

Show asOf alongside the totals. If stale is true, keep the last values visible with a stale-data label. On a request failure, preserve the last successful snapshot instead of resetting the counter to zero. Poll while the page is visible, no more often than every 10 seconds. The index excludes 64 recent blocks, so a newly confirmed swap may not appear immediately. These are Route-wide settlement totals, not statistics for the whole chain. See the activity endpoint for the response schema.