Skip to main content
Package: com.coinbase.cdp.types

Method Details

getPermit2

Returns: SwapPermit2Approval - The approval object which contains the necessary fields to submit an approval for this transaction. Null if the fromToken is the native token or the transaction is a native token wrap / unwrap.

getTransaction

Returns: CreateSwapQuoteResponseTransaction - The details of the transaction to be signed and submitted to execute the swap.

getBlockNumber

Returns: String - The block number at which the liquidity conditions were examined.

getToAmount

Returns: String - The amount of the toToken that will be received in atomic units of the toToken. For example, 1000000000000000000 when receiving ETH equates to 1 ETH, 1000000 when receiving USDC equates to 1 USDC, etc.

getToToken

Returns: String - The 0x-prefixed contract address of the token that will be received.

getFees

Returns: CreateSwapQuoteResponseFees - The estimated fees for the swap.

getIssues

Returns: CreateSwapQuoteResponseIssues - An object containing potential issues discovered during validation that could prevent the swap from being executed successfully.

getLiquidityAvailable

Returns: boolean - Whether sufficient liquidity is available to settle the swap. All other fields in the response will be empty if this is false.

getMinToAmount

Returns: String - The minimum amount of the toToken that must be received for the swap to succeed, in atomic units of the toToken. For example, 1000000000000000000 when receiving ETH equates to 1 ETH, 1000000 when receiving USDC equates to 1 USDC, etc. This value is influenced by the slippageBps parameter.

getFromAmount

Returns: String - The amount of the fromToken that will be sent in this swap, in atomic units of the fromToken. For example, 1000000000000000000 when sending ETH equates to 1 ETH, 1000000 when sending USDC equates to 1 USDC, etc.

getFromToken

Returns: String - The 0x-prefixed contract address of the token that will be sent.

equals

Overrides: [equals](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals\(java.lang.Object\) "class or interface in java.lang") in class [Object](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html "class or interface in java.lang") Parameters: other - Object Returns: boolean

getAdditionalProperties

Returns: Map<String,Object>

hashCode

Overrides: [hashCode](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode\(\) "class or interface in java.lang") in class [Object](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html "class or interface in java.lang") Returns: int

toString

Overrides: [toString](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString\(\) "class or interface in java.lang") in class [Object](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html "class or interface in java.lang") Returns: String

builder

Returns: CreateSwapQuoteResponse.TransactionStage