Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

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

@NunoSempere

Description

@NunoSempere

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions