/Docsv1.0Built on Arc Β· by Circle
Technical

API Reference

ArcaneFi exposes REST API endpoints for XP, rewards, NFT data, and admin operations. All routes are Next.js App Router API routes.

XP & Rewards

EndpointMethodDescription
/api/xp/userGETXP profile for a wallet β€” balance, tier, streak, transaction history. Query: ?wallet=0x...
/api/xp/awardPOSTAward XP for an action. Body: walletAddress, actionType, metadata
/api/xp/leaderboardGETTop wallets ranked by lifetime XP
/api/xp/milestonesGETAll active claimable milestones with requirements and rewards
/api/xp/claim-milestonePOSTClaim a milestone. Auto-mints SBT if a contract is configured on the milestone.
/api/xp/recover-streakPOSTPay XP to recover a broken streak. Body: walletAddress, daysToRecover
/api/xp/use-shieldPOSTManually use a streak shield
/api/xp/favoritePOSTToggle NFT favourite. Awards +5 XP on first use per NFT. Body: walletAddress, contractAddress, tokenId
/api/xp/favoritesGETGet all favourited NFTs for a wallet. Query: ?wallet=0x...
/api/xp/claim-boxPOSTOpen a mystery box and deliver reward. USDC rewards sent on-chain from treasury.
/api/xp/my-boxesGETGet all unopened mystery boxes for a wallet. Query: ?wallet=0x...

NFT & Metadata

EndpointMethodDescription
/api/nft/ownedGETAll NFTs and SBTs owned by a wallet. Scans all factory collections on Arc via RPC. Query: ?wallet=0x...
/api/sbt/metadata/[contract]/[tokenId]GETERC-721 JSON metadata for an SBT token. Personalised traits per holder. 1-hour cache.

Admin Routes

EndpointMethodsDescription
/api/admin/sbtGET POST PATCHSBT milestone CRUD and mint status updates
/api/admin/xp-grantGET POSTManually grant XP to a wallet
/api/admin/rolesGET POST PATCHManage user roles (admin/mod/vip/partner/creator)
/api/admin/shield-configGET PATCHLive-edit streak shield settings
/api/admin/mystery-boxesGET POST PATCHMystery box template and trigger management
/api/admin/feature-flagsGET PATCHToggle platform features on/off
/api/admin/announcementsGET POST PATCHSite-wide announcement banners