mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
1.5 KiB
1.5 KiB
Home > bitburner > Stock > placeOrder
Stock.placeOrder() method
Place order for stocks.
Signature:
placeOrder(sym: string, shares: number, price: number, orderType: OrderType, positionType: PositionType): boolean;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
sym |
string |
Stock symbol. |
|
shares |
number |
Number of shares for order. Must be positive. Will be rounded to the nearest integer. |
|
price |
number |
Execution price for the order. |
|
orderType |
Type of order. | |
|
positionType |
Specifies whether the order is a Long ("L") or Short ("S") position. |
Returns:
boolean
True if the order is successfully placed, and false otherwise.
Remarks
RAM cost: 2.5 GB
Places an order on the stock market. This function only works for Limit and Stop Orders.
The ability to place limit and stop orders is **not** immediately available to the player and must be unlocked later on in the game.
Returns true if the order is successfully placed, and false otherwise.