mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-17 21:23:54 +01:00
39 lines
1.2 KiB
Markdown
39 lines
1.2 KiB
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [TIX](./bitburner.tix.md) > [placeOrder](./bitburner.tix.placeorder.md)
|
||
|
|
||
|
## TIX.placeOrder() method
|
||
|
|
||
|
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.
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
placeOrder(sym: StockSymbol, shares: number, price: number, type: OrderType, pos: OrderPos): boolean;
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| sym | [StockSymbol](./bitburner.stocksymbol.md) | Stock symbol. |
|
||
|
| shares | number | Number of shares for order. Must be positive. Will be rounded to nearest integer. |
|
||
|
| price | number | Execution price for the order. |
|
||
|
| type | [OrderType](./bitburner.ordertype.md) | Type of order. |
|
||
|
| pos | [OrderPos](./bitburner.orderpos.md) | Specifies whether the order is a “Long” or “Short” position. |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
boolean
|
||
|
|
||
|
True if the order is successfully placed, and false otherwise.
|
||
|
|
||
|
## Remarks
|
||
|
|
||
|
2.5 GB
|
||
|
|