Trade Discovery
Read visible trade opportunities for one wallet. The user-facing model is bilateral: the widget shows what the user gives and what the user gets, while SWAPS coordinates settlement automatically.
curl -H "Authorization: Bearer <API_KEY>" \
-H "X-Swaps-User-Id: user_123" \
-H "X-Swaps-User-Signature: <hmac_signature>" \
-H "X-Swaps-User-Timestamp: <unix_timestamp>" \
https://www.swapsapi.com/api/v2/swaps/0x1111111111111111111111111111111111111111
Example response:
{
"success": true,
"swaps": [
{
"id": "trade_123",
"youGive": {
"id": "0x3333333333333333333333333333333333333333:1",
"name": "Charizard PSA 10",
"image": "https://cdn.example/charizard.png",
"collection": "Pokemon Base Set"
},
"youGet": {
"id": "0x3333333333333333333333333333333333333333:5",
"name": "Mew Holo",
"image": "https://cdn.example/mew.png",
"collection": "Pokemon Promo"
},
"confidence": 0.85,
"alternativeCount": 1,
"status": "available"
}
],
"total": 1
}
For You recommendations use GET /api/v2/explore/{walletAddress} and return availability-checked sections for the same wallet.
Accepting a swap uses POST /api/v2/swaps/{swapId}/accept. The response prepares the user-signed delegation or token-scoped approval transaction. Submit exactly one proof to POST /api/v2/blockchain/trades/broadcast: use transactionHash after an Ethereum, Base, or Solana wallet broadcast, or use the base64 signedTransaction for SWAPS to relay an eligible Solana approval, delegation, revoke, or refund.
Accept response:
{
"success": true,
"status": "awaiting_signature",
"blockchain": "solana",
"transaction": {
"serialized": "AQAAAAAAAA...",
"message": "Approve SWAPS to trade Charizard PSA 10; this reserves the SWAPS completion fee in SOL",
"estimatedFee": 5000,
"networkFeeLamports": 5000,
"swapsFeeLamports": "149289383",
"swapsFeeSol": 0.149289383,
"feeBasisPoints": 250,
"feeQuote": {
"blockchain": "solana",
"nativeCurrency": "SOL",
"receivedNftId": "GM4zYgkVopM4VPW4mMgbuNn5eVsGyRNVZjJMhFdakh2N",
"valuationAmount": 1194.315064,
"valuationCurrency": "USD",
"valuationSourceType": "onchain_metadata_trait",
"valuationSourceIdentifier": "trait:Insured Value",
"valuationFetchedAt": "2026-05-28T14:30:00.000Z",
"valuationFreshness": "fresh",
"feeBasisPoints": 250,
"feeLamports": "149289383",
"feeSol": 0.149289383
},
"feeHoldAlreadyExists": false,
"feeHoldRentReserveLamports": 890880,
"estimatedTotalLamportsRequired": 150185263,
"estimatedTotalSolRequired": 0.150185263
},
"message": "Sign once to approve this trade. The transaction reserves the SWAPS fee in SOL; any first-time fee-hold rent reserve stays reusable and is returned when the final Solana delegation is revoked."
}