Home > bitburner > TIX > getPrice
Returns the price of a stock
Signature:
getPrice(sym: string): number;
Parameter | Type | Description |
---|---|---|
sym | string | Stock symbol. |
Returns:
number
The price of a stock.
RAM cost: 2 GB The stock’s price is the average of its bid and ask price.
// NS1
stock.getPrice("FISG");
// NS2
ns.stock.getPrice("FISG");