I also believe that there is no industry standard that encompasses all cases you will encounter. I can only share some experience with the issue.
My broker E*Trade is showing me number of shares with up to 5 decimal places and prices per share with up to four (true for both last price and cost per share).
Trades are sometimes reported with prices with three decimal places (even though the prices are above $1).
There is SEC Rule 612 (Minimum Pricing Increment) of Regulation NMS requiring prices for securities below USD 1.00 to be quoted with four decimal places and above USD 1.00 with two decimal places. I do not understand how that reconciles with what my broker does.
These are just rules for national exchanges in the US. There are other exchanges in the US and exchanges in many other countries.
There are cryptocurrencies quoted to 8 decimal places in terms of both price and quantity.
Accounting software and financial software sometimes has to deal with historical prices after stock splits. It often adjusts the historical prices by dividing them by the split factors thus making smaller and smaller past prices that need greater and greater precision for representing their prices if you don't want to lose precision.
Very often a broker allows reinvesting of the dividend, where they add fractional shares to your whole number of shares based on the amount paid and price at the time of converting the cash dividend to shares.
Given all this, it may be hard to predict exactly how and in what context your software will be used, and therefore it seems prudent to use at least 4 or 5 or 6 decimal places for prices.
On the other hand, if you allow too much of a precision, you may end up with smaller and smaller so-called odd lots. For example, when selling all stocks in multiple orders, you may end up having a lot with 0.000000001 shares due to rounding. So you may want to introduce deliberate rounding when a number of shares becomes very small in absolute sense.