Currency
Currency is a system and unit of money used to express monetary value, facilitate exchange, and denominate financial amounts.
Learn Go with Pocket-Sized Projects
A currency is a monetary system whose units and denomination rules determine how amounts are represented and valued.
- How it is used
- Models source and target currencies in a command-line money converter.
- How deep it goes
- Implements a currency value object, parsing, precision checks, and conversion integration, while deferring production-grade currency validation.
- Examples
- Uses EUR-to-USD command-line conversion and rejects a CAD amount with four decimal places.
- What you can do after
- Builds a tutorial currency representation and applies its precision when constructing and converting amounts, but not for real transactions.
Read how Learn Go with Pocket-Sized Projects explains currency →
Investing for Programmers
A currency is a medium of exchange issued or recognized by a government or monetary authority and used to denominate value.
- How it is used
- Standardizes mixed-currency holdings so portfolio values, yields, and gains can be summed in one target currency.
- How deep it goes
- Defines currency briefly and works through exchange mapping, conversion, and aggregation, stopping short of detailed foreign-exchange mechanics.
- Examples
- Uses Microsoft and BMW shares, exchange mappings, converted price columns, and a USD portfolio worksheet.
- What you can do after
- Operate/configure a portfolio monitor that converts asset values and aggregates positions in a chosen currency.
Also covered in
- The Design of Web APIs, Second Edition
- Everyday Data Visualization
- PostgreSQL Mistakes and How to Avoid Them
- Data-Oriented Programming in JavaIn early access (MEAP)
What to know first
- userA user is a person or other principal that interacts with a system or is represented by it.
- float64Float64 is a 64-bit floating-point numeric type, commonly represented by the IEEE 754 binary64 format.
- monetary amountA monetary amount is a quantity of money represented by a numeric value together with a currency.
Related concepts
- account balanceconfigures · An account balance is the recorded amount of money or funds associated with a financial account.
- currency conversionused by · Currency conversion is the calculation of an equivalent monetary amount in one currency from an amount in another using an applicable exchange rate.
- Stringerimplements · fmt.Stringer is a Go standard-library interface implemented by a type with a parameterless String method returning a textual representation.
Questions about currency
What is currency?
Currency is a system and unit of money used to express monetary value, facilitate exchange, and denominate financial amounts.
Which Manning books explain currency?
Learn Go with Pocket-Sized Projects and Investing for Programmers.
What should I know before learning currency?
Manning books that teach currency usually introduce user, float64, monetary amount and U.S. dollar first.
What kinds of currency are there?
Kinds of currency include decimal currency, digital currency and fiat currency.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

