hummingbot / hummingbot

Open source software that helps you create and deploy high-frequency crypto trading bots
https://hummingbot.org
Apache License 2.0
8.24k stars 2.83k forks source link

Update `PaperTradeExchange` to make use of new fields on `LimitOrder` #3681

Open Nullably opened 3 years ago

Nullably commented 3 years ago

Why

Initially, we did not have filled_amount which we think is the most important field. Because of that, partially filled orders in paper trade mode are not captured properly.

We also didn't have creation_timestamp for order age, what we have been doing so far is to extract it out of the order ID and revert back to the creation timestamp to calculate the order age which is not a good approach.

What

Update PaperTradeExchange connector to store the new creation_timestamp, filled_amount and status correctly during order creation and updates.

Definition of Done

┆Issue is synchronized with this Clickup task by Unito

dennisocana commented 3 years ago

Updated the description as to why we need this change. But since we do not have unit tests for paper trade exchange, implementing this could be difficult and creating new unit tests would expand the scope of work required for this change (also taking into account we need to meet the diff coverage requirements).

We plan to rework paper trading mode soon which we should complete first.

phbrgnomo commented 3 years ago

@dennisocana @Nullably since we decided to make paper trade available only on Binance (#4387) do we still need this story?

aarmoa commented 3 years ago

Yes, this story is still required. It is related to the logic of paper trade, not to the exchange we are connecting to while paper trade is active.