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 inventory to a particular currency.cost()- Get the cost of all positions in an inventory.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()- Convert a position to its cost currency at the market value.