mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
v0.44.1 Minor Update - Added Augs to Duplicate Sleeves and updated documentation
This commit is contained in:
27
doc/source/netscript/tixapi/getStockPosition.rst
Normal file
27
doc/source/netscript/tixapi/getStockPosition.rst
Normal file
@@ -0,0 +1,27 @@
|
||||
getStockPosition() Netscript Function
|
||||
=====================================
|
||||
|
||||
.. js:function:: getStockPosition(sym)
|
||||
|
||||
:param string sym: Stock symbol
|
||||
:RAM cost: 2 GB
|
||||
|
||||
Returns an array of four elements that represents the player's position in a stock.
|
||||
|
||||
The first element is the returned array is the number of shares the player owns of the stock in the
|
||||
`Long position <http://bitburner.wikia.com/wiki/Stock_Market#Positions:_Long_vs_Short>`_. The second
|
||||
element in the array is the average price of the player's shares in the Long position.
|
||||
|
||||
The third element in the array is the number of shares the player owns of the stock in the
|
||||
`Short position <http://bitburner.wikia.com/wiki/Stock_Market#Positions:_Long_vs_Short>`_. The fourth
|
||||
element in the array is the average price of the player's Short position.
|
||||
|
||||
All elements in the returned array are numeric.
|
||||
|
||||
Example::
|
||||
|
||||
pos = getStockPosition("ECP");
|
||||
shares = pos[0];
|
||||
avgPx = pos[1];
|
||||
sharesShort = pos[2];
|
||||
avgPxShort = pos[3];
|
||||
Reference in New Issue
Block a user