# Retrieve coin

### Example Code

```typescript
const coins = await coinProvider.getCoins({
  coinTypes: ['0x2::sui::SUI'],
});
```

### Example Response

It will return `Coin[]` instances, with `Coin`intance you can do a lot of thing not just JSON

#### Key Properties:

1. **coinType**: Identifies the coin type.
2. **decimals**: The number of decimal places (e.g., 18 decimals for Ether).
3. **symbol, name, description, iconUrl**: Optional information about the coin, like its name, symbol, description, and an icon URL.
4. **derivedPriceInUSD, derivedSUI**: Optional values for the coin’s price in USD or SUI.
5. **isVerified**: Marks if the coin is verified.

#### Main Methods:

1. **`sortsBefore`**: Compares this coin with another to see which comes first in a sorted list.
2. **`wrapped`**: Returns the coin itself (currently does nothing extra).
3. **`equals`**: Checks if this coin is the same as another by comparing their `coinType`.
4. **`fetchAllOwnedCoins`**: Retrieves all the coins owned by an address.
5. **`take`**: Transfers a specified amount of coins to a transaction, making sure the balance is enough and handling the SUI-specific coins appropriately.

####


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowx.finance/developer/flowx-sdk/retrieve-coin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
