> For the complete documentation index, see [llms.txt](https://ajaib.gitbook.io/ajaib-exchange-open-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajaib.gitbook.io/ajaib-exchange-open-api/getting-started/quickstart.md).

# Definitions

#### Asset Symbols / Trading Pairs

<table><thead><tr><th width="223">Enum</th><th>Description</th></tr></thead><tbody><tr><td><code>BTC_IDR</code></td><td>Bitcoin; Indonesian Rupiah</td></tr></tbody></table>

#### Order Types

<table><thead><tr><th width="223">Enum</th><th>Description</th></tr></thead><tbody><tr><td><code>LIMIT</code></td><td>Limit order. </td></tr><tr><td><code>MARKET</code></td><td>Market order. </td></tr></tbody></table>

#### Order Sides

<table><thead><tr><th width="223">Enum</th><th>Description</th></tr></thead><tbody><tr><td><code>BUY</code></td><td>Indicates an order to buy the base asset using the quote asset</td></tr><tr><td><code>SELL</code></td><td>Indicates an order to sell the base asset in exchange for the quote asset</td></tr></tbody></table>

#### Order Status & Lifecycle&#x20;

<table><thead><tr><th width="367">Enum</th><th>Description</th></tr></thead><tbody><tr><td><code>NEW</code></td><td><ul><li>If workingTime <strong>is zero,</strong> it means Order has been received by exchange but it is not valid yet.</li><li>If workingTime <strong>is not</strong> <strong>zero</strong>, it means Order is valid; it has been sent &#x26; received by matching engine. </li></ul></td></tr><tr><td><code>PARTIALLY_FILLED</code></td><td>Order is partially matched. Eligible to be partially cancelled. </td></tr><tr><td><code>FILLED</code></td><td>Order is executed successfully. End of state. </td></tr><tr><td><code>PARTIALLY_CANCELLED</code></td><td>Order is partially matched and cancelled successfully. End of state. </td></tr><tr><td><code>CANCELLED</code></td><td>Order is cancelled successfully. End of state. </td></tr><tr><td><code>REJECTED</code></td><td>Order is invalid. End of state. </td></tr><tr><td><code>EXPIRED</code></td><td>Order is expired. End of state. </td></tr><tr><td><code>PARTIALLY_EXPIRED</code></td><td>Order is partially matched and partially expired. End of state. </td></tr><tr><td><code>EXPIRED_IN_MATCH</code></td><td>Order has zero matches and then expired due to Self Trade Prevention being triggered. End of state.</td></tr><tr><td><code>PARTIALLY_EXPIRED_IN_MATCH</code></td><td>Order has partially matches and then expired due to Self Trade Prevention being triggered. End of state.</td></tr></tbody></table>

#### Self Trade Prevention

There are four modes for what the system will do if an order could create a self-trade.

<table><thead><tr><th width="367">Enum</th><th>Description</th></tr></thead><tbody><tr><td><code>EXPIRE_MAKER</code></td><td>This mode prevents a trade by immediately expiring the potential maker order's remaining quantity.</td></tr><tr><td><code>EXPIRE_TAKER</code></td><td>This mode prevents a trade by immediately expiring the taker order's remaining quantity.</td></tr><tr><td><code>EXPIRE_BOTH</code></td><td>This mode prevents a trade by immediately expiring both the taker and the potential maker orders' remaining quantities.</td></tr><tr><td><code>NONE</code></td><td>This mode will not prevent a self trade, order still can be matched.</td></tr></tbody></table>

#### Time Intervals (Candlestick / Kline)&#x20;

<table><thead><tr><th width="223">Enum</th><th>Description</th></tr></thead><tbody><tr><td><code>1m</code></td><td>1 minute; 60 seconds</td></tr><tr><td><code>15m</code></td><td>15 minutes ; 900 seconds</td></tr><tr><td><code>1h</code></td><td>1 hour; 60 minutes </td></tr><tr><td><code>4h</code></td><td>4 hours; 240 minutes </td></tr><tr><td><code>1d</code></td><td>1 day; 24 hours </td></tr><tr><td><code>1w</code></td><td>1 week; 7 days </td></tr></tbody></table>

#### Time in Force

This sets how long an order will be active before expiration.

<table><thead><tr><th width="223">Enum</th><th width="396.24609375">Description</th></tr></thead><tbody><tr><td><code>GTC</code></td><td><p>Good Til Canceled.</p><p>The order remains active in the order book until it is fully filled or manually canceled.</p></td></tr><tr><td><code>FOK</code></td><td><p>Fill or Kill. </p><p>The order must be filled entirely and immediately. If the full quantity cannot be executed at once, the order is canceled.</p></td></tr><tr><td><code>IOC</code></td><td><p>Immediate or Cancel. </p><p>The order attempts to execute immediately against available liquidity. Any portion of the order that cannot be filled immediately is canceled.</p></td></tr></tbody></table>

#### Filter

Filters define trading rules on a symbol or an exchange.

1. PRICE\_FILTER

The `PRICE_FILTER` defines the `price` rules for a symbol. There are 3 parts:

* `minPrice` defines the minimum `price`/`stopPrice` allowed; disabled on `minPrice` == 0.
* `maxPrice` defines the maximum `price`/`stopPrice` allowed; disabled on `maxPrice` == 0.
* `tickSize` defines the intervals that a `price`/`stopPrice` can be increased/decreased by; disabled on `tickSize` == 0.

Any of the above variables can be set to 0, which disables that rule in the `price filter`. In order to pass the `price filter`, the following must be true for `price`/`stopPrice` of the enabled rules:

* `price` >= `minPrice`
* `price` <= `maxPrice`
* `price` % `tickSize` == 0

**/exchange-info format:**

```
{
  "filterType": "PRICE_FILTER",
  "minPrice": "0.00000100",
  "maxPrice": "100000.00000000",
  "tickSize": "0.00000100"
}
```

2. LOT\_SIZE

The `LOT_SIZE` filter defines the `quantity` (or "lots" in auction terms) rules for a symbol. There are 3 parts:

* `minQty` defines the minimum `quantity`/`icebergQty` allowed.
* `maxQty` defines the maximum `quantity`/`icebergQty` allowed.
* `stepSize` defines the intervals that a `quantity`/`icebergQty` can be increased/decreased by.

In order to pass the `lot size`, the following must be true for `quantity`/`icebergQty`:

* `quantity` >= `minQty`
* `quantity` <= `maxQty`
* `quantity` % `stepSize` == 0

**/exchangeInfo format:**

```
{
  "filterType": "LOT_SIZE",
  "minQty": "0.00100000",
  "maxQty": "100000.00000000",
  "stepSize": "0.00100000"
}
```

3. MIN\_NOTIONAL

The `MIN_NOTIONAL` filter defines the minimum notional value allowed for an order on a symbol. An order's notional value is the `price` \* `quantity`. `applyToMarket` determines whether or not the `MIN_NOTIONAL` filter will also be applied to `MARKET` orders. Since `MARKET` orders have no price, the average price is used over the last `avgPriceMins` minutes. `avgPriceMins` is the number of minutes the average price is calculated over. 0 means the last price is used.

**/exchangeInfo format:**

```
{
  "filterType": "MIN_NOTIONAL",
  "minNotional": "0.00100000",
  "applyToMarket": true,
  "avgPriceMins": 5
}
```

\ <br>
