β˜€οΈ solarchive beta

Home Learn Community Support RSS

How to Find Your First Transaction on Solana

● Beginner ⏱ 5 min

Ever wondered when you first started using Solana? This quick guide shows you how to find your wallet's very first transaction - a fun bit of blockchain nostalgia!

Prerequisites: You'll need downloaded SolArchive data (transactions dataset) and your Solana wallet address.

The Query

Finding your first transaction is simple - just order by timestamp and take the first result:

-- Find your first transaction on Solana
SELECT 
    block_timestamp,
    signature,
    fee / 1e9 as fee_sol,
    status
FROM read_parquet('data/txs/**/*.parquet')
WHERE list_contains(account_keys, 'YOUR_WALLET_ADDRESS_HERE')
ORDER BY block_timestamp ASC
LIMIT 1;

That's it! The key is ORDER BY block_timestamp ASC (ascending) to get the earliest transaction first.

Python Script

Here's a complete script with nice formatting:

import duckdb

WALLET_ADDRESS = "YOUR_WALLET_ADDRESS_HERE"

con = duckdb.connect()

query = f"""
SELECT 
    block_timestamp,
    signature,
    fee / 1e9 as fee_sol,
    status,
    list_count(account_keys) as num_accounts
FROM read_parquet('data/txs/**/*.parquet')
WHERE list_contains(account_keys, '{WALLET_ADDRESS}')
ORDER BY block_timestamp ASC
LIMIT 1
"""

result = con.execute(query).fetchdf()

if len(result) > 0:
    first_tx = result.iloc[0]
    print(f"\nπŸŽ‰ Your first Solana transaction!")
    print(f"\nDate: {first_tx['block_timestamp']}")
    print(f"Signature: {first_tx['signature']}")
    print(f"Fee: {first_tx['fee_sol']:.6f} SOL")
    print(f"Status: {first_tx['status']}")
    print(f"\nView on Solscan: https://solscan.io/tx/{first_tx['signature']}")
else:
    print("No transactions found for this wallet")

con.close()

Run it:

uv run first_tx.py

Example Output

πŸŽ‰ Your first Solana transaction!

Date: 2021-03-15 14:23:17
Signature: 5J9Kf2h8Ld3m9pQ7sR2tY4vN8xL6mK3jP9wH5fG2aD1sE4rT7yU3iO
Fee: 0.000005 SOL
Status: Success

View on Solscan: https://solscan.io/tx/5J9Kf2h8Ld3m9pQ7sR2tY4vN8xL6mK3jP9wH5fG2aD1sE4rT7yU3iO

What This Tells You

Your first transaction reveals:

Fun Facts to Discover

Once you find your first transaction, you can explore: