placeOrder() Netscript Function¶
placeOrder(sym, shares, price, type, pos)¶
- sym (string) – Symbol of stock to player order for
- shares (number) – Number of shares for order. Must be positive. Will be rounded to nearest integer
- price (number) – Execution price for the order
- type (string) –
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:
- pos (string) – Specifies whether the order is a “Long” or “Short” position. The Values “L” or “S” can also be used. This is NOT case-sensitive.
Places an order on the stock market. This function only works for Limit and Stop Orders.
Returns true if the order is successfully placed, and false otherwise.
The ability to place limit and stop orders is not immediately available to the player and must be unlocked later on in the game.