---
title: "Guard against decimal-scaling errors by verifying raw on-chain amount against the token's authoritative decimals."
method: POST
path: "/v1/finance/units"
tags: ["finance"]
---

# Guard against decimal-scaling errors by verifying raw on-chain amount against the token's authoritative decimals.

`POST /v1/finance/units`

## Request

- Base URL: `https://api.agent-toolbox.ai`
- URL: `https://api.agent-toolbox.ai/v1/finance/units`
- Auth: one of:
  - HTTP bearer
  - none

Cost: 1 credit(s). Free tier: 10 calls per IP (no auth).

## Request body

- FinanceUnitsRequest
  - `tokenAddress` string, required
  - `rawAmount` string, required
  - `uiAmount` number, required
  - `chain` 'solana' | 'ethereum' | 'bsc' | 'polygon' | 'base' | 'arbitrum', required

## Response `200`

Success.

- FinanceUnitsResponse
  - `verdict` 'PASS' | 'FLAG' | 'BLOCK', required
  - `score` number, required
  - `risks` object[], required
    - `type` string, required
    - `severity` 'info' | 'warn' | 'critical', required
    - `detail` string, required
  - `latencyMs` number, required: Server compute time in ms.
  - `authoritative_decimals` integer, nullable, required
  - `expected_raw` string, nullable, required
  - `actual_raw` string, required
  - `deviation_pct` number, nullable, required

## Other responses

- `400`: Invalid request body.
- `402`: Free tier exhausted or insufficient credits.

---

[API](https://skmtc.dev/agent-toolbox/apis/agent-toolbox-ai-api.md) · [All operations](https://skmtc.dev/agent-toolbox/apis/agent-toolbox-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agent-toolbox/apis/agent-toolbox-ai-api/revisions/07132043190b?raw)
