curl --request POST \
--url https://mainnet.anyspend.com/orders/quote \
--header 'Content-Type: application/json' \
--data '
{
"type": "swap",
"srcChain": 1,
"dstChain": 8453,
"srcTokenAddress": "0x0000000000000000000000000000000000000000",
"dstTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"tradeType": "EXACT_INPUT",
"amount": "1000000000000000000",
"recipientAddress": "0x55c71fca5e01cf246718748ae540473e608d0282",
"onrampVendor": "coinbase"
}
'{
"success": true,
"message": "Get quote successfully",
"data": {
"fee": {
"type": "standard_fee",
"feeVersion": 1,
"tokenToCheckBalance": "0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3",
"recipientBalance": "302843673392800000000000",
"anyspendFeeBps": 80,
"anyspendWhaleDiscountBps": 5000,
"anyspendPartnerDiscountBps": 0,
"finalFeeBps": 40
},
"operation": "swap",
"sender": "0x15846E6A7C839A208765a0B4754C2dd15E879990",
"recipient": "0xaF1ae1B78bc767DaEBB91196Adf982E9d560AAB9",
"currencyIn": {
"currency": {
"chainId": 1,
"address": "0x0000000000000000000000000000000000000000",
"symbol": "ETH",
"name": "Ether",
"decimals": 18,
"metadata": {
"logoURI": "https://assets.relay.link/icons/1/light.png"
}
},
"amount": "1000000000000000000",
"amountFormatted": "1.0",
"amountUsd": "3229.715818",
"minimumAmount": "1000000000000000000"
},
"currencyOut": {
"currency": {
"chainId": 8453,
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"metadata": {
"logoURI": "https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694"
}
},
"amount": "3224805862",
"amountFormatted": "3224.805862",
"amountUsd": "3224.512405",
"minimumAmount": "3192557803"
},
"totalImpact": {
"usd": "-5.203413",
"percent": "-0.16"
},
"swapImpact": {
"usd": "-4.102797",
"percent": "-0.13"
},
"rate": "3224.805862",
"slippageTolerance": {
"origin": {
"usd": "0.000000",
"value": "0",
"percent": "0.00"
},
"destination": {
"usd": "32.245124",
"value": "32248059",
"percent": "1.00"
}
},
"timeEstimate": 24,
"userBalance": "0",
"pointsAmount": 100,
"pointsMultiplier": 1.5
},
"statusCode": 200
}Retrieves a quote to swap, execute contract, or participate in HypeDuel
curl --request POST \
--url https://mainnet.anyspend.com/orders/quote \
--header 'Content-Type: application/json' \
--data '
{
"type": "swap",
"srcChain": 1,
"dstChain": 8453,
"srcTokenAddress": "0x0000000000000000000000000000000000000000",
"dstTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"tradeType": "EXACT_INPUT",
"amount": "1000000000000000000",
"recipientAddress": "0x55c71fca5e01cf246718748ae540473e608d0282",
"onrampVendor": "coinbase"
}
'{
"success": true,
"message": "Get quote successfully",
"data": {
"fee": {
"type": "standard_fee",
"feeVersion": 1,
"tokenToCheckBalance": "0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3",
"recipientBalance": "302843673392800000000000",
"anyspendFeeBps": 80,
"anyspendWhaleDiscountBps": 5000,
"anyspendPartnerDiscountBps": 0,
"finalFeeBps": 40
},
"operation": "swap",
"sender": "0x15846E6A7C839A208765a0B4754C2dd15E879990",
"recipient": "0xaF1ae1B78bc767DaEBB91196Adf982E9d560AAB9",
"currencyIn": {
"currency": {
"chainId": 1,
"address": "0x0000000000000000000000000000000000000000",
"symbol": "ETH",
"name": "Ether",
"decimals": 18,
"metadata": {
"logoURI": "https://assets.relay.link/icons/1/light.png"
}
},
"amount": "1000000000000000000",
"amountFormatted": "1.0",
"amountUsd": "3229.715818",
"minimumAmount": "1000000000000000000"
},
"currencyOut": {
"currency": {
"chainId": 8453,
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"metadata": {
"logoURI": "https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694"
}
},
"amount": "3224805862",
"amountFormatted": "3224.805862",
"amountUsd": "3224.512405",
"minimumAmount": "3192557803"
},
"totalImpact": {
"usd": "-5.203413",
"percent": "-0.16"
},
"swapImpact": {
"usd": "-4.102797",
"percent": "-0.13"
},
"rate": "3224.805862",
"slippageTolerance": {
"origin": {
"usd": "0.000000",
"value": "0",
"percent": "0.00"
},
"destination": {
"usd": "32.245124",
"value": "32248059",
"percent": "1.00"
}
},
"timeEstimate": 24,
"userBalance": "0",
"pointsAmount": 100,
"pointsMultiplier": 1.5
},
"statusCode": 200
}Quote for swap order
Order type for swap
swap Source chain ID
1
Destination chain ID
8453
Source token contract address
"0x0000000000000000000000000000000000000000"
Destination token contract address
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
Type of trade execution
EXACT_INPUT, EXACT_OUTPUT Amount to quote
"1000000000000000000"
Recipient address
"0x55c71fca5e01cf246718748ae540473e608d0282"
Optional onramp vendor
coinbase, stripe, stripe-web2 Quote retrieved successfully
true
"Get quote successfully"
Show child attributes
Fee structure including all applicable fees (Stripe and AnySpend)
Show child attributes
Fee type identifier
standard_fee Fee version number
1
Token contract address used to check balance for whale discount (B3 token)
"0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3"
Recipient's B3 token balance
"302843673392800000000000"
AnySpend base fee in basis points before discounts
80
Whale discount in basis points based on B3 balance
5000
Partner discount in basis points
0
Final fee in basis points after all discounts applied
40
Type of operation
"swap"
Sender address for the operation
"0x15846E6A7C839A208765a0B4754C2dd15E879990"
Recipient address for the operation
"0xaF1ae1B78bc767DaEBB91196Adf982E9d560AAB9"
Input currency details
Show child attributes
Show child attributes
1
"0x0000000000000000000000000000000000000000"
"ETH"
"Ether"
18
Raw amount
"1000000000000000000"
Human-readable formatted amount
"1.0"
USD value of the amount
"3229.715818"
Minimum required amount
"1000000000000000000"
Output currency details
Show child attributes
Show child attributes
8453
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
"USDC"
"USD Coin"
6
Raw output amount
"3224805862"
Human-readable formatted output amount
"3224.805862"
USD value of output amount
"3224.512405"
Minimum guaranteed output amount
"3192557803"
Exchange rate
"3224.805862"
Slippage tolerance settings
Show child attributes
Estimated completion time in seconds
24
User's current balance
"0"
Anyspend points that will be awarded for the order
100
Multiplier applied to points that will be awarded for the order
1.5
200