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

Insight prediction API produces an error when ordering markets by is_resolved #94

Open
NunoSempere opened this issue Jul 28, 2022 · 1 comment

Comments

@NunoSempere
Copy link
Collaborator

What I was expecting

From the documentation, I was expecting the following to work

INSIGHT_BEARER='abcdxyz123'
 curl --request GET --get "https://insightprediction.com/api/markets?orderBy=is_resolved&sortedBy=desc" --header "Authorization: Bearer $INSIGHT_BEARER" --header "Content-Type: application/json" --header "Accept: application/json"

I was also expecting something like

INSIGHT_BEARER='abcdxyz123'
 curl --request GET --get "https://insightprediction.com/api/markets?page=2&orderBy=is_resolved&sortedBy=desc" --header "Authorization: Bearer $INSIGHT_BEARER" --header "Content-Type: application/json" --header "Accept: application/json"

to work.

What I got instead

Neither request does work. In curl, they return a

{
    "message": "Server Error"
}

(in node, this is a "Error: Request failed with status code 500")

What does work

The following does work:

INSIGHT_BEARER='abcdxyz123'
 curl --request GET --get "https://insightprediction.com/api/markets?page=2" --header "Authorization: Bearer $INSIGHT_BEARER" --header "Content-Type: application/json" --header "Accept: application/json"

but doesn't return results ordered by is_resolved.

NunoSempere added a commit that referenced this issue Jul 28, 2022
Note that the fetcher is subject to this bug:
<#94>

which means that it'll hit insight pretty hard.
@NunoSempere
Copy link
Collaborator Author

Resolved now as the Insight prediction API has been updated.

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

1 participant