> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.6mm.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.6mm.com/_mcp/server.

# Fiat Reference Rates

This guide targets **Agent Java SDK `v0.3.0`**, Java 8+, and the tagged public contract. Examples run in a partner backend after initializing `client` in [Quick Start](/sdk/agent-sdk/java/quick-start).

## Example prerequisites

The Java snippets share these imports. Initialize `client` using Quick Start and obtain `platformUserId` from the saved binding. Example user/order IDs must be replaced with your own persisted values.

```java
import com.sixmm.agent.*;
import com.sixmm.agent.model.*;
import java.util.*;
```

## FX Reference Rates

Both FX methods use the normal signed Agent API flow. Start by discovering the
currently supported source currencies:

```java
import com.sixmm.agent.model.ListSupportedFiatCurrenciesResponse;

ListSupportedFiatCurrenciesResponse supported = client.listSupportedFiatCurrencies();
System.out.println(supported.targetCurrency);     // USDT
System.out.println(supported.sourceCurrencies);  // AUD, BRL, CNY, EUR, USD, ...
```

Query all supported fiat-to-USDT reference rates:

```java
import com.sixmm.agent.model.ExchangeRateItem;
import com.sixmm.agent.model.QueryExchangeRatesResponse;

QueryExchangeRatesResponse rates = client.queryExchangeRates();
for (ExchangeRateItem item : rates.rates) {
    System.out.println("1 " + item.sourceCurrency + " = " + item.rate + " " + item.targetCurrency);
}
```

Query selected currencies:

```java
import com.sixmm.agent.model.QueryExchangeRatesRequest;

QueryExchangeRatesResponse rates = client.queryExchangeRates(
        QueryExchangeRatesRequest.of("CNY", "EUR", "USD"));
```

The request factory trims and uppercases currency codes and serializes them as
the comma-separated `sourceCurrencies` value required by the API. Omitting the
request or all effective currency values queries every supported currency.

| Response field            | Type   | Description                                          |
| ------------------------- | ------ | ---------------------------------------------------- |
| `snapshotVersion`         | string | Stable snapshot version for audit and reconciliation |
| `provider`                | string | Upstream provider, currently `ECB`                   |
| `sourceDate`              | string | Upstream observation date in `yyyy-MM-dd` format     |
| `fetchedAt` / `expiresAt` | int64  | Unix timestamps in milliseconds                      |
| `pricingPolicy`           | string | Currently `FIXED_PEG`                                |
| `usdtUsdRate`             | string | USD amount per 1 USDT, currently fixed at `1`        |
| `rateType`                | string | Currently `INDICATIVE_DAILY`                         |
| `usage`                   | string | Currently `REFERENCE_ONLY`                           |
| `rateMeaning`             | string | `1 sourceCurrency = rate USDT`                       |
| `rates[].rate`            | string | USDT amount corresponding to one unit of source fiat |

These values are references for a partner multi-currency wallet to calculate
the USDT amount sent to 6MM. They are not executable prices, locked quotes, or
real-time USDT market prices. Use `BigDecimal` and strings for amount
calculations; do not use `double` or `float`.

## Source and related guides

* [Official v0.3.0 source](https://github.com/6mm-com/agent-java-sdk/tree/54aa3c1)
* [Query overview and pagination](/sdk/agent-sdk/java/perpetual-queries)
* [Funding wallet](/sdk/agent-sdk/java/funding-wallet)
* [Upgrade guide](/sdk/agent-sdk/java/upgrade)