Added Four Sigma (4S) Market Data feature, and its Netscript TIX API functions as well

This commit is contained in:
Daniel Xie
2018-08-24 15:44:48 -05:00
parent 815762bddd
commit e4f02b298b
9 changed files with 261 additions and 47 deletions
+15 -13
View File
@@ -143,7 +143,9 @@ getActionEstimatedSuccessChance
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match
Returns the estimated success chance for the specified action
Returns the estimated success chance for the specified action. This chance
is returned as a decimal value, NOT a percentage (e.g. if you have an estimated
success chance of 80%, then this function will return 0.80, NOT 80).
getActionCountRemaining
-----------------------
@@ -240,17 +242,17 @@ getSkillLevel
This function returns your level in the specified skill.
The function returns -1 if an invalid skill name is passed in
getSkillUpgradeCost
-------------------
.. js:function:: getSkillUpgradeCost(skillName="")
:param string skillName: Name of skill. Case-sensitive and must be an exact match
This function returns the number of skill points needed to upgrade the
This function returns the number of skill points needed to upgrade the
specified skill.
The function returns -1 if an invalid skill name is passed in.
upgradeSkill
@@ -369,21 +371,21 @@ joinBladeburnerDivision
are already a member.
Returns false otherwise
getBonusTime
------------
.. js:function:: getBonusTime()
Returns the amount of accumulated "bonus time" (seconds) for the Bladeburner mechanic.
"Bonus time" is accumulated when the game is offline or if the game is
inactive in the browser.
"Bonus time" makes the game progress faster, up to 5x the normal speed.
"Bonus time" is accumulated when the game is offline or if the game is
inactive in the browser.
"Bonus time" makes the game progress faster, up to 5x the normal speed.
For example, if an action takes 30 seconds to complete but you've accumulated
over 30 seconds in bonus time, then the action will only take 6 seconds
in real life to complete.
over 30 seconds in bonus time, then the action will only take 6 seconds
in real life to complete.
Examples
--------
+36 -1
View File
@@ -159,7 +159,7 @@ cancelOrder
:param number price: Execution price for the order
:param string type: Type of order. It must specify "limit" or "stop", and must also specify "buy" or "sell". This is NOT
case-sensitive. Here are four examples that will work:
* limitbuy
* limitsell
* stopbuy
@@ -172,3 +172,38 @@ cancelOrder
Cancels an oustanding Limit or Stop order on the stock market.
The ability to use limit and stop orders is **not** immediately available to the player and must be unlocked later on in the game.
getStockVolatility
------------------
.. js:function:: getStockVolatility(sym)
:param string sym: Symbol of stock
Returns the volatility of the specified stock.
Volatility represents the maximum percentage by which a stock's price can
change every tick. The volatility is returned as a decimal value, NOT
a percentage (e.g. if a stock has a volatility of 3%, then this function will
return 0.03, NOT 3).
In order to use this function, you must first purchase access to the Four Sigma (4S)
Market Data TIX API.
getStockForecast
----------------
.. js:function:: getStockForecast(sym)
: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.
The probability is returned as a decimal value, NOT a percentage (e.g. if a
stock has a 60% chance of increasing, then this function will return 0.6,
NOT 60).
In other words, if this function returned 0.30 for a stock, then this means
that the stock's price has a 30% chance of increasing and a 70% chance of
decreasing during the next tick.