Get average trade price for PERCENT_PRICE ? When will PERCENT_PRICE_BY_SIDE be used?

Hello,

The PERCENT_PRICE and PERCENT_PRICE_BY_SIDE filter are both used on the average price of trades from the past 5 minutes. Binance API Documentation
But how do I keep track of this average price without tracking every single global trade?

REST API: I found this endpoint: Current Average Price GET /api/v3/avgPrice
But how to get it via websocket? I only found this:
“Individual Symbol Rolling Window Statistics Streams” <symbol>@ticker_<window_size> Binance API Documentation but it only supports 1h and 4h average, not the needed 5minutes.

  1. Could binance please add a “5m” option for this “Individual Symbol Rolling Window Statistics Streams”? (and maybe even a specialised stream that only returns this average price) It is super important to always have the current value to be safe from limitations.

I learned it the hard way that it is super important to always know the max and min allowed Price from an exchange (in my opinion exchanges should not have such limitations at all!). Crypto is very volatile and for whatever reason a market can crash within seconds, just see LUNA. At such a crash a minPrice/maxPrice are very likely to forbid users to place reasonable orders, especially the PERCENT_PRICE filter is horrible, because it also prevents prices in good directions, which was very harmful for eg. LUNA! Luckily binance introduced PERCENT_PRICE_BY_SIDE which does not block all directions, but unfortunately this better filter is still not used for any pair?!

  1. When will binance finally use PERCENT_PRICE_BY_SIDE instead of the stupid PERCENT_PRICE filter ?

  2. Any chance binance will remove max and min prices completely? It is very harmful during extreme crashes. A market order can crash a market from a price of eg. 1500 USD to 2 USD and if then trades of the past 5 minutes are around 2USD, there is no way to quickly recover to 1500 USD without again placing a market order, which is dangerous. And yes, this is a real example (crash from 1500 to 2 and then back to 1500) within minutes.
    Yes I know the max/min Prices are to “protect stupid people from fat finger”, but it should be enough to put 5 extra confirmation windows there or maybe add a parameter for API “I know what I’m doing, let me place this price!”

REST API: I found this endpoint: Current Average Price GET /api/v3/avgPrice
But how to get it via websocket?

There is currently no way to pull a 5-minute average price for a symbol via websocket.

  1. Could binance please add a “5m” option for this “Individual Symbol Rolling Window Statistics Streams”? (and maybe even a specialised stream that only returns this average price) It is super important to always have the current value to be safe from limitations.

Team has been informed about this request.

  1. When will binance finally use PERCENT_PRICE_BY_SIDE instead of the stupid PERCENT_PRICE filter ?

The PERCENT_PRICE filter is being phased out and replaced with PERCENT_PRICE_BY_SIDE filter. There is no ETA for when PERCENT_PRICE filters are phased out.

Any chance binance will remove max and min prices completely? It is very harmful during extreme crashes.

There are no plans on removing such a limitation.

A market order can crash a market from a price of eg. 1500 USD to 2 USD and if then trades of the past 5 minutes are around 2USD, there is no way to quickly recover to 1500 USD without again placing a market order, which is dangerous.

This is incorrect. Market orders are still limited by the PERCENT_PRICE filter, and is revoked if the market order will consume the order book to the point where the price will be outside the PERCENT_PRICE range.

Thank you very much for the detailed response. Hopefully binance will add a 5m average tradeprice to the websocket.

Thanks for clarification on market orders.
Can you please tell me if such a market order will be cancelled completely? Or will it fill until it reaches the min/max Price and is only cancelled for the remaining amount?

Can you please tell me if such a market order will be cancelled completely? Or will it fill until it reaches the min/max Price and is only cancelled for the remaining amount?

The market order will be immediately cancelled, without the opportunity to be filled.

1 Like