Filtros DM
Filtros DM
## Symbol filters
### PRICE_FILTER
The `PRICE_FILTER` defines the `price` rules for a symbol. There are 3 parts:
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` % `tickSize` == 0
**/exchangeInfo format:**
```javascript
"filterType": "PRICE_FILTER",
"minPrice": "0.00000100",
"maxPrice": "100000.00000000",
"tickSize": "0.00000100"
```
### PERCENT_PRICE
The `PERCENT_PRICE` filter defines the valid range for the price based on the average of the
previous trades.
`avgPriceMins` is the number of minutes the average price is calculated over. 0 means the last
price is used.
In order to pass the `percent price`, the following must be true for `price`:
**/exchangeInfo format:**
```javascript
"filterType": "PERCENT_PRICE",
"multiplierUp": "1.3000",
"multiplierDown": "0.7000",
"avgPriceMins": 5
```
### PERCENT_PRICE_BY_SIDE
The `PERCENT_PRICE_BY_SIDE` filter defines the valid range for the price based on the average
of the previous trades.<br/>
`avgPriceMins` is the number of minutes the average price is calculated over. 0 means the last
price is used. <br/>
There is a different range depending on whether the order is placed on the `BUY` side or the
`SELL` side.
**/exchangeInfo format:**
```javascript
"filterType": "PERCENT_PRICE_BY_SIDE",
"bidMultiplierUp": "1.2",
"bidMultiplierDown": "0.2",
"askMultiplierUp": "5",
"askMultiplierDown": "0.8",
"avgPriceMins": 1
```
### LOT_SIZE
The `LOT_SIZE` filter defines the `quantity` (aka "lots" in auction terms) rules for a symbol.
There are 3 parts:
In order to pass the `lot size`, the following must be true for `quantity`/`icebergQty`:
* `quantity` % `stepSize` == 0
**/exchangeInfo format:**
```javascript
{
"filterType": "LOT_SIZE",
"minQty": "0.00100000",
"maxQty": "100000.00000000",
"stepSize": "0.00100000"
```
### MIN_NOTIONAL
The `MIN_NOTIONAL` filter defines the minimum notional value allowed for an order on a
symbol.
`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:**
```javascript
"filterType": "MIN_NOTIONAL",
"minNotional": "0.00100000",
"applyToMarket": true,
"avgPriceMins": 5
```
### NOTIONAL
The `NOTIONAL` filter defines the acceptable notional range allowed for an order on a symbol.
<br/><br/>
`applyMinToMarket` determines whether the `minNotional` will be applied to `MARKET`
orders. <br/>
In order to pass this filter, the notional (`price * quantity`) has to pass the following conditions:
For `MARKET` orders, the average price used over the last `avgPriceMins` minutes will be used
for calculation. <br/>
**/exchangeInfo format:**
```javascript
"filterType": "NOTIONAL",
"minNotional": "10.00000000",
"applyMinToMarket": false,
"maxNotional": "10000.00000000",
"applyMaxToMarket": false,
"avgPriceMins": 5
```
### ICEBERG_PARTS
The `ICEBERG_PARTS` filter defines the maximum parts an iceberg order can have. The number
of `ICEBERG_PARTS` is defined as `CEIL(qty / icebergQty)`.
**/exchangeInfo format:**
```javascript
{
"filterType": "ICEBERG_PARTS",
"limit": 10
```
### MARKET_LOT_SIZE
The `MARKET_LOT_SIZE` filter defines the `quantity` (aka "lots" in auction terms) rules for
`MARKET` orders on a symbol. There are 3 parts:
In order to pass the `market lot size`, the following must be true for `quantity`:
* `quantity` % `stepSize` == 0
**/exchangeInfo format:**
```javascript
"filterType": "MARKET_LOT_SIZE",
"minQty": "0.00100000",
"maxQty": "100000.00000000",
"stepSize": "0.00100000"
```
### MAX_NUM_ORDERS
The `MAX_NUM_ORDERS` filter defines the maximum number of orders an account is allowed
to have open on a symbol.
Note that both "algo" orders and normal orders are counted for this filter.
**/exchangeInfo format:**
```javascript
"filterType": "MAX_NUM_ORDERS",
"maxNumOrders": 25
```
### MAX_NUM_ALGO_ORDERS
**/exchangeInfo format:**
```javascript
"filterType": "MAX_NUM_ALGO_ORDERS",
"maxNumAlgoOrders": 5
```
### MAX_NUM_ICEBERG_ORDERS
**/exchangeInfo format:**
```javascript
"filterType": "MAX_NUM_ICEBERG_ORDERS",
"maxNumIcebergOrders": 5
```
### MAX_POSITION
The `MAX_POSITION` filter defines the allowed maximum position an account can have on the
base asset of a symbol. An account's position defined as the sum of the account's:
`BUY` orders will be rejected if the account's position is greater than the maximum position
allowed.
If an order's `quantity` can cause the position to overflow, this will also fail the
`MAX_POSITION` filter.
**/exchangeInfo format:**
```javascript
"filterType":"MAX_POSITION",
"maxPosition":"10.00000000"
```
### TRAILING_DELTA
The `TRAILING_DELTA` filter defines the minimum and maximum value for the parameter
`trailingDelta`.
In order for a trailing stop order to pass this filter, the following must be true:
**/exchangeInfo format:**
```javascript
"filterType": "TRAILING_DELTA",
"minTrailingAboveDelta": 10,
"maxTrailingAboveDelta": 2000,
"minTrailingBelowDelta": 10,
"maxTrailingBelowDelta": 2000
```
## Exchange Filters
### EXCHANGE_MAX_NUM_ORDERS
Note that both "algo" orders and normal orders are counted for this filter.
**/exchangeInfo format:**
```javascript
"filterType": "EXCHANGE_MAX_NUM_ORDERS",
"maxNumOrders": 1000
```
### EXCHANGE_MAX_NUM_ALGO_ORDERS
**/exchangeInfo format:**
```javascript
"filterType": "EXCHANGE_MAX_NUM_ALGO_ORDERS",
"maxNumAlgoOrders": 200
```
### EXCHANGE_MAX_NUM_ICEBERG_ORDERS
**/exchangeInfo format:**
```javascript
"filterType": "EXCHANGE_MAX_NUM_ICEBERG_ORDERS",
"maxNumIcebergOrders": 10000
```