I do not understand how the 'price' of a stock relates to the actual price you pay when buying it.

(obviously stocks cannot resolve N/A)

I'm not sure if you figured it out, since it's been a few months, but I'll put this here for those curious.

Under the hood, "STONK" markets are just probability (CPMM-1) markets, i.e. the calculations are all the same. Manifold wrote a Notion article a while back about how the exact probabilities are calculated. [1]

Keep in mind that the value p in the formulas is just a constant for each market, not the probability of the market.

This value p can be retrieved using the API. (Found in the corresponding "FullMarket" or "LiteMarket" object) [2]

Let the probability of the stock market be Prob. The formula for the "price" displayed is:

max(Prob, log(Prob / (1 - Prob))) * 500

(where log is the natural logarithm) [3]

I find this a little weird, since the price (listed as "Ṁxxx per share") is not the same as the amount of mana spent to obtain one share.

[1] https://www.notion.so/Maniswap-ce406e1e897d417cbd491071ea8a0c39