Quickstart

Watch an address and fetch its activity in five API calls.

Prerequisites:

Export your key for convenience:

Terminal window
export OPENSCAN_API_KEY="osk_live_4f8c2e1a9b7d..."

1. Verify your key

Terminal window
curl https://xdcscan.io/account/api/v1/user/info \
-H "Authorization: Bearer $OPENSCAN_API_KEY"

2. Add an address to your watchlist

Terminal window
curl -X POST https://xdcscan.io/account/api/v1/user/watchlist \
-H "Authorization: Bearer $OPENSCAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"address_hash": "0x1234567890abcdef1234567890abcdef12345678",
"name": "Treasury wallet",
"notification_methods": { "email": true, "webhook": false }
}'

3. Confirm the watchlist entry

Terminal window
curl https://xdcscan.io/account/api/v1/user/watchlist \
-H "Authorization: Bearer $OPENSCAN_API_KEY"

4. Fetch the address from the public REST API

No key required for public chain data — your key simply raises the rate limit:

Terminal window
curl "https://xdcscan.io/api/v2/addresses/0x1234567890abcdef1234567890abcdef12345678" \
-H "Authorization: Bearer $OPENSCAN_API_KEY"

5. Fetch the address’s latest transactions

Terminal window
curl "https://xdcscan.io/api/v2/addresses/0x1234567890abcdef1234567890abcdef12345678/transactions"

You now have a watched address with email notifications, and you can pull its full activity feed from the REST API. For the complete endpoint catalog, see the API Reference.