View as Markdown
Codex icon

Codex ACTION

Get Token Events

Returns on-chain trading events (swaps, mints, burns) for a token or pair address. Each event includes event type, USD price, timestamp, transaction hash, and maker address. Filter by event type, wallet address, price range, timestamp window, and more. Use Get Networks to resolve the numeric networkId if needed. Supports cursor-based pagination — pass the cursor from the previous response to fetch the next page. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Codex account once, then configure and run Get Token Events from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "codex-get-token-events",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    codex: { authProvisionId: "apn_xxxxxxx" },
    address: "Token Address",
    networkId: 10,
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Get Token Events inputs
Property Type Description
address Token Address string
Token or pair contract address to fetch events for.
Required
networkId Network ID integer
Numeric blockchain network ID. Use Get Networks to list all supported networks and their IDs (e.g., 1 = Ethereum, 137 = Polygon).
Required
eventType Event Type string
Filter by the on-chain event type.
Optional
eventDisplayType Event Display Types string[]
Filter by one or more display-level event types.
Optional
quoteToken Quote Token string
Filter by which token is treated as the quote token in the pair.
Optional
maker Maker Address string
Filter events to a specific wallet address (the transaction initiator).
Optional
timestampFrom Timestamp From (Unix) integer
Start of the time window as a Unix timestamp in seconds.
Optional
timestampTo Timestamp To (Unix) integer
End of the time window as a Unix timestamp in seconds.
Optional
priceUsd Price USD Filter string
Filter events by token price in USD. Provide a JSON object with comparison operators: gt, gte, lt, lte. Example: {"gte": 0.5, "lte": 2.0}.
Optional
priceUsdTotal Total USD Value Filter string
Filter events by total trade value in USD. Provide a JSON object with comparison operators: gt, gte, lt, lte. Example: {"gt": 1000}.
Optional
priceBaseToken Price Base Token Filter string
Filter events by price denominated in the base token. Provide a JSON object with comparison operators: gt, gte, lt, lte. Example: {"gt": 0.001}.
Optional
amountNonLiquidityToken Token Amount Filter string
Filter events by the non-liquidity token amount. Provide a JSON object with comparison operators: gt, gte, lt, lte. Example: {"gte": 100}.
Optional
symbolType Symbol Type string
Filter by whether the address resolves to a token or pool symbol.
Optional
direction Direction string
Sort order for results. DESC returns the most recent events first (default); ASC returns oldest first.
Optional
limit Limit integer
Maximum number of results to return.
Optional
cursor Cursor string
Pagination cursor from a previous response's cursor field. Omit for the first page.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
codex-get-token-events
Version
0.0.2
App
Codex
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes