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.