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

GDAX - Good Till Time - expire_time required #628

Closed
sniper7kills opened this issue Oct 13, 2017 · 13 comments
Closed

GDAX - Good Till Time - expire_time required #628

sniper7kills opened this issue Oct 13, 2017 · 13 comments

Comments

@sniper7kills
Copy link
Contributor

#596 appears to not include an expire_time variable in the request.

Error

@DeviaVir DeviaVir added the bug label Oct 13, 2017
@DeviaVir
Copy link
Owner

Please add this option to your conf.js:
https://github.com/carlos8f/zenbot/blob/master/conf-sample.js#L151
I will PR a default value.

@sniper7kills
Copy link
Contributor Author

sniper7kills commented Oct 13, 2017

I've still got the issue.

And I've pulled the the latest merge as well.

@DeviaVir DeviaVir reopened this Oct 13, 2017
@DeviaVir
Copy link
Owner

Okay, I have no clue. GDAX API (https://docs.gdax.com/) has no mention of expire_time, neither has gdax (npm) (https://github.com/coinbase/gdax-node/search?utf8=%E2%9C%93&q=expire_time&type=) ever heard of it.

@sniper7kills
Copy link
Contributor Author

OK, I agree with you that there is no expire_time variable. It must just be the error message that is thrown by GDAX.

It looks like the cancel_after just isn't being put into the order request. All I have is:

[ { price: '5687.00',
    size: '0.01758560',
    orig_size: '0.01758560',
    remaining_size: '0.01758560',
    orig_price: '5687.00',
    product_id: 'BTC-USD',
    post_only: true,
    time_in_force: 'GTT',
    side: 'buy' } ]

@sniper7kills
Copy link
Contributor Author

sniper7kills commented Oct 13, 2017

On a side note; doesn't cancel_after also need to be added at: https://github.com/carlos8f/zenbot/blob/master/lib/engine.js#L614 ?

@sniper7kills
Copy link
Contributor Author

Doing some troubleshooting, and I think I've found the issue, not that I know how to fix it.

I've modified /extensions/exchanges/gdax/exchange.js
GDAX Exchange.js

Which Returns
GDAX OPTIONS

So it looks like the cancel_after option isn't getting to gdax/exchannge.js

@nedievas
Copy link
Contributor

I think that cancel_after: so.cancel_after || 'day' should be in here: https://github.com/carlos8f/zenbot/blob/c97377889f8f8a5d142de597d8b839c92abe3275/lib/engine.js#L495

@sniper7kills
Copy link
Contributor Author

@nedievas Added that, but it still doesn't make it to gdax/exchange.js

@sniper7kills
Copy link
Contributor Author

@nedievas I added after https://github.com/carlos8f/zenbot/blob/master/lib/engine.js#L204
and it appears to have worked; as I didn't get an error this time but it also didn't place an order on gdax that I can see

@sniper7kills
Copy link
Contributor Author

sniper7kills commented Oct 13, 2017

Disregard that would be the fix. Needs to be added after line 204.

I have verified an order placed on GDAX.

@DeviaVir
Copy link
Owner

@sniper7kills thanks for the investigative and testing work on this one. Can you verify it's fixed now?

@sniper7kills
Copy link
Contributor Author

@DeviaVir no worries; and yes, testing now.

@sniper7kills
Copy link
Contributor Author

Buy and Sell orders are working as expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants