> For the complete documentation index, see [llms.txt](https://docs.flowx.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowx.finance/developer/flowx-sdk/retrieve-coin.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
