Skip to main content

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

FieldTypeRequiredDescription
namestringYesHuman-readable dealer name
baseCurrenciesstring[]YesBase currencies the dealer settles in (e.g., ["USDT", "USDC"])
riskThresholdstringNoRisk threshold in USD equivalent (decimal string)
configobjectNoAdditional dealer configuration (spreads, fees, etc.)

Response

Returns the created dealer object.

FieldTypeDescription
dealerAccountIdstringDealer account ID (same as tradingAccountId)
namestringDealer name
statusstringDealer status (ACTIVE)
baseCurrenciesstring[]Base currencies
riskThresholdstringRisk threshold in USD
linkedAccountIdsarrayLinked exchange accounts (empty on creation)
configobjectAdditional configuration
createdAtintegerCreation timestamp (milliseconds)
updatedAtintegerLast 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 CodeErrorDescription
400Invalid requestMissing or invalid parameters
401UnauthorizedInvalid or expired access token
403ForbiddenRequires 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.link before the dealer can generate quotes
  • The dealerAccountId is the same as the tradingAccountId in the core system
  • A dealer wallet (dealer:{dealerAccountId}) is automatically provisioned in the Formance Ledger