alainsopp / tradingaly

A tool to simulate sell and buy orders execution to a local trading account and a local stockexchange.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New Ask offers are not merged when having identical price

alainsopp opened this issue · comments

Description
When executing a buy limit order with no available offers, a new
Ask offer is added on the market. However, if there is an ask
offer with the same amount, the total amount is not incremented
but a new offer with the same price is added.

To Reproduce
Steps to reproduce the behavior:

  1. Go to interface
  2. Fill amount and limit field with the value "1"
  3. Click on "Buy"
  4. See error

Expected behavior
The buy limit order offer is added to the market,
and the size for this offer it updated.
The new value is equal to the previous value
plus the new offer size value.