New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trading UI bid/ask cancellation doesn't work #1776

Open
shal opened this Issue Oct 23, 2018 · 8 comments

Comments

Projects
None yet
4 participants
@shal
Copy link
Member

shal commented Oct 23, 2018

No description provided.

@shal

This comment has been minimized.

Copy link
Member

shal commented Oct 23, 2018

Redirected from rubykube/workbench#216

@shal shal added the Type: Bug label Oct 23, 2018

@Thedabest

This comment has been minimized.

Copy link

Thedabest commented Oct 24, 2018

for test
I tried on the latest workbench not customizing anything.
Orders history update
Orders Book update
Chart update
update update
my open orders not update
When refreshing the orders page, the order is canceled, but it does not update directly.
i will update video soon.

@Thedabest

This comment has been minimized.

Copy link

Thedabest commented Oct 24, 2018

https://streamable.com/7cf9v
video testing
Mine orders not working
my orders not delete rows when orders are complete
Balance not update when place orders
Click to Cancel All, Cancel Bids, Cancel Asks not update

@Thedabest

This comment has been minimized.

Copy link

Thedabest commented Oct 26, 2018

The 1.8-stable version has the same bug

@martianatwork

This comment has been minimized.

Copy link

martianatwork commented Nov 10, 2018

This is a bug related to Model events

Because the trading engines runs raw sql quries update events are never published so

what we have to do is to publish Pusher events on update.

I have fixed this by adding

after_commit :trigger_pusher_event, on: [:create, :update]
def trigger_pusher_event
    Member.trigger_pusher_event member_id, :account, currency.id => {
        currency: currency.id,
        balance: balance,
        locked: locked,
        margin: margin
        }
  end
  def trigger_pusher_event
    Member.trigger_pusher_event member_id, :order, \
      id:            id,
      at:            at,
      market:        market_id,
      kind:          kind,
      price:         price&.to_s('F'),
      state:         state,
      volume:        volume.to_s('F'),
      origin_volume: origin_volume.to_s('F'),
      stop:          stop.to_s('F'),
      type:          ord_type
  end

to Account and Order models.

also triggered this events from trading executor

@laugh26

This comment has been minimized.

Copy link

laugh26 commented Nov 14, 2018

@martianatwork were did you put that because thats my problem too

@martianatwork

This comment has been minimized.

Copy link

martianatwork commented Nov 17, 2018

@laugh26 in executor.rb and order.rb I will push some code on Sunday which will fix most of issues like this

@laugh26

This comment has been minimized.

Copy link

laugh26 commented Nov 17, 2018

@martianatwork thats great my friend i will wait for that. Please inform me when you do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment