Pular para o conteúdo principal
GET
/
markets
/
public
/
list
Listar mercados
curl --request GET \
  --url https://api.n2.market/api/v1/markets/public/list \
  --header 'X-API-Key: <api-key>'
{
  "markets": [
    {
      "id": "0336c14f-5a39-47c1-a88d-beee2e38163a",
      "questions": {
        "pt": "Quem ganhará a eleição?",
        "en": "Who will win the election?",
        "es": "¿Quién ganará la elección?"
      },
      "outcomes": [
        {
          "id": "yes",
          "text": {
            "pt": "Sim",
            "en": "Yes",
            "es": "Sí"
          },
          "odd": 1.67,
          "probability": 0.6
        },
        {
          "id": "no",
          "text": {
            "pt": "Não",
            "en": "No",
            "es": "No"
          },
          "odd": 2.5,
          "probability": 0.4
        }
      ],
      "descriptions": {
        "pt": "Mercado sobre a eleição presidencial",
        "en": "Market about the presidential election",
        "es": "Mercado sobre la elección presidencial"
      },
      "status": "ACTIVE",
      "logo": "https://cdn.n2.market/markets/election.png",
      "categories": [
        {
          "id": "cat-123",
          "name": "Politics",
          "slug": "politics"
        }
      ]
    }
  ],
  "total": 150,
  "limit": 20,
  "offset": 0
}

Autorizações

X-API-Key
string
header
obrigatório

API Key for authentication. Get your key from the dashboard.

Parâmetros de consulta

highlighted
boolean

Filtrar por destacados. true devuelve solo mercados destacados, false devuelve solo mercados no destacados.

categoryIds
string

Lista separada por comas de UUIDs de categorías para filtrar los resultados.

limit
integer
padrão:20

Número máximo de mercados a devolver

Intervalo obrigatório: x >= 1
offset
integer
padrão:0

Cantidad de mercados a omitir para la paginación

Intervalo obrigatório: x >= 0

Resposta

200 - application/json

Lista de mercados obtenida correctamente

Respuesta paginada de mercados

markets
object[]
total
integer

Total number of markets matching the filters

limit
integer

Number of markets returned

offset
integer

Offset used for pagination