Skip to main content
GET
/
markets
Fetch markets
curl --request GET \
  --url https://sandbox.api.btdx.io/markets \
  --header 'authorization: <authorization>'
{
  "_meta": {
    "_count": 123,
    "_page": {
      "_pageNumber": 123,
      "_pageSize": 123,
      "_totalElements": 123,
      "_totalPages": 123
    }
  },
  "markets": [
    {
      "id": "<string>",
      "ownerAppId": "<string>",
      "event": {
        "_ref": "<string>",
        "_ids": [
          "<string>"
        ]
      },
      "name": "<string>",
      "marketType": {
        "_ref": "<string>",
        "_ids": [
          "<string>"
        ]
      },
      "marketValue": "<string>",
      "marketDiscriminator": "<string>",
      "currencyId": "<string>",
      "inPlayDelay": 123,
      "crossMatchingEnabled": true,
      "published": true,
      "suspended": true,
      "lockAt": "2023-11-07T05:31:56Z",
      "settledAt": "2023-11-07T05:31:56Z",
      "marketOutcomes": {
        "_ref": "<string>",
        "_ids": [
          "<string>"
        ]
      },
      "externalReferences": {
        "_ref": "<string>",
        "_ids": [
          "<string>"
        ]
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "modifiedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "marketTypes": [
    {
      "id": "<string>",
      "outcomesRange": {
        "min": 123,
        "max": 123
      },
      "winnersRange": {
        "min": 123,
        "max": 123
      }
    }
  ],
  "marketOutcomes": [
    {
      "id": "<string>",
      "title": "<string>",
      "ordering": 123,
      "winner": true,
      "participant": {
        "_ref": "<string>",
        "_ids": [
          "<string>"
        ]
      }
    }
  ],
  "events": [
    {
      "id": "<string>",
      "eventGroup": {
        "_ref": "<string>",
        "_ids": [
          "<string>"
        ]
      },
      "name": "<string>",
      "code": "<string>",
      "expectedStartTime": "2023-11-07T05:31:56Z",
      "active": true
    }
  ],
  "eventGroups": [
    {
      "id": "<string>",
      "name": "<string>",
      "subcategory": {
        "_ref": "<string>",
        "_ids": [
          "<string>"
        ]
      }
    }
  ],
  "subcategories": [
    {
      "id": "<string>",
      "name": "<string>",
      "category": {
        "_ref": "<string>",
        "_ids": [
          "<string>"
        ]
      }
    }
  ],
  "categories": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "externalReferences": [
    {
      "id": 123,
      "source": "<string>",
      "externalReference": "<string>"
    }
  ],
  "participants": [
    {
      "id": "<string>",
      "code": "<string>",
      "name": "<string>",
      "active": true
    }
  ]
}

Headers

authorization
string
required

Header with the accessToken for the current session

Query Parameters

ids
string[]

Optional list of specific IDs to fetch

ownerAppIds
string[]

Optional list of app IDs to filter results by

eventIds
string[]

Optional list of event IDs to filter results by

marketTypeIds
string[]

Optional list of market type IDs to filter results by

currencyIds
string[]

Optional list of currency IDs to filter results by

statuses
enum<string>[]

Optional list of market statuses to filter results by

Available options:
Initializing,
Open,
Locking,
Locked,
Settling,
Settled,
Voiding,
Voided,
Closed
inPlayStatuses
enum<string>[]

Whether the markets are currently in-play or not. Returns all if not set

Available options:
NotApplicable,
PrePlay,
InPlay
fromDateTime
string<date-time>

The inclusive beginning of a date-time range filter. If not provided, no restriction will be applied to the beginning of the range

toDateTime
string<date-time>

The exclusive end of a date-time range filter. If not provided, no restriction will be applied to the end of the range

published
boolean

Optional filter as to whether the market is published or not

page
integer
default:0

Zero-based page index (0..N)

size
integer
default:20

The size of the page to be returned

sort
string[]

Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Response

OK

_meta
object
markets
object[]
marketTypes
object[]
marketOutcomes
object[]
events
object[]
eventGroups
object[]
subcategories
object[]
categories
object[]
externalReferences
object[]
participants
object[]