Skip to content

Potential erratic order matching issue involving margin call orders #625

@HarukaMa

Description

@HarukaMa

Dunno if this is discussed before but I couldn't found any old issues about this.

snipaste_2018-02-02_16-35-42

If there are margin call orders waiting to be executed, the buy order with price between call limit and margin call price will be executed on the margin call orders at the order price, instead of executing against lowest asks orders below the margin call order.

Possible cause:

  1. New order - 2. margin call order execution match - 3. execute. In step 1 the new order will first considered as highest bid which is even higher than lowest ask on the order book, so in step 2 the requirement of margin call order execution could be successfully met, leading to step 3.

This is completely guessed from what I could see, but I've been caught once and seems a new market bot is also being affected by placing orders on specified prices.

Ideally, the new buy orders should first match the existing orders on the order book, then being considered for margin call orders. then execute against the margin call order with lowest price available (margin call price in wallet UI)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions