# Betfair Exchange

> Read Betfair Exchange sports, events, markets, and prices.

App · 9 actions. Web page: https://docs.lodol.com/docs/integrations/betfair-exchange

## Actions

### Get market prices

Read market status and best available Exchange offers for up to ten market IDs.

**Inputs**

- Market IDS (`market_ids`, list, required): Market IDS.

**Outputs**

- `data` (list): The response from Betfair Exchange.

**Example output**

```json
{
  "data": [
    {
      "inplay": true,
      "marketId": "example",
      "runners": [
        {}
      ],
      "status": "example"
    }
  ]
}
```

### List competitions

Find Betfair Exchange competitions using market filters.

**Inputs**

- Event type IDS (`event_type_ids`, list): Event type IDS.
- Event IDS (`event_ids`, list): Event IDS.
- Market IDS (`market_ids`, list): Market IDS.
- Market types (`market_types`, list): Market types.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- In play (`in_play`, true/false): In play.

**Outputs**

- `data` (list): The response from Betfair Exchange.

**Example output**

```json
{
  "data": [
    {
      "competition": {
        "id": "example",
        "name": "example"
      },
      "marketCount": 1
    }
  ]
}
```

### List countries

Find Betfair Exchange countries using market filters.

**Inputs**

- Event type IDS (`event_type_ids`, list): Event type IDS.
- Event IDS (`event_ids`, list): Event IDS.
- Market IDS (`market_ids`, list): Market IDS.
- Market types (`market_types`, list): Market types.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- In play (`in_play`, true/false): In play.

**Outputs**

- `data` (list): The response from Betfair Exchange.

**Example output**

```json
{
  "data": [
    {
      "countryCode": "example",
      "marketCount": 1
    }
  ]
}
```

### List event types

Find Betfair Exchange event types using market filters.

**Inputs**

- Event type IDS (`event_type_ids`, list): Event type IDS.
- Event IDS (`event_ids`, list): Event IDS.
- Market IDS (`market_ids`, list): Market IDS.
- Market types (`market_types`, list): Market types.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- In play (`in_play`, true/false): In play.

**Outputs**

- `data` (list): The response from Betfair Exchange.

**Example output**

```json
{
  "data": [
    {
      "eventType": {
        "id": "example",
        "name": "example"
      },
      "marketCount": 1
    }
  ]
}
```

### List events

Find Betfair Exchange events using market filters.

**Inputs**

- Event type IDS (`event_type_ids`, list): Event type IDS.
- Event IDS (`event_ids`, list): Event IDS.
- Market IDS (`market_ids`, list): Market IDS.
- Market types (`market_types`, list): Market types.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- In play (`in_play`, true/false): In play.

**Outputs**

- `data` (list): The response from Betfair Exchange.

**Example output**

```json
{
  "data": [
    {
      "event": {
        "countryCode": "example",
        "id": "example",
        "name": "example",
        "openDate": "example"
      },
      "marketCount": 1
    }
  ]
}
```

### List market types

Find Betfair Exchange market types using market filters.

**Inputs**

- Event type IDS (`event_type_ids`, list): Event type IDS.
- Event IDS (`event_ids`, list): Event IDS.
- Market IDS (`market_ids`, list): Market IDS.
- Market types (`market_types`, list): Market types.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- In play (`in_play`, true/false): In play.

**Outputs**

- `data` (list): The response from Betfair Exchange.

**Example output**

```json
{
  "data": [
    {
      "marketCount": 1,
      "marketType": "example"
    }
  ]
}
```

### List markets

Find Exchange markets and their scheduled start times.

**Inputs**

- Event type IDS (`event_type_ids`, list): Event type IDS.
- Event IDS (`event_ids`, list): Event IDS.
- Market IDS (`market_ids`, list): Market IDS.
- Market types (`market_types`, list): Market types.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- In play (`in_play`, true/false): In play.
- Max results (`max_results`, number, required): Max results. From 1 to 1000.
- Sort (`sort`, text): Sort. One of: `MINIMUM_TRADED` (Minimum traded), `MAXIMUM_TRADED` (Maximum traded), `MINIMUM_AVAILABLE` (Minimum available), `MAXIMUM_AVAILABLE` (Maximum available), `FIRST_TO_START` (First to start), `LAST_TO_START` (Last to start).

**Outputs**

- `data` (list): The response from Betfair Exchange.

**Example output**

```json
{
  "data": [
    {
      "marketId": "example",
      "marketName": "example",
      "marketStartTime": "example"
    }
  ]
}
```

### List time ranges

Find Betfair Exchange time ranges using market filters.

**Inputs**

- Event type IDS (`event_type_ids`, list): Event type IDS.
- Event IDS (`event_ids`, list): Event IDS.
- Market IDS (`market_ids`, list): Market IDS.
- Market types (`market_types`, list): Market types.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- In play (`in_play`, true/false): In play.
- Granularity (`granularity`, text, required): Granularity. One of: `DAYS`, `HOURS`, `MINUTES`.

**Outputs**

- `data` (list): The response from Betfair Exchange.

**Example output**

```json
{
  "data": [
    {
      "marketCount": 1,
      "timeRange": {
        "from": "example",
        "to": "example"
      }
    }
  ]
}
```

### List venues

Find Betfair Exchange venues using market filters.

**Inputs**

- Event type IDS (`event_type_ids`, list): Event type IDS.
- Event IDS (`event_ids`, list): Event IDS.
- Market IDS (`market_ids`, list): Market IDS.
- Market types (`market_types`, list): Market types.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- In play (`in_play`, true/false): In play.

**Outputs**

- `data` (list): The response from Betfair Exchange.

**Example output**

```json
{
  "data": [
    {
      "marketCount": 1,
      "venue": "example"
    }
  ]
}
```
