Position & Inventory Functions¶
- type position¶
A position is a single amount held at cost.
Example: 10 HOOL {100.30 USD}
- type inventory¶
A collection of multiple positions is an inventory.
Positions can be summed up, resulting in
inventories.
Functions to inspect or modify positions and inventories:
abs()- Absolute value.convert()- Coerce an amount to a particular currency.cost()- Get the cost of a position.empty()- Determine whether the inventiry is empty.filter_currency()- Filter an inventory to just the specified currency.getprice()- Fetch a price.neg()- Negative value.possign()- Correct sign of an Amount based on the usual balance of associated account.units()- Get the number of units.value()- Coerce an inventory to its market value.