> ## 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.

# Transfer

> Transfer API reference.

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

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

## Method Details

### `getTransferId`

```java theme={null}
public Optional<String> getTransferId()
```

**Returns:**

`Optional<String>` - The ID of the transfer. Required when `validateOnly` is false.

### `getStatus`

```java theme={null}
public Optional<TransferStatus> getStatus()
```

**Returns:**

`Optional`\<[TransferStatus](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/TransferStatus)>

### `getSource`

```java theme={null}
public TransferSource getSource()
```

**Returns:**

[TransferSource](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/TransferSource)

### `getTarget`

```java theme={null}
public TransferTarget getTarget()
```

**Returns:**

[TransferTarget](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/TransferTarget)

### `getSourceAmount`

```java theme={null}
public Optional<String> getSourceAmount()
```

**Returns:**

`Optional<String>` - The amount of the source asset that will be transferred out, as a decimal string in standard unit denomination.

### `getSourceAsset`

```java theme={null}
public Optional<Asset> getSourceAsset()
```

**Returns:**

`Optional`\<[Asset](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/Asset)> - The asset symbol of the source amount.

### `getTargetAmount`

```java theme={null}
public Optional<String> getTargetAmount()
```

**Returns:**

`Optional<String>` - The amount of the target asset received, as a decimal string in standard unit denomination. May be omitted in the `quoted` state if the value cannot be guaranteed; see `estimate.targetAmount` for the expected value. Populated with the actual executed amount once the transfer completes.

### `getTargetAsset`

```java theme={null}
public Optional<Asset> getTargetAsset()
```

**Returns:**

`Optional`\<[Asset](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/Asset)> - The asset symbol of the target amount.

### `getExchangeRate`

```java theme={null}
public Optional<TransferExchangeRate> getExchangeRate()
```

**Returns:**

`Optional`\<[TransferExchangeRate](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/TransferExchangeRate)> - Exchange rate information for currency conversion. The rate indicates how much of the target asset is equivalent to one unit of the source asset. May be omitted in the `quoted` state if the rate cannot be guaranteed; see `estimate.exchangeRate` for the expected rate. Populated with the actual executed rate once the transfer completes.

### `getFees`

```java theme={null}
public Optional<TransferFees> getFees()
```

**Returns:**

`Optional`\<[TransferFees](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/TransferFees)> - The fees associated with this transfer. Different transfer types have different fee structures. May be omitted in the `quoted` state if the fees cannot be guaranteed; see `estimate.fees` for the expected fees. Populated with the actual fees once the transfer completes.

### `getEstimate`

```java theme={null}
public Optional<TransferEstimate> getEstimate()
```

**Returns:**

`Optional`\<[TransferEstimate](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/TransferEstimate)>

### `getCompletedAt`

```java theme={null}
public Optional<OffsetDateTime> getCompletedAt()
```

**Returns:**

`Optional<OffsetDateTime>` - The date and time the transfer was completed.

### `getFailureReason`

```java theme={null}
public Optional<String> getFailureReason()
```

**Returns:**

`Optional<String>` - The reason for failure, if the transfer failed. Only present when status is `failed`.

### `getExpiresAt`

```java theme={null}
public Optional<OffsetDateTime> getExpiresAt()
```

**Returns:**

`Optional<OffsetDateTime>` - The date and time when this transfer will expire if not executed. Only present for `quoted` status. A new transfer must be created to obtain an updated quote after expiration. Required when `validateOnly` is false.

### `getExecutedAt`

```java theme={null}
public Optional<OffsetDateTime> getExecutedAt()
```

**Returns:**

`Optional<OffsetDateTime>` - The date and time the transfer was executed and moved to processing. Only present when status has progressed beyond `quoted`.

### `getCreatedAt`

```java theme={null}
public Optional<OffsetDateTime> getCreatedAt()
```

**Returns:**

`Optional<OffsetDateTime>` - The date and time the transfer was created. Required when `validateOnly` is false.

### `getUpdatedAt`

```java theme={null}
public Optional<OffsetDateTime> getUpdatedAt()
```

**Returns:**

`Optional<OffsetDateTime>` - The date and time the transfer was last updated. Required when `validateOnly` is false.

### `getMetadata`

```java theme={null}
public Optional<Metadata> getMetadata()
```

**Returns:**

`Optional`\<[Metadata](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/Metadata)>

### `getDetails`

```java theme={null}
public Optional<TransferDetails> getDetails()
```

**Returns:**

`Optional`\<[TransferDetails](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/TransferDetails)>

### `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 Transfer.SourceStage builder()
```

**Returns:**

[Transfer](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/Transfer).`SourceStage`
