mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-12 18:53:55 +01:00
79 lines
1.8 KiB
Markdown
79 lines
1.8 KiB
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [TIX](./bitburner.tix.md) > [getOrders](./bitburner.tix.getorders.md)
|
||
|
|
||
|
## TIX.getOrders() method
|
||
|
|
||
|
Returns your order book for the stock market.
|
||
|
|
||
|
This is an object containing information for all the Limit and Stop Orders you have in the stock market. The object has the following structure:
|
||
|
|
||
|
```js
|
||
|
{
|
||
|
StockSymbol1: [ // Array of orders for this stock
|
||
|
{
|
||
|
shares: Order quantity
|
||
|
price: Order price
|
||
|
type: Order type
|
||
|
position: Either "L" or "S" for Long or Short position
|
||
|
},
|
||
|
{
|
||
|
...
|
||
|
},
|
||
|
...
|
||
|
],
|
||
|
StockSymbol2: [ // Array of orders for this stock
|
||
|
...
|
||
|
],
|
||
|
...
|
||
|
}
|
||
|
```
|
||
|
The “Order type” property can have one of the following four values: \* “Limit Buy Order” \* “Limit Sell Order” \* “Stop Buy Order” \* “Stop Sell Order” Note that the order book will only contain information for stocks that you actually have orders in.
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
getOrders(): StockOrder;
|
||
|
```
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
[StockOrder](./bitburner.stockorder.md)
|
||
|
|
||
|
Object containing information for all the Limit and Stop Orders you have in the stock market.
|
||
|
|
||
|
## Remarks
|
||
|
|
||
|
2.5 GB
|
||
|
|
||
|
## Example
|
||
|
|
||
|
|
||
|
```js
|
||
|
"If you do not have orders in Nova Medical (NVMD), then the returned object will not have a “NVMD” property."
|
||
|
{
|
||
|
ECP: [
|
||
|
{
|
||
|
shares: 5,
|
||
|
price: 100,000
|
||
|
type: "Stop Buy Order",
|
||
|
position: "S",
|
||
|
},
|
||
|
{
|
||
|
shares: 25,
|
||
|
price: 125,000
|
||
|
type: "Limit Sell Order",
|
||
|
position: "L",
|
||
|
},
|
||
|
],
|
||
|
SYSC: [
|
||
|
{
|
||
|
shares: 100,
|
||
|
price: 10,000
|
||
|
type: "Limit Buy Order",
|
||
|
position: "L",
|
||
|
},
|
||
|
],
|
||
|
}
|
||
|
```
|
||
|
|