Skip to main content
Glama
recallnet

Trading Simulator MCP Server

by recallnet

get_trades

Retrieve trade history for your team in the Trading Simulator, with options to filter by token address, blockchain type, and manage pagination using limit and offset parameters.

Instructions

Get trade history for your team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoFilter by blockchain type
limitNoMaximum number of trades to retrieve (default: 20)
offsetNoOffset for pagination
tokenNoFilter by token address

Implementation Reference

  • The handler function for the 'get_trades' tool within the CallToolRequestSchema switch statement. It validates input arguments, constructs TradeHistoryParams, calls tradingClient.getTradeHistory(), and returns the response as JSON.
    case "get_trades": { if (!args || typeof args !== "object") { throw new Error("Invalid arguments for get_trades"); } const tradeParams: TradeHistoryParams = {}; if ("limit" in args) tradeParams.limit = args.limit as number; if ("offset" in args) tradeParams.offset = args.offset as number; if ("token" in args) tradeParams.token = args.token as string; if ("chain" in args) tradeParams.chain = args.chain as BlockchainType; const response = await tradingClient.getTradeHistory(tradeParams); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], isError: false }; }
  • src/index.ts:130-157 (registration)
    Registration of the 'get_trades' tool in the TRADING_SIM_TOOLS array, including name, description, and input schema. This array is returned by ListToolsRequestSchema handler.
    { name: "get_trades", description: "Get trade history for your team", inputSchema: { type: "object", properties: { limit: { type: "number", description: "Maximum number of trades to retrieve (default: 20)" }, offset: { type: "number", description: "Offset for pagination" }, token: { type: "string", description: "Filter by token address" }, chain: { type: "string", enum: ["svm", "evm"], description: "Filter by blockchain type" } }, additionalProperties: false, $schema: "http://json-schema.org/draft-07/schema#" } },
  • TypeScript interface definition for TradeHistoryParams, used to type the parameters passed to tradingClient.getTradeHistory in the get_trades handler.
    export interface TradeHistoryParams { limit?: number; offset?: number; token?: string; chain?: BlockchainType; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/recallnet/trading-simulator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server