> ## Documentation Index
> Fetch the complete documentation index at: https://motiontrade.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with Market Motion in 5 minutes

## Base URL

All API requests go to:

```
https://api.marketmotion.xyz/api
```

## Your First Request

No API key needed to get started. Let's fetch an entity:

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.marketmotion.xyz/api/entities/patrick-mahomes"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.marketmotion.xyz/api/entities/patrick-mahomes');
  const data = await response.json();
  console.log(data.entity);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get('https://api.marketmotion.xyz/api/entities/patrick-mahomes')
  entity = response.json()['entity']
  print(entity)
  ```
</CodeGroup>

<Tip>
  Prefer the terminal? Install the [Market Motion CLI](/api/cli/installation) and run `motion entity patrick-mahomes` instead.
</Tip>

## Response

```json theme={null}
{
  "success": true,
  "entity": {
    "id": "uuid",
    "slug": "patrick-mahomes",
    "displayName": "Patrick Mahomes",
    "entityType": "person",
    "category": "sports",
    "subcategory": "nfl",
    "attributes": {
      "position": "Quarterback",
      "jersey_number": "15",
      "injury_status": "healthy"
    },
    "relationships": [
      {
        "role": "plays_for",
        "entity": {
          "slug": "kansas-city-chiefs",
          "displayName": "Kansas City Chiefs",
          "entityType": "team"
        }
      }
    ],
    "marketExposures": [
      {
        "role": "subject",
        "market": {
          "title": "Chiefs to win Super Bowl LIX",
          "venue": "polymarket"
        }
      }
    ]
  }
}
```

## What You Get

With a single API call, you receive:

| Field             | Description                                           |
| ----------------- | ----------------------------------------------------- |
| `attributes`      | Typed key-value data (injury status, position, etc.)  |
| `relationships`   | Connections to other entities (team, stadium, league) |
| `marketExposures` | All prediction markets involving this entity          |

## Search for Entities

Find entities by name:

```bash theme={null}
curl "https://api.marketmotion.xyz/api/entities?q=mahomes"
```

## List Markets

Get prediction markets with filtering:

```bash theme={null}
curl "https://api.marketmotion.xyz/api/markets/predictions?category=sports&venue=polymarket&limit=10"
```

## Get Relationship Graph

Visualize entity connections:

```bash theme={null}
curl "https://api.marketmotion.xyz/api/entities/patrick-mahomes/graph?depth=2"
```

Returns nodes and edges for graph visualization.

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Get an API key for higher rate limits
  </Card>

  <Card title="Core Concepts" icon="book" href="/concepts/entities">
    Understand entities, relationships, and markets
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/overview">
    Explore all endpoints
  </Card>

  <Card title="AI Trading Guide" icon="robot" href="/guides/ai-trading">
    Build AI trading systems with Market Motion
  </Card>
</CardGroup>
