list_offchain_actions
Filter and retrieve off-chain action history by venue and status using pagination.
Instructions
List off-chain action history (signedData/signedHttp) with venue/status filter and pagination.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| venue | No | Filter by venue name (e.g. polymarket, hyperliquid) | |
| status | No | Filter by status (e.g. PENDING, FILLED, CANCELED, EXPIRED) | |
| limit | No | Maximum number of results to return | |
| offset | No | Pagination offset | |
| wallet_id | No | Wallet ID. Auto-resolved for single-wallet sessions. |
Implementation Reference
- The registerListOffchainActions function registers the 'list_offchain_actions' MCP tool. The handler (lines 32-42) extracts optional filters (venue, status, limit, offset) from args, builds URLSearchParams, and calls apiClient.get on the /v1/wallets/{walletId}/actions endpoint, returning the result via toToolResult.
export function registerListOffchainActions( server: McpServer, apiClient: ApiClient, walletContext?: WalletContext, ): void { server.tool( 'list_offchain_actions', withWalletPrefix( 'List off-chain action history (signedData/signedHttp) with venue/status filter and pagination.', walletContext?.walletName, ), { venue: z.string().optional().describe('Filter by venue name (e.g. polymarket, hyperliquid)'), status: z.string().optional().describe('Filter by status (e.g. PENDING, FILLED, CANCELED, EXPIRED)'), limit: z.number().optional().describe('Maximum number of results to return'), offset: z.number().optional().describe('Pagination offset'), wallet_id: z.string().optional().describe('Wallet ID. Auto-resolved for single-wallet sessions.'), }, async (args) => { const walletId = args.wallet_id || 'default'; const params = new URLSearchParams(); if (args.venue !== undefined) params.set('venue', args.venue); if (args.status !== undefined) params.set('status', args.status); if (args.limit !== undefined) params.set('limit', String(args.limit)); if (args.offset !== undefined) params.set('offset', String(args.offset)); const qs = params.toString(); const result = await apiClient.get(`/v1/wallets/${walletId}/actions${qs ? `?${qs}` : ''}`); return toToolResult(result); }, ); } - Zod schema for tool input parameters: venue (optional string), status (optional string), limit (optional number), offset (optional number), wallet_id (optional string).
{ venue: z.string().optional().describe('Filter by venue name (e.g. polymarket, hyperliquid)'), status: z.string().optional().describe('Filter by status (e.g. PENDING, FILLED, CANCELED, EXPIRED)'), limit: z.number().optional().describe('Maximum number of results to return'), offset: z.number().optional().describe('Pagination offset'), wallet_id: z.string().optional().describe('Wallet ID. Auto-resolved for single-wallet sessions.'), }, - packages/mcp/src/server.ts:129-129 (registration)Registration call: registerListOffchainActions(server, apiClient, walletContext) is invoked inside createMcpServer to wire the tool into the MCP server.
registerListOffchainActions(server, apiClient, walletContext); - packages/sdk/src/types.ts:1326-1332 (schema)TypeScript interface ListOffchainActionsParams defining the shape of input parameters (walletId, venue?, status?, limit?, offset?) for the SDK's list-offchain-actions functionality.
export interface ListOffchainActionsParams { walletId: string; venue?: string; status?: string; limit?: number; offset?: number; } - packages/sdk/src/types.ts:1319-1324 (schema)TypeScript interface OffchainActionsListResponse defining the response shape with actions array (OffchainActionItem[]), total, limit, and offset fields.
export interface OffchainActionsListResponse { actions: OffchainActionItem[]; total: number; limit: number; offset: number; }