# Precision, Rounding and Significant Figures

Source: https://developers.bitgo.com/docs/precision

## Overview

When trading digital assets, precision is critical. You may sometimes notice minor discrepancies between your own calculations and the data returned by the Trade API. These are typically due to differences in how numerical precision, rounding, and significant figures work.

## Technical Implementation

To handle high-precision cryptocurrency values, BitGo uses specific libraries and rules.

 **Flooring (Truncation):** BitGo always floors Digital Asset values according to the currency precision.

## Price Rounding Logic

The convention for price rounding is standard half-up, regardless of order side.

**Rule:** 1.234 → 1.23, 1.235 → 1.24.

## Minimum Increment

The minimum increment is the smallest tradable unit of a currency. Any calculated trade amount that is smaller than the minimum increment rounds up to the minimum increment. This ensures that all transactions correspond to real-world currency divisions.

For example, the minimum increment for US Dollars (USD) is $0.01 (one cent). It's not possible to charge or pay a fraction of a cent.

### Minium Increment Example (SOL-USD)

Consider a **buy** order for SOL-USD where the intent is to spend a specific amount of the **quote** currency (USD).

* **Calculated Quote Quantity:** 0.0045395934 USD
* **Price:** 125.89 USD/SOL
* **Base Quantity:** 0.00003606 SOL

Because the calculated cost (0.0045... USD) is less than the minimum increment for USD ($0.01), the system rounds it up.

**Actual Charged Quote Quantity:** 0.01 USD

The same logic applies to **sell** orders. If the calculated proceeds were 0.0045... USD, you would receive 0.01 USD.

## Significant Figures (Reconciliation)

When reconciling trade updates, values may appear mismatched if you ignore Significant Figures (sig figs). The precision of a result depends on the operand with the least number of sig figs.

Math Concept: If A = 111.111 (6 sig figs) and B = 3.45 (3 sig figs):
Round the result, 383.33295, to 383 (matching the 3 sig figs of B).

### Reconciliation Example (SOL-USD)

You receive the following fill data:

* Base Quantity: 3.024283 SOL (raw value)
* Quote Quantity: 414.30 USD
* Price: 136.99 USD

Verifying Quote Quantity:

Clients expect Base * Price = Quote.
3.024283 * 136.99 = 414.296528...
Since Price has 5 significant figures (136.99), we round the result to 5 sig figs.
Result: 414.30 (matches API data).

Verifying Base Quantity:

Clients expect Quote / Price = Base.
414.30 / 136.99 = 3.02430834...
The raw Base Quantity is 3.024283.
Correction: Round your calculation to 5 sig figs (dictated by Price/Quote).
Calculation Rounded: 3.0243.
API Value Rounded: 3.0243.
Result: Match.
