> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nxos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Conventions

> Amounts, pagination, timestamps, and other API-wide patterns.

## Amounts

All monetary amounts in the API are **strings in major units** — the human-readable form of the currency. For example, ten US dollars is `"10.00"`, not `1000`.

```json theme={null}
{
  "amount": "10.50",
  "asset": "USD"
}
```

Amounts are always returned at the asset's **native precision**:

| Asset  | Scale | Example       | Meaning    |
| ------ | ----- | ------------- | ---------- |
| `USD`  | 2     | `"10.50"`     | \$10.50    |
| `EUR`  | 2     | `"100.00"`    | 100.00     |
| `USDC` | 6     | `"10.500000"` | 10.5 USDC  |
| `USDT` | 6     | `"99.970000"` | 99.97 USDT |

<Warning>
  Parse amounts as arbitrary-precision decimals, never as floating-point numbers. Floating-point arithmetic introduces rounding errors that accumulate in financial calculations.
</Warning>

### Why strings?

JSON has no decimal type. A JSON number like `10.50` may lose its trailing zero when parsed, and large values can lose precision in IEEE 754 floats. Strings preserve the exact representation.

Internally, the platform stores all amounts as integer subunits (e.g., `1050` for \$10.50) and converts to major-unit strings at the API boundary. This eliminates floating-point arithmetic entirely within the system.

## Assets

Assets are identified by their uppercase code: `USD`, `EUR`, `USDC`, `USDT`. The API currently supports:

| Code   | Type       | Scale (decimal places) |
| ------ | ---------- | ---------------------- |
| `USD`  | Fiat       | 2                      |
| `EUR`  | Fiat       | 2                      |
| `USDC` | Stablecoin | 6                      |
| `USDT` | Stablecoin | 6                      |

Asset codes are used throughout the API — in quote requests, payout amounts, and balance responses.

## Pagination

List endpoints return a standard envelope:

```json theme={null}
{
  "object": "list",
  "data": [ ... ],
  "hasMore": true,
  "nextCursor": "cursor_abc123"
}
```

| Field        | Type           | Description                                                                                         |
| ------------ | -------------- | --------------------------------------------------------------------------------------------------- |
| `object`     | `"list"`       | Always `"list"` for paginated responses.                                                            |
| `data`       | array          | The page of results.                                                                                |
| `hasMore`    | boolean        | `true` if more results exist beyond this page.                                                      |
| `nextCursor` | string \| null | Pass as the `cursor` query parameter to fetch the next page. `null` when there are no more results. |

Control page size with the `limit` query parameter (default 25, max 100):

```bash theme={null}
curl "https://api.sandbox.nxos.io/v1/accounts?limit=10&cursor=cursor_abc123" \
  -H "Authorization: Bearer nxos_sk_test_..."
```

## Timestamps

All timestamps are ISO 8601 strings in UTC:

```
"2025-03-15T14:30:00.000Z"
```

## Object types

Every resource includes an `object` field that identifies its type. This makes responses self-describing and simplifies handling of polymorphic lists.

```json theme={null}
{ "object": "account", "accountId": "acct_..." }
{ "object": "quote", "quoteId": "quote_..." }
{ "object": "beneficiary", "beneficiaryId": "bene_..." }
{ "object": "balance", "asset": "USD", "amount": "100.00" }
```

## Identifiers

All resource IDs are prefixed with a short type indicator followed by a 32-character hex string:

| Resource       | Prefix     | Example                                    |
| -------------- | ---------- | ------------------------------------------ |
| Account        | `acct_`    | `acct_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4`    |
| Quote          | `quote_`   | `quote_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4`   |
| Beneficiary    | `bene_`    | `bene_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4`    |
| Transaction    | `txn_`     | `txn_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4`     |
| Funding method | `funding_` | `funding_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4` |

The prefix makes IDs unambiguous when seen in logs, URLs, or support conversations.
