bitfinexcom / bitfinex-api-node

BITFINEX NodeJS trading API - Bitcoin, Litecoin, and Ether exchange
https://www.bitfinex.com/
MIT License
462 stars 213 forks source link

order.registerListener calls callback for all orders and not only the order you called registerListener #207

Closed hems closed 6 years ago

hems commented 6 years ago

In order to create 2 orders ( 1 - Limit , 2 - Stop Limit ) i'm creating a variable:

now = Date.now() 

Once the variable is created i create two orders:

image

Once i run this, something unexpected happens: I call ".registerListeners" only on the "__buy_order__", but the listener also gets updates for the "stop order", as you can see on my logs:

image

What am I doing wrong here?

f3rno commented 6 years ago

@hems I'll look into this today, but from your screenie PRICE_AUX_LIMIT should be priceAuxLimit

hems commented 6 years ago

thanks @f3rno I'll investigate and test this further and let you know about my findings

f3rno commented 6 years ago

@hems I'm busy with other things at the moment, but I haven't forgotten about this. There will be a new release of this lib next week, and in the meantime all sorts of things are arriving in master. If this is a bug (I think so, but need to reproduce) then it will be fixed in the next release (2.0.0-beta.1)

hems commented 6 years ago

@f3rno thank you for your feedback, i won't be back at this before second week of March so i'll already try it out on the new version and if i find the bug i'll try to make a better report

f3rno commented 6 years ago

Fixed in master :slightly_smiling_face: