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

# Create a Market Maker

> The endpoint below creates a new market maker for the exchange.

```json theme={null}
POST /exchange/market-makers
```

#### **Request**

* **Headers**:
  `Authorization:  YOUR_API_KEY`

* **Body** (required):

  * **Media Type**: `application/json`

```json theme={null}
{
  "business_id": "7da8e726-a1bc-11ee-80cf-560f156a658b",
  "contacts": [
    {
      "id": "7da8e726-a1bc-11ee-80cf-560f156a658b",
      "type": "user"
    }
  ],
  "swap_provider": true,
  "swap_weight": 50
}
```

### **Fields:**

* `business_id` (string, required): The ID of the business to be assigned as a market maker.

* `contacts `(array of objects, required): A list of associated contact users.

* `id `(string, required): Contact user ID.

* `type `(string, required): The type of contact (e.g., user).

* `swap_provider` (boolean, required): Indicates if the market maker provides swaps.

* `swap_weight` (integer, required): The weight or priority for the swap service (e.g., 0–100).

#### **Responses:**

**201 Created**

1. **Media Type**: `application/json`

2. **Sample Response**:

```json theme={null}
{
  "data": {
    "archived": false,
    "contacts": [
      {
        "email": "test@user.com",
        "id": "7da8e726-a1bc-11ee-80cf-560f156a658b",
        "name": "Test User",
        "type": "user"
      }
    ],
    "email": "anon@nymous.com",
    "entity": {
      "id": "6ebe0a0f-bb8f-49be-80ea-c6b72c348fea",
      "type": "business"
    },
    "id": "7da75a46-a1bc-11ee-9a32-560f156a658b",
    "name": "Anon Nymous",
    "swap_provider": false,
    "swap_weight": 0
  }
}

```

* **400 Bad Request**- Returned if the request contains invalid data.

* **403 Forbidden**- Returned if the user is not authorized to create a market maker.

* **422 Unprocessable Entity**- Returned if required fields are missing or invalid.
