Skip to main content
Glama

zetrix_get_transaction_history

Retrieve completed transaction records from the Zetrix blockchain using transaction hash or block sequence number to track and verify transaction history.

Instructions

Get completed transaction records

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashNoTransaction hash (optional)
ledgerSeqNoBlock sequence number (optional)

Implementation Reference

  • The main handler function that executes the tool logic by querying the Zetrix API endpoint /getTransactionHistory with optional hash and ledger_seq parameters.
    async getTransactionHistory(hash?: string, ledgerSeq?: number): Promise<any> { try { const params: any = {}; if (hash) params.hash = hash; if (ledgerSeq) params.ledger_seq = ledgerSeq; const response = await this.client.get("/getTransactionHistory", { params, }); if (response.data.error_code !== 0) { throw new Error( response.data.error_desc || `API Error: ${response.data.error_code}` ); } return response.data.result; } catch (error) { if (axios.isAxiosError(error)) { throw new Error(`Failed to get transaction history: ${error.message}`); } throw error; } }
  • Defines the input schema and metadata for the tool, including optional parameters hash and ledgerSeq.
    { name: "zetrix_get_transaction_history", description: "Get completed transaction records", inputSchema: { type: "object", properties: { hash: { type: "string", description: "Transaction hash (optional)", }, ledgerSeq: { type: "number", description: "Block sequence number (optional)", }, }, }, },
  • src/index.ts:925-938 (registration)
    The switch case that registers the tool name and invokes the ZetrixClient handler with parsed arguments.
    case "zetrix_get_transaction_history": { const result = await zetrixClient.getTransactionHistory( args?.hash as string | undefined, args?.ledgerSeq as number | undefined ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }

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/Zetrix-Chain/zetrix-mcp-server'

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