import { useGetSwapQuote } from '@0xsequence/hooks'
function SwapComponent() {
const { data: swapQuote, isLoading } = useGetSwapQuote({
userAddress: '0x123...',
buyCurrencyAddress: '0x456...',
sellCurrencyAddress: '0x789...',
buyAmount: '1000000000000000000',
chainId: 1,
includeApprove: true
})
if (isLoading) return <div>Loading...</div>
return (
<div>
{swapQuote && (
<div>
Currency: {swapQuote.currencyAddress}
Price: {swapQuote.price}
Max Price: {swapQuote.maxPrice}
Transaction Value: {swapQuote.transactionValue}
</div>
)}
</div>
)
}