# Amounts and Decimals

Artum represents token amounts as raw integer strings.

Do not send decimal strings such as `100.5`.

## Example

For an 18-decimal token:

```
100 USDT = 100000000000000000000
0.5 USDT = 500000000000000000
```

## Where Decimals Come From

Fetch supported assets before creating payments:

```bash
curl "https://mock.artum.app/v1/chains/bsc-mainnet/assets" \
  -H "Authorization: Bearer $ARTUM_MOCK_API_KEY"
```

Use `data[].decimals` as the source of truth for user-facing conversion.

```json
{
  "asset": "bsc-usdt",
  "chain": "bsc-mainnet",
  "symbol": "USDT",
  "decimals": 18,
  "token": {
    "address": "0x55d398326f99059ff775485246999027b3197955",
    "decimals": 18
  },
  "enabled": true
}
```

## Conversion

To create a payment for a human amount:

```
raw_amount = human_amount * 10^decimals
```

Use integer arithmetic or decimal-safe libraries. Do not use binary floating point for money conversion.


---

# 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.artum.app/concepts/amounts-and-decimals.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.
