Skip to main content
Glama

get_transfers_for_owner

Retrieve NFT transfer history for a specific wallet address to track asset movements and ownership changes across ERC721 and ERC1155 tokens.

Instructions

Get NFT transfers for an owner

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesThe wallet address to get transfers for
pageKeyNoKey for pagination
fromBlockNoStarting block number for the query
toBlockNoEnding block number for the query
orderNoOrder of results (ascending or descending)
tokenTypeNoType of token (ERC721 or ERC1155)
contractAddressesNoList of contract addresses to filter by

Implementation Reference

  • index.ts:657-699 (registration)
    Registration of the 'get_transfers_for_owner' tool in the ListToolsRequestSchema handler, defining name, description, and input schema.
    { name: "get_transfers_for_owner", description: "Get NFT transfers for an owner", inputSchema: { type: "object", properties: { owner: { type: "string", description: "The wallet address to get transfers for", }, pageKey: { type: "string", description: "Key for pagination", }, fromBlock: { type: "number", description: "Starting block number for the query", }, toBlock: { type: "number", description: "Ending block number for the query", }, order: { type: "string", enum: ["asc", "desc"], description: "Order of results (ascending or descending)", }, tokenType: { type: "string", enum: ["ERC721", "ERC1155"], description: "Type of token (ERC721 or ERC1155)", }, contractAddresses: { type: "array", items: { type: "string", }, description: "List of contract addresses to filter by", }, }, required: ["owner"], }, },
  • TypeScript type definition for the tool's parameters, extending Alchemy SDK's GetTransfersForOwnerOptions with required owner field.
    type GetTransfersForOwnerParams = GetTransfersForOwnerOptions & { owner: string; };
  • Helper function to validate input parameters for the get_transfers_for_owner tool.
    const isValidGetTransfersForOwnerParams = ( args: any ): args is GetTransfersForOwnerParams => { return ( typeof args === "object" && args !== null && typeof args.owner === "string" && (args.pageKey === undefined || typeof args.pageKey === "string") && (args.fromBlock === undefined || typeof args.fromBlock === "number") && (args.toBlock === undefined || typeof args.toBlock === "number") && (args.order === undefined || typeof args.order === "string") && (args.tokenType === undefined || typeof args.tokenType === "string") && (args.contractAddresses === undefined || Array.isArray(args.contractAddresses)) ); };
  • Import of Alchemy SDK type GetTransfersForOwnerOptions used for the tool schema.
    import type { GetNftsForOwnerOptions, GetNftMetadataOptions, AssetTransfersParams, GetNftSalesOptions, GetContractsForOwnerOptions, GetOwnersForNftOptions, GetTransfersForContractOptions, GetTransfersForOwnerOptions, TransactionReceiptsParams, GetTokensForOwnerOptions, GetBaseNftsForContractOptions, } from "alchemy-sdk";

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/itsanishjain/alchemy-sdk-mcp'

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