Create Dealer
Create a new dealer account in the Fermata venue.
Endpoint
POST /api/v3/fermata/dealer/create
Description
Creates a new dealer account that acts as a principal trading counterparty. This provisions a Trading Account (venue=FERMATA), a dealer wallet in the Formance Ledger, and dealer-specific configuration (spreads, risk limits, base currencies).
Admin only.
Authentication
Requires Bearer token authentication with admin role.
Authorization: Bearer {access_token}
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable dealer name |
baseCurrencies | string[] | Yes | Base currencies the dealer settles in (e.g., ["USDT", "USDC"]) |
riskThreshold | string | No | Risk threshold in USD equivalent (decimal string) |
config | object | No | Additional dealer configuration (spreads, fees, etc.) |
Response
Returns the created dealer object.
| Field | Type | Description |
|---|---|---|
dealerAccountId | string | Dealer account ID (same as tradingAccountId) |
name | string | Dealer name |
status | string | Dealer status (ACTIVE) |
baseCurrencies | string[] | Base currencies |
riskThreshold | string | Risk threshold in USD |
linkedAccountIds | array | Linked exchange accounts (empty on creation) |
config | object | Additional configuration |
createdAt | integer | Creation timestamp (milliseconds) |
updatedAt | integer | Last update timestamp (milliseconds) |
Usage
import requests
headers = {"Authorization": f"Bearer {access_token}"}
response = requests.post(
"https://cadenza-api.algo724.com/api/v3/fermata/dealer/create",
headers=headers,
json={
"name": "Main Dealer",
"baseCurrencies": ["USDT", "USDC"],
"riskThreshold": "1000000"
}
)
dealer = response.json()["data"]
print(f"Dealer created: {dealer['dealerAccountId']}")
curl -X POST https://cadenza-api.algo724.com/api/v3/fermata/dealer/create \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{
"name": "Main Dealer",
"baseCurrencies": ["USDT", "USDC"],
"riskThreshold": "1000000"
}'
Example Response
{
"data": {
"dealerAccountId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Main Dealer",
"status": "ACTIVE",
"baseCurrencies": ["USDT", "USDC"],
"riskThreshold": "1000000",
"linkedAccountIds": [],
"config": {},
"createdAt": 1711929600000,
"createdAtDateTime": "2025-04-01T00:00:00.000Z",
"updatedAt": 1711929600000,
"updatedAtDateTime": "2025-04-01T00:00:00.000Z"
},
"success": true,
"errno": 0,
"error": null
}
Error Responses
| HTTP Code | Error | Description |
|---|---|---|
| 400 | Invalid request | Missing or invalid parameters |
| 401 | Unauthorized | Invalid or expired access token |
| 403 | Forbidden | Requires admin role |
Example Error
{
"data": null,
"success": false,
"errno": -130001,
"error": "baseCurrencies must contain at least one currency"
}
Notes
- Dealers are admin-only entities -- they are not created through the user connection flow
- After creation, link exchange accounts via
fermata.dealer.linkbefore the dealer can generate quotes - The
dealerAccountIdis the same as thetradingAccountIdin the core system - A dealer wallet (
dealer:{dealerAccountId}) is automatically provisioned in the Formance Ledger