<!-- https://developers.silktide.com/v1/presence/setup/get-markets | Presence / Setup -->

# List the markets the API key's user can see

`GET /v1/results/accounts/presence/markets`

Answers with each market's `marketId`, which other Presence queries take to read one market. It does not change, so read it once and keep it.

Someone who can see only some of the account's markets gets only those. [Presence](https://developers.silktide.com/v1/presence.md#which-market) says what a market is.

## Request

### Query parameters


## Response

Status `200`.

- `result` (object, required): The answer.
  - `markets` (list of objects, required): The markets. Empty when the account has not set up Presence, or the user can see none.
    - `marketId` (integer, required, at least 1): The market, as other Presence queries take it in `marketId`.
    - `name` (string, required): Its name.
    - `created` (integer, required): When it was created.
    - `updated` (integer, required): When it was last changed.
- `selector` (string, required): The query that answered, as its path: `/v1/results/scores`.
- `duration` (number, required): Seconds Silktide took to answer.

## Errors

| Status | Type | When |
| --- | --- | --- |
| 200 | `EditionNotAvailable` | The account does not have Silktide 5. Its `status` is `403`. The body is an error despite the status. |
| 401 | `NotLoggedIn` | No API key was sent, or it is not a key for this region. |
| 429 | `TooManyRequests` | Too many requests to this path in five seconds. Retry after the number of seconds in the `Retry-After` header, which `properties.retryAfter` repeats. |
| 503 | - | Silktide is busy. Retry after the number of seconds in the `Retry-After` header. |

## Access

- Permission: Can see this market
- Plan feature: none
- Edition: Silktide 5 only
- Cost: free
- Stability: stable, since 1.2.0

## Example: Every market

```bash
curl "https://api.eu.silktide.com/v1/results/accounts/presence/markets" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY"
```

Response:

```json
{
  "result": {
    "markets": [
      {
        "marketId": 3,
        "name": "United States",
        "created": 1790000000,
        "updated": 1793610000
      },
      {
        "marketId": 5,
        "name": "France",
        "created": 1790000000,
        "updated": 1793610000
      }
    ]
  },
  "selector": "/v1/results/accounts/presence/markets",
  "duration": 0.01
}
```
