> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateSwapQuoteResponse

> CreateSwapQuoteResponse API reference.

Package: [`com.coinbase.cdp.types`](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/index)

```java theme={null}
public final class CreateSwapQuoteResponse extends Object
```

## Method Details

### `getPermit2`

```java theme={null}
public SwapPermit2Approval getPermit2()
```

**Returns:**

[SwapPermit2Approval](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/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`

```java theme={null}
public CreateSwapQuoteResponseTransaction getTransaction()
```

**Returns:**

[CreateSwapQuoteResponseTransaction](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/CreateSwapQuoteResponseTransaction) - The details of the transaction to be signed and submitted to execute the swap.

### `getBlockNumber`

```java theme={null}
public String getBlockNumber()
```

**Returns:**

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

### `getToAmount`

```java theme={null}
public String 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`

```java theme={null}
public String getToToken()
```

**Returns:**

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

### `getFees`

```java theme={null}
public CreateSwapQuoteResponseFees getFees()
```

**Returns:**

[CreateSwapQuoteResponseFees](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/CreateSwapQuoteResponseFees) - The estimated fees for the swap.

### `getIssues`

```java theme={null}
public CreateSwapQuoteResponseIssues getIssues()
```

**Returns:**

[CreateSwapQuoteResponseIssues](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/CreateSwapQuoteResponseIssues) - An object containing potential issues discovered during validation that could prevent the swap from being executed successfully.

### `getLiquidityAvailable`

```java theme={null}
public boolean 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`

```java theme={null}
public String 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`

```java theme={null}
public String 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`

```java theme={null}
public String getFromToken()
```

**Returns:**

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

### `equals`

```java theme={null}
public boolean equals(Object other)
```

**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`

```java theme={null}
public Map<String,Object> getAdditionalProperties()
```

**Returns:**

`Map<String,Object>`

### `hashCode`

```java theme={null}
public int 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`

```java theme={null}
public String 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`

```java theme={null}
public static CreateSwapQuoteResponse.TransactionStage builder()
```

**Returns:**

[CreateSwapQuoteResponse](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/CreateSwapQuoteResponse).`TransactionStage`
