Codex ACTION
Get Wallet Transactions
Returns token holdings and aggregated trading stats for one or more wallet addresses. Each result includes token balance, realized P&L, buy/sell counts, and average hold period across 1d, 1w, 30d, and 1y windows. Filter by wallet address, token, network, labels, or numeric range filters. Use Get Networks to resolve the numeric
networkId if needed. Supports offset-based pagination — pass offset (and optional limit) to fetch subsequent pages. 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 Wallet Transactions 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-wallet-transactions",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
codex: { authProvisionId: "apn_xxxxxxx" },
wallets: ["Wallet Addresses"],
tokenIds: ["Token IDs"],
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "codex-get-wallet-transactions",
"configured_props": {
"codex": { "authProvisionId": "apn_xxxxxxx" },
"wallets": ["Wallet Addresses"],
"tokenIds": ["Token IDs"]
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "codex",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "codex-get-wallet-transactions",
arguments: {
wallets: ["Wallet Addresses"],
tokenIds: ["Token IDs"],
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
wallets Wallet Addresses | string[] | Filter results to one or more wallet addresses. Optional |
tokenIds Token IDs | string[] | Filter by token(s) in address:networkId format (e.g., 0xc02aaa...c756cc2:1). Maximum 50 per request. Optional |
networkId Network ID | integer | Filter results to a specific blockchain network. Use Get Networks to find IDs. Optional |
phrase Search Phrase | string | Search phrase for wallet filtering. Optional |
includeLabels Include Labels | string[] | Return only wallets that have all of the specified labels. Optional |
excludeLabels Exclude Labels | string[] | Exclude wallets that have any of the specified labels. Optional |
rankings Rankings | string | Sort results by one or more attributes. Provide a JSON array of ranking objects, each with attribute (e.g., tokenBalanceLiveUsd, realizedProfitUsd1w) and direction (ASC or DESC). Example: [{"attribute": "realizedProfitUsd1w", "direction": "DESC"}]. Optional |
filtersV2 Filters | string | Numeric range filters as a JSON object. Supports gt, gte, lt, lte operators on fields like tokenBalanceLiveUsd, realizedProfitUsd1w, buys1d, sells1d, etc. Example: {"tokenBalanceLiveUsd": {"gt": 1000}}. Optional |
limit Limit | integer | Maximum number of results to return. Optional |
offset Offset | integer | Number of results to skip. Use with limit to page through results (e.g., offset: 20, limit: 20 fetches the second 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-wallet-transactions
- Version
- 0.0.2
- App
- Codex
- Authentication
- API key
- Read-only
- Yes
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗