com.coinbase.cdp.resources.evmswaps.requests
Method Details
getIdempotencyKey
Optional<String> - An optional string request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our Idempotency docs for more information on using idempotency keys.
getNetwork
getToToken
String - The 0x-prefixed contract address of the token to receive.
getFromToken
String - The 0x-prefixed contract address of the token to send.
getFromAmount
String - The amount of the fromToken to send in atomic units of the token. For example, 1000000000000000000 when sending ETH equates to 1 ETH, 1000000 when sending USDC equates to 1 USDC, etc.
getTaker
String - The 0x-prefixed address that holds the fromToken balance and has the Permit2 allowance set for the swap.
getSignerAddress
Optional<String> - The 0x-prefixed Externally Owned Account (EOA) address that will sign the Permit2 EIP-712 permit message. This is only needed if taker is a smart contract.
getGasPrice
Optional<String> - The target gas price for the swap transaction, in Wei. For EIP-1559 transactions, this value should be seen as the maxFeePerGas value. If not provided, the API will use an estimate based on the current network conditions.
getSlippageBps
Optional<Integer> - The maximum acceptable slippage of the toToken in basis points. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100 bps (i.e., 1%).
equals
[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
Map<String,Object>
hashCode
[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
[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
NetworkStage