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

Gekko can't pull GHS balance from cex.io #63

Closed
gm1972 opened this issue Dec 4, 2013 · 13 comments
Closed

Gekko can't pull GHS balance from cex.io #63

gm1972 opened this issue Dec 4, 2013 · 13 comments

Comments

@gm1972
Copy link

gm1972 commented Dec 4, 2013

Trying to get Gekko to auto trade but it seems to be a problem when it tries to get the GHS balance from cex.io and thous it can't sell GHS.

BTC saldo and buying works though...

When starting:
2013-12-04 14:23:07 (INFO): Using normal settings to monitor the live market
2013-12-04 14:23:07 (INFO): Profit reporter active on simulated balance
2013-12-04 14:23:07 (DEBUG): getting balance & fee from cex.io
2013-12-04 14:23:13 (INFO): trading at cex.io ACTIVE
2013-12-04 14:23:13 (INFO): cex.io trading fee will be: 0%
2013-12-04 14:23:13 (INFO): current cex.io portfolio:
2013-12-04 14:23:13 (INFO): BTC: 0.00000145
2013-12-04 14:23:13 (INFO): GHS: NaN
2013-12-04 14:23:13 (INFO): Calculating EMA on historical data...
2013-12-04 14:23:13 (DEBUG): fetching historical data at cex.io

When trying to sell
2013-12-04 12:26:13 (DEBUG): we are currently in a downtrend @ 0.07277501 (-0.007)
2013-12-04 12:26:13 (INFO): ADVICE is to SELL @ 0.07277501 (-0.007)
2013-12-04 12:26:13 (INFO): wanted to sell but insufficient GHS (NaN) at cex.io
2013-12-04 12:27:10 (DEBUG): fetching new trades for new bucket at cex.io
2013-12-04 12:27:12 (DEBUG): cex.io fetching from tid 543256
2013-12-04 12:27:12 (DEBUG): fetching since 1386156422

Best regards,
N

@gm1972
Copy link
Author

gm1972 commented Dec 4, 2013

It looks like if you in the file: \gekko-master\exchanges\cexio.js

Tries to use the value: "- parseFloat(data.GHS.orders);" but that value does not exist in the json list so if I just ignore it it seems to work

// assets = parseFloat(data.GHS.available) - parseFloat(data.GHS.orders);
assets = parseFloat(data.GHS.available);

@levitt
Copy link

levitt commented Dec 4, 2013

Where would I place this
assets = parseFloat(data.GHS.available) - parseFloat(data.GHS.orders);
assets = parseFloat(data.GHS.available);

do I include the // or no?

@levitt
Copy link

levitt commented Dec 4, 2013

is this the error that you get?

#59

@gm1972
Copy link
Author

gm1972 commented Dec 4, 2013

The error I get from the original code is that it can't pull the GHS balance from cex.io:
2013-12-04 14:23:13 (INFO): BTC: 0.00000145
2013-12-04 14:23:13 (INFO): GHS: NaN

GHS = NaN

so if I replace the row "assets = parseFloat(data.GHS.available) - parseFloat(data.GHS.orders);" with "assets = parseFloat(data.GHS.available);" it seems to work (the // is to mark that row as a comment)

But it would be better if somebody that works with the code examined it to see that that was the problem... I'm just guessing...

@levitt
Copy link

levitt commented Dec 4, 2013

hmm... Your logs show that

2013-12-04 14:23:07 (DEBUG): getting balance & fee from cex.io

you got pass the part that Im getting a error at. Hmm... Any idea whats wrong with mines?

@gm1972
Copy link
Author

gm1972 commented Dec 4, 2013

No idee, sorry.

@levitt
Copy link

levitt commented Dec 4, 2013

I have a question, for the username part

username: 0, // your username, only fill in when using bitstamp or cexio

I would fill it like this correct? This is what you did?

username: 1, // levitt, only fill in when using bitstamp or cexio

@gm1972
Copy link
Author

gm1972 commented Dec 4, 2013

username: 'username', // your username, only fill in when using bitstamp or cexio

@kuzetsa
Copy link
Contributor

kuzetsa commented Dec 4, 2013

I'm trying to come up with a bugfix for this issue right now

... My planned patches to the handling of cexio exchange should also have the added benefit of the gekko portfolio manager code having a more current BTC balance (as a result of BTC withdraw, deposit, mining new coin with the GHS, etc.)

If anyone else is working on this code right now (like this week I mean) I'd love to know.

@levitt
Copy link

levitt commented Dec 4, 2013

Would your planned patches happen to fix my issue, #59 :(

@kuzetsa
Copy link
Contributor

kuzetsa commented Dec 4, 2013

@levitt I'm not sure?

I've never seen #59 or related issues with my own gekko installation, but I'll add leave a comment on that issue too since I have exactly one thought on the issue you're describing, but it doesn't relate to the behavior in this issue so it would be off-topic.

@Devouring
Copy link
Contributor

#84

i fixed now it should display the value even if there is no order

@askmike
Copy link
Owner

askmike commented Dec 24, 2013

A new version of Gekko (in development, need help testing) that holds a local database of all historical data. If you guys can help me test / figure it out we can have this version as soon as possible.

More info here.

@askmike askmike closed this as completed Jun 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants