EXTENDED DOCUMENTATION

Providers

Morpheus Oracle supports two provider modes:

  • Built-in providers — selected by
    text
    provider
    and configured per project in Supabase
  • Custom source requests — user-supplied
    text
    url
    , optional encrypted token/payload, and optional compute script

Current production architecture:

  • provider configuration and project defaults are resolved outside the TEE first when possible
  • the Oracle runtime executes only the confidential fetch or compute step
  • DataFeed publication uses the same provider registry model but a separate runtime lane

Built-in Providers

Current built-ins:

  • text
    twelvedata
  • text
    binance-spot
  • text
    coinbase-spot

Built-ins are intentionally raw:

  • no aggregation
  • no smoothing
  • no medianization
  • no extra normalization beyond provider-specific request formatting and response extraction

TwelveData

Required env:

  • text
    TWELVEDATA_API_KEY

Typical config:

json
{
  "symbol": "NEO-USD",
  "endpoint": "price",
  "interval": "1min"
}

Binance Spot

Required env:

  • none

Typical config:

json
{
  "pair": "NEO-USD",
  "symbol": "NEOUSDT",
  "base_url": "https://api1.binance.com"
}

Coinbase Spot

Required env:

  • none

Typical config:

json
{
  "symbol": "NEO-USD"
}

Provider Config Control Plane

Project-level provider configs are stored in

text
morpheus_provider_configs
.

Management endpoint:

  • text
    GET /api/provider-configs?project_slug=demo
  • text
    POST /api/provider-configs
  • text
    DELETE /api/provider-configs?project_slug=demo&provider_id=twelvedata

Recommended production protection:

  • set
    text
    MORPHEUS_PROVIDER_CONFIG_API_KEY
  • send it via
    text
    x-admin-api-key
    or
    text
    Authorization: Bearer ...

The dashboard includes a Provider Configs panel that can manage these records directly.

Request-Time Resolution

Both the web API layer and the Oracle runtime can resolve provider defaults from Supabase when

text
project_slug
and
text
provider
are present.

The web API layer resolves provider defaults before proxying to Phala:

  • text
    GET /api/feeds/:symbol?provider=twelvedata&project_slug=demo
  • text
    POST /api/oracle/query
    with
    text
    { "provider": "twelvedata", "project_slug": "demo" }
  • text
    POST /api/oracle/smart-fetch
    with the same fields

Resolution rules:

  • request-level
    text
    provider_params
    override stored project config keys
  • stored project config fills in missing provider defaults
  • disabled project providers are rejected before the request reaches Phala

Custom Source Requests

Users can bypass built-ins and send direct Oracle requests with:

  • text
    url
  • optional
    text
    encrypted_token
    or
    text
    encrypted_payload
  • optional
    text
    script
    or
    text
    script_base64

This supports three useful modes:

  • plain fetch — URL only
  • fetch + compute — URL plus script
  • private fetch + compute — URL plus encrypted payload plus script

PriceFeed Pair Catalog

Default built-in USD pairs now cover:

  • Core crypto:
    • text
      TWELVEDATA:NEO-USD
    • text
      TWELVEDATA:GAS-USD
    • text
      TWELVEDATA:FLM-USD
    • text
      TWELVEDATA:BTC-USD
    • text
      TWELVEDATA:ETH-USD
    • text
      TWELVEDATA:SOL-USD
    • text
      TWELVEDATA:TRX-USD
    • text
      TWELVEDATA:BNB-USD
    • text
      TWELVEDATA:XRP-USD
    • text
      TWELVEDATA:DOGE-USD
    • text
      TWELVEDATA:USDT-USD
    • text
      TWELVEDATA:USDC-USD
  • Commodity / hard-asset:
    • text
      TWELVEDATA:PAXG-USD
    • text
      TWELVEDATA:WTI-USD
    • text
      TWELVEDATA:BRENT-USD
    • text
      TWELVEDATA:NATGAS-USD
    • text
      TWELVEDATA:COPPER-USD
    • text
      TWELVEDATA:WHEAT-USD
    • text
      TWELVEDATA:CORN-USD
    • text
      TWELVEDATA:SOY-USD
  • Equities / ETFs:
    • text
      TWELVEDATA:AAPL-USD
    • text
      TWELVEDATA:GOOGL-USD
    • text
      TWELVEDATA:MSFT-USD
    • text
      TWELVEDATA:AMZN-USD
    • text
      TWELVEDATA:TSLA-USD
    • text
      TWELVEDATA:META-USD
    • text
      TWELVEDATA:NVDA-USD
    • text
      TWELVEDATA:SPY-USD
    • text
      TWELVEDATA:QQQ-USD
    • text
      TWELVEDATA:GLD-USD
  • FX:
    • text
      TWELVEDATA:EUR-USD
    • text
      TWELVEDATA:GBP-USD
    • text
      TWELVEDATA:JPY-USD
      (inverted from
      text
      USD/JPY
      )
    • text
      TWELVEDATA:CNY-USD
      (inverted from
      text
      USD/CNY
      )

Production sync defaults to

text
twelvedata
only. Other built-in providers remain available for Oracle fetch flows and project-specific overrides.

Inspect at runtime with:

  • text
    GET /api/feeds/catalog
  • or worker
    text
    GET /feeds/catalog

On-chain storage is provider-scoped, for example:

  • text
    TWELVEDATA:NEO-USD
  • text
    BINANCE-SPOT:NEO-USD

Canonical pair table

Use these names exactly in contracts, automation jobs, and documentation. The canonical key format is provider-scoped. For the current main catalog,

text
TWELVEDATA:<PAIR>
is the official storage key and user-facing key.

PairCategoryMeaningTwelveData symbolOn-chain unitNote
text
TWELVEDATA:NEO-USD
Cryptoprice of 1 NEO in USD
text
NEO/USD
text
1 NEO
text
TWELVEDATA:GAS-USD
Cryptoprice of 1 GAS in USD
text
GAS/USD
text
1 GAS
text
TWELVEDATA:FLM-USD
Cryptoprice of 1 FLM in USD
text
FLM/USD
text
1 FLM
direct pair under the global 1e6 USD scale
text
TWELVEDATA:BTC-USD
Cryptoprice of 1 BTC in USD
text
BTC/USD
text
1 BTC
text
TWELVEDATA:ETH-USD
Cryptoprice of 1 ETH in USD
text
ETH/USD
text
1 ETH
text
TWELVEDATA:SOL-USD
Cryptoprice of 1 SOL in USD
text
SOL/USD
text
1 SOL
text
TWELVEDATA:TRX-USD
Cryptoprice of 1 TRX in USD
text
TRX/USD
text
1 TRX
text
TWELVEDATA:PAXG-USD
Cryptoprice of 1 PAXG in USD
text
PAXG/USD
text
1 PAXG
gold-backed token
text
TWELVEDATA:USDT-USD
Cryptoprice of 1 USDT in USD
text
USDT/USD
text
1 USDT
text
TWELVEDATA:USDC-USD
Cryptoprice of 1 USDC in USD
text
USDC/USD
text
1 USDC
text
TWELVEDATA:BNB-USD
Cryptoprice of 1 BNB in USD
text
BNB/USD
text
1 BNB
text
TWELVEDATA:XRP-USD
Cryptoprice of 1 XRP in USD
text
XRP/USD
text
1 XRP
text
TWELVEDATA:DOGE-USD
Cryptoprice of 1 DOGE in USD
text
DOGE/USD
text
1 DOGE
text
TWELVEDATA:WTI-USD
CommodityWTI crude oil reference price in USD
text
WTI/USD
text
WTI reference unit
text
TWELVEDATA:BRENT-USD
CommodityBrent crude spot reference price in USD
text
XBR/USD
text
Brent spot reference unit
text
TWELVEDATA:NATGAS-USD
Commoditynatural gas reference price in USD
text
NG/USD
text
natural gas reference unit
text
TWELVEDATA:COPPER-USD
Commoditycopper futures proxy in USD
text
HG1
text
1 copper futures reference unit
front-month proxy
text
TWELVEDATA:WHEAT-USD
Commoditywheat futures proxy in USD
text
W_1
text
1 wheat futures reference unit
front-month proxy
text
TWELVEDATA:CORN-USD
Commoditycorn futures proxy in USD
text
C_1
text
1 corn futures reference unit
front-month proxy
text
TWELVEDATA:SOY-USD
Commoditysoybean futures proxy in USD
text
S_1
text
1 soybean futures reference unit
front-month proxy
text
TWELVEDATA:AAPL-USD
Equityprice of 1 AAPL share in USD
text
AAPL
text
1 share
text
TWELVEDATA:GOOGL-USD
Equityprice of 1 GOOGL share in USD
text
GOOGL
text
1 share
text
TWELVEDATA:MSFT-USD
Equityprice of 1 MSFT share in USD
text
MSFT
text
1 share
text
TWELVEDATA:AMZN-USD
Equityprice of 1 AMZN share in USD
text
AMZN
text
1 share
text
TWELVEDATA:TSLA-USD
Equityprice of 1 TSLA share in USD
text
TSLA
text
1 share
text
TWELVEDATA:META-USD
Equityprice of 1 META share in USD
text
META
text
1 share
text
TWELVEDATA:NVDA-USD
Equityprice of 1 NVDA share in USD
text
NVDA
text
1 share
text
SPY-USD
ETFprice of 1 SPY share in USD
text
SPY
text
1 ETF share
text
QQQ-USD
ETFprice of 1 QQQ share in USD
text
QQQ
text
1 ETF share
text
GLD-USD
ETFprice of 1 GLD share in USD
text
GLD
text
1 ETF share
text
EUR-USD
FXprice of 1 EUR in USD
text
EUR/USD
text
1 EUR
text
GBP-USD
FXprice of 1 GBP in USD
text
GBP/USD
text
1 GBP
text
TWELVEDATA:JPY-USD
FXprice of 1 JPY in USD
text
USD/JPY
text
1 JPY
fetched as
text
USD/JPY
, then inverted
text
CNY-USD
FXprice of 1 CNY in USD
text
USD/CNY
text
1 CNY
fetched as
text
USD/CNY
, then inverted

Selection Model

  • PriceFeed can use a built-in provider directly
  • Privacy Oracle can use either a built-in provider or a custom URL flow
  • Provider configs let each project pin defaults without hardcoding them into requests
CURRENT DESIGNUPDATED FOR DUAL-CVM ARCHITECTURE
Morpheus Oracle