pulse_recent_closed_positions
Retrieve recently closed positions across all traders with entry/exit prices and hold duration. Filter by coin, minimum size, and hold time to find HFT trades, stopped-out positions, or large closings.
Instructions
Get recently closed positions across all traders. See what positions were just closed in the last N minutes/hours — with entry/exit prices and hold duration. Filterable by coin, minimum notional size, and hold duration range. Use to find: sub-second HFT trades (maxDuration=1000), positions that just got stopped out, large positions that just closed (minNotional=100000), quick scalps vs long holds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| useToonFormat | No | Return data in compact toon format (default: true). Set to false for standard JSON. | |
| since | No | Time window: e.g. '10m' (minutes), '1h' (hours), '1d' (days) | 1h |
| limit | No | Number of positions to return | |
| coin | No | Filter by coin symbol (e.g. BTC, ETH, SOL). For builder dex: prefix:COIN (e.g. xyz:SILVER) | |
| minNotional | No | Minimum notional value in USD (e.g. 100000 for $100K+ positions) | |
| minDuration | No | Minimum hold duration in milliseconds (e.g. 60000 for positions held at least 1 minute) | |
| maxDuration | No | Maximum hold duration in milliseconds (e.g. 1000 for sub-second HFT trades, 60000 for under 1 minute) |
Implementation Reference
- src/index.ts:890-914 (registration)Tool registration for 'pulse_recent_closed_positions'. Defines the tool name, description, input schemas (zod), and the async handler that calls the API endpoint '/pulse/closed-positions/recent' with filtered query parameters.
// TOOL 26: Recent Closed Positions (Global) // ══════════════════════════════════════════════════════════ if (shouldRegister("pulse_recent_closed_positions")) server.registerTool( "pulse_recent_closed_positions", { description: "Get recently closed positions across all traders. See what positions were just closed in the last N minutes/hours — with entry/exit prices and hold duration. Filterable by coin, minimum notional size, and hold duration range. Use to find: sub-second HFT trades (maxDuration=1000), positions that just got stopped out, large positions that just closed (minNotional=100000), quick scalps vs long holds.", inputSchema: { useToonFormat: useToonFormatSchema, since: sinceSchema.default("1h"), limit: z.number().min(1).max(200).default(50).describe("Number of positions to return"), coin: z.string().optional().describe("Filter by coin symbol (e.g. BTC, ETH, SOL). For builder dex: prefix:COIN (e.g. xyz:SILVER)"), minNotional: z.number().optional().describe("Minimum notional value in USD (e.g. 100000 for $100K+ positions)"), minDuration: z.number().optional().describe("Minimum hold duration in milliseconds (e.g. 60000 for positions held at least 1 minute)"), maxDuration: z.number().optional().describe("Maximum hold duration in milliseconds (e.g. 1000 for sub-second HFT trades, 60000 for under 1 minute)"), }, }, async ({ useToonFormat, since, limit, coin, minNotional, minDuration, maxDuration }) => { const params: Record<string, string> = { since, limit: String(limit) }; if (coin) params.coin = normalizeCoin(coin); if (minNotional != null) params.minNotional = String(minNotional); if (minDuration != null) params.minDuration = String(minDuration); if (maxDuration != null) params.maxDuration = String(maxDuration); return toolResult(await callAPI(useToonFormat, "/pulse/closed-positions/recent", params)); } ); - src/index.ts:906-913 (handler)Handler function for pulse_recent_closed_positions. Extracts params (since, limit, coin, minNotional, minDuration, maxDuration), normalizes coin if provided, and calls the backend API at /pulse/closed-positions/recent.
async ({ useToonFormat, since, limit, coin, minNotional, minDuration, maxDuration }) => { const params: Record<string, string> = { since, limit: String(limit) }; if (coin) params.coin = normalizeCoin(coin); if (minNotional != null) params.minNotional = String(minNotional); if (minDuration != null) params.minDuration = String(minDuration); if (maxDuration != null) params.maxDuration = String(maxDuration); return toolResult(await callAPI(useToonFormat, "/pulse/closed-positions/recent", params)); }