bitburner-src/markdown/bitburner.tix.getorders.md

77 lines
1.9 KiB
Markdown
Raw Normal View History

2021-10-30 18:34:14 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [TIX](./bitburner.tix.md) &gt; [getOrders](./bitburner.tix.getorders.md)
## TIX.getOrders() method
Returns your order book for the stock market.
2021-10-30 22:03:34 +02:00
<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
2022-01-16 00:39:37 +01:00
RAM cost: 2.5 GB This is an object containing information for all the Limit and Stop Orders you have in the stock market. For each symbol you have a position in, the returned object will have a key with that symbol's name. The object's properties are each an array of [StockOrderObject](./bitburner.stockorderobject.md) The object has the following structure:
2021-10-30 18:34:14 +02:00
2021-10-30 21:46:34 +02:00
```ts
2021-10-30 18:34:14 +02:00
{
2021-11-03 05:27:21 +01:00
string1: [ // Array of orders for this stock
2021-10-30 18:34:14 +02:00
{
shares: Order quantity
price: Order price
type: Order type
position: Either "L" or "S" for Long or Short position
},
{
...
},
...
],
2021-11-03 05:27:21 +01:00
string2: [ // Array of orders for this stock
2021-10-30 18:34:14 +02:00
...
],
...
}
```
2021-10-30 22:03:34 +02:00
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.
2021-10-30 18:34:14 +02:00
## Example
2021-10-30 21:46:34 +02:00
```ts
2021-10-30 18:34:14 +02:00
"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",
},
],
}
```