Our Product: CyberX Trading TerminalNEWAbout UsOur ServiceOur TeamContact Us
Help Center

Algo Detail: PEG

Last updated: 2019-08-23 15:08

PEG is a highly customizable algo frequently used by trader to achieve best price in the volatile market.


  1. Set up pegging price: Supported price type are Same Side Price (bid when buy, ask when sell) / Opposite Price / Variable Mid Price (Random price between bid and ask) / Mid Price. You can also set price offset based on price type's result.
  2. Set up order quantity: Quantity choose randomly between min and max.
  3. When orderbook changed, algo will cancel submitted orders and send a new one with latest calculated price & quantity.



  • Variable Mid Price: randomly select a price between the buy 1 and sell 1 price;
  • Mid Price: (buy 1 price + sell 1 price) / 2;
  • Opposite Price: in case of buy, use sell 1 price to buy; in case of sell, use buy 1 price to sell;
  • Same Side Price: in case of buy, use buy 1 price to buy; in case of sell, use sell 1 to sell;


  • Based on the above price, increase or decrease a certain amount.
  • In case the above price is 5000, the offset is set to be 1%,
  • if buy, then the buy price is 5000*101%=5050;
  • if sell, then the sell price is 5000*99%=4950.

Highest/lowest price

The algo will not place order which the price is higher (when buy in) or lower (when sell out) than the highest or lowest price.

Single order limit

The algo limits the single order size placed at given price.

It uses max/min percentage to control the max and min order size. As an example, if BTC/USDT is traded at 10,000, and on exchange’s order book, the sell 1 price is 10,000, and currently on the exchange there are 100 BTCs sell order iat 10,000, if you set the max percentage as 2%, then the max buy order algo will place is 2BTC (100*2% =2).

Time Interval

The exchanges always limit the frequency of API requests. When you have several algo orders running simultaneously on one exchange, we suggest you raise the time interval parameters to avoid triggering the exchange’s limitation.

Force Completion

Since the size of the each sub orders generated by Algo is randomized, the very last sub order may not meet the exchange’s minimum notional requirement. By ticked the force completion option, algo will consider the insufficient tail order size ahead of time, and ensure the order can be fully filled.


Please refer to the Peg Order instruction.


  1. Please be aware that place large order might have adverse impact on market and increase trading cost.
  2. CyberX does not ensure 100% of order notional is place by default, unless you tick 'Force Completion'.
  3. Please ensure your order frequency is set below the exchange’s limit.