BlockReq
Back to all articles

Rpc Tutorials

Base stock-token Swap watch: whitelist big prints

Coinbase tokenized stocks on Base via Aerodrome/Uniswap Swap: whitelist stock tokens + big-print threshold on BlockReq Base public WSS. Register for 3M free requests monthly.

BlockReq EngineeringSeptember 10, 20265 min read

Base stock-token Swap watch: whitelist big prints

Coinbase tokenized stocks trade on Base through Aerodrome / Uniswap Swap—this post watches big prints on listed stock tokens: whitelist hit + size over threshold → card. PairCreated open-listen stays with Base new-pool sniper; here we converge on the Swap flow.

Run on the public endpoint · blockreq.com register for 3M free requests monthly.

UseEndpoint
Public HTTPShttps://base-rpc.blockreq.com/v1/rpc/public
Public WSSwss://base-rpc.blockreq.com/v1/rpc/public
PrivateTrailing public{API_KEY} (keys stay local)

Chain: Base Mainnet EVM chainId = 0x2105 (8453). Public endpoints · eth_subscribe · Plans · Register.

1. Hook: stock whitelist × big Swap prints

Tape feelOn-chain signalWatch
Stock in/outAerodrome / Uni V2·V3 SwaptokenIn / tokenOut ∈ whitelist
Big printamountIn / amountOut ≥ thresholdUSD notionals / raw amounts
Pool routenarrow pair / pool listeneditable router / pool table
Sniper tapehit → outboundDedupe = txHash + logIndex

RH stock-pair meme launch watches PairCreated launches; this Base post watches the ongoing stock-token Swap stream—same family, different signal layer.

2. Event: whitelist-filter Swap logs

Keep a local JSON STOCK_WHITELIST (Coinbase tokenized stock contracts, lowercased, deduped) plus MIN_AMOUNT_* thresholds. One Base public WSS: subscribe Swap topics on Router / Pair / Pool addresses, decode, then table-check.

Step A · Subscribe V2-style Swap (Aerodrome / Uni V2 pair)

{
  "jsonrpc": "2.0", "id": 1, "method": "eth_subscribe",
  "params": ["logs", {
    "address": ["PAIR_OR_POOL_LIST"],
    "topics": ["0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822"]
  }]
}

Step B · Subscribe V3 Swap (parallel OK)

{
  "jsonrpc": "2.0", "id": 2, "method": "eth_subscribe",
  "params": ["logs", {
    "address": ["V3_POOL_LIST"],
    "topics": ["0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67"]
  }]
}
  • PAIR_OR_POOL_LIST / V3_POOL_LIST: stock-related pool address tables (env / local JSON).
  • topics[0]: confirm against pair/pool ABI; Aerodrome and Uni share the same Swap topic family.
  • Decode amount0 / amount1 / sender → map tokenIn / tokenOut → whitelist hit and size ≥ threshold → write printState.

Step C · Big-print card fields

{ chain: "base", venue: "aerodrome|uniswap", tokenIn, tokenOut, amountIn, amountOut, pairOrPool, txHash, blockNumber, ts }

Dedupe on txHash + logIndex; demo thresholds are editable (e.g. USD notionals ≥ 10k, or raw amount ≥ MIN_RAW).

3. Browser demo

Connect Base public WSS, paste stock whitelist + pool table + size threshold, hit Start, stream big-print cards.

:::pages-demo https://blockreq.com/demos1/base-stock-token-swap-listen/en/ title: Base stock-token Swap watch height: 520 :::

WSS  → wss://base-rpc.blockreq.com/v1/rpc/public
HTTPS→ https://base-rpc.blockreq.com/v1/rpc/public
env  → STOCK_WHITELIST · PAIR_OR_POOL_LIST · V3_POOL_LIST · MIN_AMOUNT_USD · MIN_RAW

Paths: /demos1/base-stock-token-swap-listen/zh/ · /demos1/base-stock-token-swap-listen/en/. For keyed: swap trailing public for {API_KEY}.

Quota: blockreq.com register for 3M free requests monthly (public endpoint connects as-is).

4. Alert rhythm

  1. Swap arrives → decode tokenIn / tokenOut / amounts.
  2. Whitelist + threshold → either side ∈ STOCK_WHITELIST and size clears the bar.
  3. OutboundBase stock print · symbol=… · amt=… · venue=… · blk=….
  4. Dedupe → one push per txHash + logIndex.

On disconnect: reconnect and re-subscribe; gap-fill with HTTPS eth_getLogs on the same pair/pool set. POST → https://base-rpc.blockreq.com/v1/rpc/public.

5. Summary + CTA

  1. Grain: Base stock-token watch = whitelist Swap big prints.
  2. Recipe: pool table + Swap topic + STOCK_WHITELIST + size threshold → print card.
  3. Runnable: browser on BlockReq Base public WSS; demos1 paths above.
  4. Start: Public endpoints + blockreq.com register for 3M free requests monthly.

Next: pin whitelist / threshold JSON → webhook → stack on-screen with Base new-pool sniper open cards. Docs · Pricing · Register.