2019-03-02 19:08:54 -08:00
|
|
|
getStockPrice() Netscript Function
|
|
|
|
==================================
|
|
|
|
|
|
|
|
.. js:function:: getStockPrice(sym)
|
|
|
|
|
|
|
|
:RAM cost: 2 GB
|
2021-03-12 02:51:56 -05:00
|
|
|
:param string sym: Stock symbol
|
|
|
|
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2019-04-28 23:20:27 -07:00
|
|
|
Given a stock's symbol, returns the price of that stock (the symbol is a sequence
|
|
|
|
of two to four capital letters, **not** the name of the company to which that stock belongs).
|
|
|
|
|
|
|
|
.. note:: The stock's price is the average of its bid and ask price.
|
|
|
|
See :ref:`gameplay_stock_market_spread` for details on what this means.
|
2019-03-02 19:08:54 -08:00
|
|
|
|
|
|
|
Example::
|
|
|
|
|
2019-04-28 23:20:27 -07:00
|
|
|
getStockPrice("FSIG");
|