Skip to main content

Get Oracle Summary

Reads one series from a price oracle's source and returns what the tokenization form prefills from: the asset's name and ticker, its total value and the price of one token, both expressed in the platform's active currency token for the oracle's fiat_currency.

  • code is sent to the source as given. The oracle must have at least one code configured, but the requested code does not have to be one of them.
  • Descriptive fields prefer what the source publishes and fall back to the oracle record: name (the source's name or title, else the oracle's name), description, code (else the requested code) and symbol (the asset's own ticker, else the code).
  • The summary is cached per oracle and code for the oracle's summary_cache_ttl_seconds (default 12 hours). A cached summary is answered without reading the source again; drop it with Purge Oracle Cache.

Amounts are decimal strings; see Amounts and Percentages.

Required permission: oracle:view

Request​

GET /v2/admin/oracles/{oracle_id}/summary

Parameters​

NameTypeInDescription
oracle_idstringpathRequired. Oracle id (24-character hex)
codestringqueryRequired. Series code to read (e.g. a fund code)

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>

Example​

curl --request GET \
--url '{{baseUrl}}/v2/admin/oracles/677ed6e3cc111aea14a3dfc3/summary?code=IOG' \
--header 'Authorization: Bearer <access_token>'

Response​

{
"name": "İŞ PORTFÖY GÜMÜŞ SERBEST FON",
"symbol": "IOG",
"code": "IOG",
"description": "TEFAS Gümüş Fonu",
"total_value": {
"id": "68fe8c129367fd414b227c7a",
"amount": "9724632629.88",
"decimal": 6,
"symbol": "ISCN",
"address": "0x073c0196e516a0e77b1c804d1825fb1bad23895d"
},
"per_price": {
"id": "68fe8c129367fd414b227c7a",
"amount": "9.951079",
"decimal": 6,
"symbol": "ISCN",
"address": "0x073c0196e516a0e77b1c804d1825fb1bad23895d"
},
"total_supply": 977244083
}

Response Fields​

FieldTypeDescription
namestringAsset name; prefills the token name
symbolstringThe asset's own ticker; prefills the token symbol. Not the currency symbol
codestringSeries code
descriptionstringAsset description
total_valueobjectTotal value of the asset
total_value.idstringCurrency token id
total_value.amountstringTotal value, decimal string
total_value.decimalintegerDecimals of the currency token
total_value.symbolstringCurrency token symbol
total_value.addressstringCurrency token contract address (empty when it has none)
per_priceobjectPrice of one token, with the same fields as total_value
total_supplyintegerSupply the source reports for the series (its purchased_supply value)

Errors​

StatusCodeDescription
40010015code is missing — see details
40010000oracle_id is not a valid 24-character hex id
40010001Oracle not found or deleted (domain 5)
400-1The summary could not be built: the oracle has no codes configured, no active currency token exists for its fiat_currency, or the source did not return a usable total_value, token_price or purchased_supply for the code. message names which
50010000The source or a store could not be reached

See Errors for the error format and common codes.