Skip to main content
Including mints, transfers, and other operations.

Prerequisites

  • Valid API key with token read permissions
  • Token ID or wallet address for filtering

Request

curl -X GET "https://api.g2cplatform.com/v2/tokens/history?tokenId=token_abc123..." \
  -H "X-API-Key: your-api-key"

Query Parameters

ParameterTypeRequiredDescription
tokenIdstringNoFilter by specific token ID
walletAddressstringNoFilter by wallet address (shows all transactions for that wallet)
transactionTypestringNoFilter by type: “mint”, “transfer”, “burn”
limitnumberNoMaximum number of transactions to return (default: 20, max: 100)
offsetnumberNoNumber of transactions to skip for pagination (default: 0)
dateFromstringNoFilter transactions from date (ISO 8601)
dateTostringNoFilter transactions to date (ISO 8601)
sortstringNoSort order: “createdAt:desc”, “createdAt:asc” (default: “createdAt:desc”)

Response

{
  "data": [
    {
      "transactionId": "tx_abc123...",
      "tokenId": "token_def456...",
      "transactionType": "mint",
      "fromWallet": null,
      "toWallet": "0x1234567890abcdef...",
      "amount": 1,
      "metadata": {
        "name": "Digital Certificate",
        "description": "Certificate of completion"
      },
      "blockchainTxId": "0xabcdef123456...",
      "status": "confirmed",
      "memo": null,
      "createdAt": "2025-01-15T10:30:00Z",
      "confirmedAt": "2025-01-15T10:32:00Z"
    },
    {
      "transactionId": "tx_transfer_789...",
      "tokenId": "token_def456...",
      "transactionType": "transfer",
      "fromWallet": "0x1234567890abcdef...",
      "toWallet": "0x9876543210fedcba...",
      "amount": 1,
      "blockchainTxId": "0xfedcba987654...",
      "status": "confirmed",
      "memo": "Gift transfer",
      "createdAt": "2025-01-15T14:20:00Z",
      "confirmedAt": "2025-01-15T14:22:00Z"
    }
  ],
  "pagination": {
    "total": 5,
    "limit": 20,
    "offset": 0,
    "hasNext": false,
    "hasPrevious": false
  }
}

Response Fields

Transaction Object

FieldTypeDescription
transactionIdstringUnique transaction identifier
tokenIdstringToken identifier
transactionTypestringType: “mint”, “transfer”, “burn”
fromWalletstringSource wallet (null for mint operations)
toWalletstringDestination wallet (null for burn operations)
amountnumberAmount transferred (1 for NFTs)
metadataobjectToken metadata at time of transaction
blockchainTxIdstringBlockchain transaction hash
statusstringTransaction status
memostringOptional transaction memo
createdAtstringISO 8601 timestamp of transaction creation
confirmedAtstringISO 8601 timestamp of blockchain confirmation

Examples

Get History for Specific Token

GET /tokens/history?tokenId=token_abc123...&limit=50

Get All Transactions for Wallet

GET /tokens/history?walletAddress=0x1234567890abcdef...

Get Recent Transfer History

GET /tokens/history?transactionType=transfer&dateFrom=2025-01-01T00:00:00Z

Get Mint History with Date Range

GET /tokens/history?transactionType=mint&dateFrom=2025-01-01T00:00:00Z&dateTo=2025-01-31T23:59:59Z

Transaction Types

TypeDescription
mintToken creation and initial assignment
transferToken moved between wallets
burnToken permanently destroyed (if supported)

Transaction Status

StatusDescription
pendingTransaction submitted, awaiting blockchain confirmation
confirmedTransaction confirmed on blockchain
failedTransaction failed or reverted

Error Responses

Status CodeDescription
400Invalid query parameters
401Unauthorized - invalid API key
403Insufficient permissions
404Token or wallet not found
500Internal server error

Use Cases

  • Audit Trail: Track complete ownership history of NFTs
  • Compliance: Generate transaction reports for regulatory requirements
  • Analytics: Analyze token movement patterns
  • Verification: Verify transaction authenticity and timestamps
  • Debugging: Investigate transaction issues or disputes