Upsert Spot Quote Provider
Creates or updates a spot quote provider's configuration. Saving never changes which provider is active: a new provider is created inactive, and an existing one keeps its is_active. Use Activate Spot Quote Provider to switch.
api_key is nullable on purpose. You cannot read the key back, so a save that leaves it out must not erase it:
- omitted or
nullkeeps the stored key; ""clears it;- any other string replaces it.
base_url, timeout and cache_ttl_seconds are always written as sent.
A stored key is only sent to the endpoint it was saved for. Changing base_url to another origin (including switching between an empty base_url, the vendor's own endpoint, and a typed one) while keeping the stored key is refused with 10015 naming api_key: send the key again.
Platform owner only. The caller's node must be the platform root node; any other caller is refused with 403 / 10005.
Required permission: spot-quote-provider:update
Request
PUT /v2/admin/spot-quote-providers/{provider}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
provider | string | path | Required. Provider key: cryptocompare or coinmarketcap |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Content-Type | Required. application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | null | No | Vendor API key. null keeps the stored key, "" clears it |
base_url | string | No | API base URL. Empty means the vendor's own endpoint |
timeout | integer | No | Request timeout in seconds, 0 or greater |
cache_ttl_seconds | integer | No | How long fetched quotes are cached, 0 or greater. 0 means the provider client's default |
Example
curl --request PUT \
--url '{{baseUrl}}/v2/admin/spot-quote-providers/coinmarketcap' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"api_key": "<coinmarketcap_api_key>",
"base_url": "https://pro-api.coinmarketcap.com",
"timeout": 30,
"cache_ttl_seconds": 3600
}'
Response
200 OK with the saved provider, masked as on List Spot Quote Providers.
{
"provider": "coinmarketcap",
"base_url": "https://pro-api.coinmarketcap.com",
"timeout": 30,
"cache_ttl_seconds": 3600,
"is_active": false,
"effective_active": false,
"api_key_set": true,
"api_key_last4": "b41d",
"configured": true,
"created_at": "2026-11-09T11:20:44.905Z",
"updated_at": "2026-11-09T11:20:44.905Z"
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10015 | Validation failed (negative timeout or cache_ttl_seconds), unsupported provider key, or (with details naming api_key) a stored key that would move to a new endpoint |
| 403 | 10005 | The caller is not the platform owner (domain 2) |
See Errors for the error format and common codes.