Skip to content
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

OrderService.getAllFills fails due to API change - Requests without either order_id or product_id will be rejected after 8/23/18. #58

Closed
onyxcoyote opened this issue Dec 16, 2018 · 2 comments

Comments

@onyxcoyote
Copy link
Contributor

error message:
ERROR - GET request Failed for '/fills': {"message":"query must contained either product_id or order_id"}

information on the change
https://docs.pro.coinbase.com/#fills

@onyxcoyote
Copy link
Contributor Author

onyxcoyote commented Dec 16, 2018

It's not fully baked yet, but something like this seems to work:

public class OrderService {

    public List<Fill> getFillByProductId(FillQuery fillQuery, int resultLimit) {
        return exchange.getAsList(FILLS_ENDPOINT + "?product_id=" + fillQuery.getProduct_id()+"&limit="+resultLimit, new ParameterizedTypeReference<Fill[]>(){});
    }
    
    public List<Fill> getFillByOrderId(FillQuery fillQuery, int resultLimit) {
        return exchange.getAsList(FILLS_ENDPOINT + "?order_id=" + fillQuery.getOrder_id()+"&limit="+resultLimit, new ParameterizedTypeReference<Fill[]>(){});
    }

onyxcoyote pushed a commit to onyxcoyote/gdax-java that referenced this issue Dec 24, 2018
onyxcoyote pushed a commit to onyxcoyote/gdax-java that referenced this issue Dec 24, 2018
onyxcoyote pushed a commit to onyxcoyote/gdax-java that referenced this issue Feb 9, 2019
robevansuk pushed a commit that referenced this issue Mar 30, 2019
…tFill API change (#57)

* fix issue #55 missing User-Agent header in API calls

* fix issue #58 (getFill API change)

* clean up fillById test and rename test method
@irufus
Copy link
Owner

irufus commented Jun 7, 2019

Looks like this issue was addressed in your PR that was merged.

@irufus irufus closed this as completed Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants