Skip to content

HTTP API

Use public discovery and configuration endpoints without a wallet.

The public HTTP API serves configuration and indexed discovery data. Reads do not require a wallet. Contract calls remain the right source for a final quote, listing validity, balance, allowance, or owner check.

Configuration endpoints

MethodPathReturns
GET/api/launchpad/configChain, launch contracts, swap infrastructure, fee tier, initial buy
GET/api/nft/configChain, NFT contracts, fees, pause state, confirmations, upload limits
GET/api/nft/readyDeployment readiness and active NFT contract identity

The launchpad configuration reports referralsEnabled and referralShareBps for the active factory and router deployment.

Referral endpoints

MethodPathAuthenticationUse
GET/api/referrals/:codePublicValidate a shared referral code
POST/api/referrals/claimWallet sessionClaim a permanent custom code from { "code": "alice" }
GET/api/referrals/meWallet sessionRead link, launch, wallet, and payout totals
POST/api/referrals/attributionWallet sessionBind the wallet to its first valid code
GET/api/referrals/attributionWallet sessionRead the wallet's permanent attribution

Create a wallet session through /api/auth/challenge and /api/auth/session, then send Authorization: Bearer <sessionToken> to authenticated endpoints.

Launchpad discovery

MethodPathUseful parameters
GET/api/launchpad/tokenslimit, offset
GET/api/launchpad/tokentokenAddress
GET/api/launchpad/tradestokenAddress, limit
GET/api/launchpad/klinestokenAddress, interval, limit
curl 'https://spawn.finance/api/launchpad/tokens?limit=20&offset=0'
curl 'https://spawn.finance/api/launchpad/token?tokenAddress=0x...'

NFT discovery

MethodPathUseful parameters
GET/api/nft/collectionsquery, creatorAddress, ownerAddress, sort, limit, offset
GET/api/nft/collections/:contractAddressCollection address in the route
GET/api/nft/itemscollectionAddress, ownerAddress, listed, query, sort, limit, offset
GET/api/nft/items/:contractAddress/:tokenIdCollection and token ID in the route
GET/api/nft/listingscollectionAddress, sellerAddress, status, limit, offset
GET/api/nft/listings/:contractAddress/:tokenIdCurrent indexed listing
GET/api/nft/activitycollectionAddress, tokenId, accountAddress, type, limit, offset
const url = new URL("/api/nft/items", window.location.origin);
url.searchParams.set("listed", "true");
url.searchParams.set("sort", "recent");
url.searchParams.set("limit", "24");

const response = await fetch(url);
if (!response.ok) throw new Error("NFT items did not load.");
const page = await response.json();

Submit a confirmed NFT transaction

The frontend can ask the indexer to inspect a transaction after it reaches six confirmations.

curl -X POST 'https://spawn.finance/api/nft/transactions' \
  -H 'content-type: application/json' \
  --data '{"txHash":"0x..."}'

The backend verifies the receipt, target contracts, event topics, block hash, and confirmation count. The response reports recognized and indexed event counts.

Pagination and freshness

List responses include total, limit, and offset. Cache discovery pages briefly, then refresh after indexed transactions or while a market is active. Do not cache direct contract validation behind the same discovery policy.