Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

binance: event not emit after a trade occure #2086

Closed
ghost opened this issue Apr 5, 2018 · 5 comments
Closed

binance: event not emit after a trade occure #2086

ghost opened this issue Apr 5, 2018 · 5 comments
Labels

Comments

@ghost
Copy link

ghost commented Apr 5, 2018

I'm submitting a ...
[ x] bug report
[ ] question about the decisions made in the repository

Action taken (what you did)

I use the most recent version of develop branch of gekko live.
gekko has buy but when i have wake up i have see than bought price was not set at all.

Expected result (what you hoped would happen)

I was expecting when a trade occure event, event.action, event.portfolio['asset'] and event.price was set but event has not be emit.

Actual result (unexpected outcome)

event has not be emit after a buy order :(

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)

In my start i use this :
strat.onTrade = function(event) {
switch (event.action) {
case 'buy': {
console.log(event);
this.boughtPrice = event.price;
}
case 'sell': {
console.log(event);
this.soldPrice = event.price;
}
}
}

When the buy order has been filled event has not be emit because this.boughtPrice has not be set at all.
The same code was working well on bitfinex but not on binance :(
Please make a fix i cannot trade anymore.

@ghost
Copy link
Author

ghost commented Apr 5, 2018

Note that i have the last version with the last update of gekko.
For me event has not be emit but for a friend who has not the last upgrade but his gekko is on develop branch but with not the last upgrade event has been emit.
We use same strategy and same exchange binance so i don't know if it s the last change or if it s happen sometime and this time it s has work for my friend.
A fix will be great because i really need event.price !

@ansonphong
Copy link
Contributor

@askmike This may have been a result of my PR for the Trade Class, can you verify that the emit event is configured properly?

ansonphong referenced this issue Apr 10, 2018
* subtract candle length from start time to calculate isPremature

* Move startTimeMinusCandleSize inside realtime if check

* return the indicator after adding it

* develop trade class

* make fixes after live market test

* line spacing

* rollback package-lock.json to develop branch

* link to discussion:

* move methods from portfolio manager into trade class and new portfolio class

* cleanup logging, comments
@H256
Copy link
Contributor

H256 commented Apr 13, 2018

I'm experiencing the same problem even without #1968 . The Adviser advises to go 'short' as the first trade. After that no other trades are executed, even though there were plenty of chances to go 'long'. (tried with bitstamp and binance) Maybe something else is wrong with the event :(

@ghost
Copy link
Author

ghost commented Apr 18, 2018

i have not use last upgrade by doing:
git checkout 07a4d67
and on the 2 last trade i have made event.price was set ...

@stale
Copy link

stale bot commented Oct 24, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.

@stale stale bot added the wontfix label Oct 24, 2018
@stale stale bot closed this as completed Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants