work to make documentation unified.

This commit is contained in:
Olivier Gagnon
2021-03-12 02:51:56 -05:00
parent a00c253dcb
commit 2ce6ff2041
176 changed files with 1325 additions and 916 deletions

View File

@@ -3,9 +3,10 @@ buyStock() Netscript Function
.. js:function:: buyStock(sym, shares)
:RAM cost: 2.5 GB
:param string sym: Symbol of stock to purchase
:param number shares: Number of shares to purchased. Must be positive. Will be rounded to nearest integer
:RAM cost: 2.5 GB
Attempts to purchase shares of a stock using a `Market Order <http://bitburner.wikia.com/wiki/Stock_Market#Order_Types>`_.

View File

@@ -3,6 +3,7 @@ cancelOrder() Netscript Function
.. js:function:: cancelOrder(sym, shares, price, type, pos)
:RAM cost: 2.5 GB
:param string sym: Symbol of stock to player order for
:param number shares: Number of shares for order. Must be positive. Will be rounded to nearest integer
:param number price: Execution price for the order
@@ -17,7 +18,6 @@ cancelOrder() Netscript Function
:param string pos:
Specifies whether the order is a "Long" or "Short" position. The Values "L" or "S" can also be used. This is
NOT case-sensitive.
:RAM cost: 2.5 GB
Cancels an oustanding Limit or Stop order on the stock market.

View File

@@ -3,8 +3,9 @@ getStockAskPrice() Netscript Function
.. js:function:: getStockAskPrice(sym)
:param string sym: Stock symbol
:RAM cost: 2 GB
:param string sym: Stock symbol
Given a stock's symbol, returns the ask 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).

View File

@@ -3,8 +3,9 @@ getStockBidPrice() Netscript Function
.. js:function:: getStockBidPrice(sym)
:param string sym: Stock symbol
:RAM cost: 2 GB
:param string sym: Stock symbol
Given a stock's symbol, returns the bid 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).

View File

@@ -3,8 +3,9 @@ getStockForecast() Netscript Function
.. js:function:: getStockForecast(sym)
:param string sym: Symbol of stock
:RAM cost: 2.5 GB
:param string sym: Symbol of stock
Returns the probability that the specified stock's price will increase
(as opposed to decrease) during the next tick.

View File

@@ -3,8 +3,9 @@ getStockMaxShares() Netscript Function
.. js:function:: getStockMaxShares(sym)
:param string sym: Stock symbol
:RAM cost: 2 GB
:param string sym: Stock symbol
Returns the maximum number of shares that the stock has. This is the maximum
amount of the stock that can be purchased in both the Long and Short

View File

@@ -3,8 +3,9 @@ getStockPosition() Netscript Function
.. js:function:: getStockPosition(sym)
:param string sym: Stock symbol
:RAM cost: 2 GB
:param string sym: Stock symbol
Returns an array of four elements that represents the player's position in a stock.

View File

@@ -3,8 +3,9 @@ getStockPrice() Netscript Function
.. js:function:: getStockPrice(sym)
:param string sym: Stock symbol
:RAM cost: 2 GB
:param string sym: Stock symbol
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).

View File

@@ -1,13 +1,14 @@
getStockPurchaseCost() Netscript Function
=========================================
.. js:function:: getStockPurchaseCost(sym, shares, posType)
.. js:function:: getStockPurchaseCost(sym, shares, posType)
:RAM cost: 2 GB
:param string sym: Stock symbol
:param number shares: Number of shares to purchase
:param string posType: Specifies whether the order is a "Long" or "Short" position.
The values "L" or "S" can also be used.
:RAM cost: 2 GB
Calculates and returns how much it would cost to buy a given number of
shares of a stock. This takes into account :ref:`spread <gameplay_stock_market_spread>`

View File

@@ -1,13 +1,14 @@
getStockSaleGain() Netscript Function
=====================================
.. js:function:: getStockSaleGain(sym, shares, posType)
.. js:function:: getStockSaleGain(sym, shares, posType)
:RAM cost: 2 GB
:param string sym: Stock symbol
:param number shares: Number of shares to sell
:param string posType: Specifies whether the order is a "Long" or "Short" position.
The values "L" or "S" can also be used.
:RAM cost: 2 GB
Calculates and returns how much you would gain from selling a given number of
shares of a stock. This takes into account :ref:`spread <gameplay_stock_market_spread>`

View File

@@ -3,8 +3,9 @@ getStockVolatility() Netscript Function
.. js:function:: getStockVolatility(sym)
:param string sym: Symbol of stock
:RAM cost: 2.5 GB
:param string sym: Symbol of stock
Returns the volatility of the specified stock.

View File

@@ -3,6 +3,7 @@ placeOrder() Netscript Function
.. js:function:: placeOrder(sym, shares, price, type, pos)
:RAM cost: 2.5 GB
:param string sym: Symbol of stock to player order for
:param number shares: Number of shares for order. Must be positive. Will be rounded to nearest integer
:param number price: Execution price for the order
@@ -17,7 +18,6 @@ placeOrder() Netscript Function
:param string pos:
Specifies whether the order is a "Long" or "Short" position. The Values "L" or "S" can also be used. This is
NOT case-sensitive.
:RAM cost: 2.5 GB
Places an order on the stock market. This function only works
for :ref:`Limit and Stop Orders <gameplay_stock_market_order_types>`.

View File

@@ -3,9 +3,10 @@ sellShort() Netscript Function
.. js:function:: sellShort(sym, shares)
:RAM cost: 2.5 GB
:param string sym: Symbol of stock to sell
:param number shares: Number of shares to sell. Must be positive. Will be rounded to nearest integer
:RAM cost: 2.5 GB
Attempts to sell a `short <http://bitburner.wikia.com/wiki/Stock_Market#Positions:_Long_vs_Short>`_ position of a stock
using a `Market Order <http://bitburner.wikia.com/wiki/Stock_Market#Order_Types>`_.

View File

@@ -3,9 +3,10 @@ sellStock() Netscript Function
.. js:function:: sellStock(sym, shares)
:RAM cost: 2.5 GB
:param string sym: Symbol of stock to sell
:param number shares: Number of shares to sell. Must be positive. Will be rounded to nearest integer
:RAM cost: 2.5 GB
Attempts to sell shares of a stock using a `Market Order <http://bitburner.wikia.com/wiki/Stock_Market#Order_Types>`_.

View File

@@ -3,9 +3,10 @@ shortStock() Netscript Function
.. js:function:: shortStock(sym, shares)
:RAM cost: 2.5 GB
:param string sym: Symbol of stock to short
:param number shares: Number of shares to short. Must be positive. Will be rounded to nearest integer
:RAM cost: 2.5 GB
Attempts to purchase a `short <http://bitburner.wikia.com/wiki/Stock_Market#Positions:_Long_vs_Short>`_ position of a stock
using a `Market Order <http://bitburner.wikia.com/wiki/Stock_Market#Order_Types>`_.