Updated Stock market UI for new stock Max Shares restriction. Added Netscript function for getting a stock's max shares

This commit is contained in:
danielyxie
2019-01-09 02:06:49 -08:00
parent 0effdac6d1
commit 9db7aee34e
11 changed files with 2280 additions and 594 deletions

View File

@@ -3,7 +3,8 @@ Netscript Trade Information eXchange (TIX) API
The Trade Information eXchange (TIX) is the communications protocol supported by the World Stock Exchange (WSE).
The WSE provides an API that allows you to automatically communicate with the
`Stock Market <http://bitburner.wikia.com/wiki/Stock_Market>`_. This API lets you write code using Netscript
:ref:`Stock Market <gameplay_stock_market>`.
This API lets you write code using Netscript
to build automated trading systems and create your own algorithmic trading strategies. Access to this
TIX API can be purchased by visiting the World Stock Exchange in-game.
@@ -62,6 +63,19 @@ getStockPosition
sharesShort = pos[2];
avgPxShort = pos[3];
getStockMaxShares
-----------------
.. js:function:: getStockMaxShares(sym)
:param string sym: Stock symbol
:RAM cost: 2 GB
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
positions combined
buyStock
--------