Skip to main content
GET
/
markets
List markets
curl --request GET \
  --url https://api-testnet.context.markets/v2/markets
{
  "markets": [
    {
      "id": "<string>",
      "oracle": "<string>",
      "question": "<string>",
      "shortQuestion": "<string>",
      "outcomeTokens": [
        "<string>"
      ],
      "outcomePrices": [
        {
          "outcomeIndex": 123,
          "bestBid": 123,
          "bestAsk": 123,
          "spread": 123,
          "midPrice": 123,
          "lastPrice": 123,
          "currentPrice": 123
        }
      ],
      "creator": "<string>",
      "creatorProfile": {
        "username": "<string>",
        "avatarUrl": "<string>"
      },
      "blockTime": "<string>",
      "chainId": "<string>",
      "txHash": "<string>",
      "volume": "<string>",
      "volume24h": "<string>",
      "participantCount": 0,
      "executableAt": "<string>",
      "proposedAt": "<string>",
      "resolvedAt": "<string>",
      "payoutPcts": [
        123
      ],
      "resolutionStatus": "none",
      "metadata": {
        "mediaHash": "<string>",
        "startTime": 123,
        "endTime": 123,
        "criteria": "<string>",
        "slug": "<string>",
        "sourceAccounts": [
          {
            "platform": "<string>",
            "userId": "<string>",
            "username": "<string>",
            "displayName": "<string>",
            "profileImageUrl": "<string>"
          }
        ],
        "shortSummary": "<string>",
        "categories": [
          "<string>"
        ]
      },
      "resolutionCriteria": "<string>",
      "deadline": "2023-11-07T05:31:56Z",
      "status": "active",
      "createdAt": "2023-11-07T05:31:56Z",
      "outcome": 0,
      "contractAddress": "<string>"
    }
  ],
  "cursor": "<string>"
}

Query Parameters

sortBy
enum<string>
default:new

Sort order for the markets list

Available options:
volume,
trending,
new,
ending,
chance
sort
enum<string>
default:desc

Sort direction

Available options:
asc,
desc
limit
integer
default:50

Number of results per page

Required range: 1 <= x <= 50
cursor
string

Pagination cursor from a previous response

status
string

Comma-separated status filter (active, pending, resolved, closed)

resolutionStatus
string

Comma-separated resolution status filter (none, pending, resolved)

Search query to filter markets by question text

creator
string

Filter by creator address

category
string

Filter by category

visibility
enum<string>

Filter by market visibility

Available options:
visible,
hidden,
all
createdAfter
string<date-time>

Filter markets created after this ISO 8601 datetime

Response

Markets list

markets
object[]
required
cursor
string | null
required