Update Oracle
Replaces the editable fields of a price oracle; its id and created_at are kept. Send the whole record, as on Create Oracle.
The auth secret is never returned, so a client that round-trips a record has none to send. That is why connection.auth.secret behaves differently from the other fields:
- omitted or
nullkeeps the stored secret; - a string replaces it;
auth.type: "NONE"drops it.
A stored secret is only sent to the origin (scheme, host and port) it was saved for. An update that points connection.url at another origin while keeping the stored secret is refused with 10015 naming connection.auth.secret: send the secret again.
Required permission: oracle:update
Request
PUT /v2/admin/oracles/{oracle_id}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
oracle_id | string | path | Required. Oracle id (24-character hex) |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Content-Type | Required. application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
category_id | string | Yes | Category the oracle belongs to (24-character hex id). It is not checked to exist |
type | string | Yes | Source type: TEFAS, TOGG or SHEET |
name | string | Yes | Oracle name |
description | string | No | Description. Omitted clears it |
fiat_currency | string | Yes | ISO 4217 code of the currency the source prices in (e.g. TRY) |
codes | array | No | The full list of series; replaces the stored one. Omitted clears it |
codes[].code | string | Yes | Code the source knows the series by |
codes[].name | string | Yes | Display name of the series |
codes[].description | string | No | Description of the series |
connection | object | Yes | Where the oracle reads from |
connection.url | string | Yes | Base URL of the source, starting with http:// or https:// |
connection.timeout | integer | No | Request timeout in seconds, 0–300. 0 means the default (30) |
connection.cache_ttl_seconds | integer | No | Source document cache window within one server process, 0–86400. 0 disables it |
connection.auth.type | string | No | NONE, BEARER, API_KEY, BASIC or QUERY_PARAM. Omitted means NONE |
connection.auth.name | string | Conditional | Header or query parameter name. Required for API_KEY and QUERY_PARAM |
connection.auth.username | string | Conditional | Required for BASIC |
connection.auth.secret | string | null | No | Omitted or null keeps the stored secret; a string replaces it |
connection.headers | array | No | Static headers, stored and returned in clear text |
connection.headers[].name | string | Yes | Header name |
connection.headers[].value | string | No | Header value |
summary_cache_ttl_seconds | integer | No | Summary cache window, 0–2592000 seconds. 0 means the platform default |
Example
curl --request PUT \
--url '{{baseUrl}}/v2/admin/oracles/677ed6e3cc111aea14a3dfc3' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"category_id": "677ed6e3cc111aea14a3dfb4",
"type": "TEFAS",
"name": "Gümüş Fonu",
"description": "TEFAS Gümüş Fonu",
"fiat_currency": "TRY",
"codes": [
{ "code": "IOG", "name": "Gümüş Fonu" },
{ "code": "GTZ", "name": "Gümüş Fonu" }
],
"connection": {
"url": "https://tefas-api.p.rapidapi.com",
"timeout": 30,
"cache_ttl_seconds": 0,
"auth": { "type": "API_KEY", "name": "x-rapidapi-key", "secret": null },
"headers": [
{ "name": "x-rapidapi-host", "value": "tefas-api.p.rapidapi.com" }
]
},
"summary_cache_ttl_seconds": 3600
}'
Response
200 OK with the updated oracle, in the shape described on Get Oracle.
{
"id": "677ed6e3cc111aea14a3dfc3",
"category_id": "677ed6e3cc111aea14a3dfb4",
"type": "TEFAS",
"name": "Gümüş Fonu",
"description": "TEFAS Gümüş Fonu",
"integration": {
"codes": [
{ "code": "IOG", "name": "Gümüş Fonu" },
{ "code": "GTZ", "name": "Gümüş Fonu" }
],
"fiat_currency": "TRY",
"connection": {
"url": "https://tefas-api.p.rapidapi.com",
"timeout": 30,
"cache_ttl_seconds": 0,
"auth": {
"type": "API_KEY",
"name": "x-rapidapi-key",
"username": "",
"secret_set": true
},
"headers": [
{ "name": "x-rapidapi-host", "value": "tefas-api.p.rapidapi.com" }
]
},
"summary_cache_ttl_seconds": 3600,
"default_summary_cache_ttl_seconds": 43200
},
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2026-11-09T10:31:47.902Z"
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10015 | Validation failed — see details. Also returned, naming connection.auth.secret, when the URL moves to another origin while the stored secret would be kept |
| 400 | 10000 | oracle_id is not a valid 24-character hex id |
| 400 | 10001 | Oracle not found or deleted (domain 5) |
| 400 | -1 | The connection is incomplete: the URL does not start with http:// or https://, or the auth scheme is missing its name, username or secret |
See Errors for the error format and common codes.