Amounts¶
Every amount of the API is an int of atomic units, the piconero: 1 XMR is 10¹² of them (Glossary). These convert between the two; the arithmetic of amounts is the one of the int.
xmr_to_atomic_units(amount_xmr) staticmethod ¶
Convert XMR to atomic units.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amount_xmr | float | amount in XMR to convert to atomic units. | required |
Returns:
| Type | Description |
|---|---|
int | amount in atomic units. |
atomic_units_to_xmr(amount_atomic_units) staticmethod ¶
Convert atomic units to XMR.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amount_atomic_units | int | amount in atomic units to convert to XMR. | required |
Returns:
| Type | Description |
|---|---|
float | amount in XMR. |