Bring your own oracle access#
Native markets use Pyth Pull updates verified by the on-chain Receiver. Mirror markets use signed results from the witnesses configured for the deployment.
Native Pyth markets#
Use a personal Pyth Hermes key to create a market or capture its end snapshot. Creation uses a recent update. An end snapshot uses the first update whose predecessor was published before the market's on-chain end time. Resolution after a valid snapshot and timeout expiry use chain state and require no Hermes call.
In web and mobile, open Settings → Oracle keys. The app probes the key
before saving it on the device. The browser vault uses IndexedDB with AES-GCM
and a non-extractable key. Android stores the credential with
WHEN_UNLOCKED_THIS_DEVICE_ONLY.
Deployments with keeper routes disabled use the personal-key path for new
markets, including wallets with a saved keeper preference.
The CLI reads PYTH_API_KEY_FILE or PYTH_API_KEY. The Rust and Python SDKs
accept a caller-supplied key and build unsigned posting and rent-recovery
transactions for the Pyth Receiver. See the
Rust SDK (unavailable reference)
and Python SDK (unavailable reference).
Use the finalized lifecycle reader to see whether the market needs an end snapshot, resolution with the stored price, or timeout expiry. It reads the market, live expiry configuration and Clock in one RPC request. The reader itself needs only a known market address and Solana RPC. See the TypeScript example (unavailable reference), Rust example (unavailable reference) and Python example (unavailable reference).
Authenticated calls send the key as an Authorization: Bearer header to one
of the allowed HTTPS hosts: hermes.pyth.network, hermes-beta.pyth.network,
or pyth.dourolabs.app. Requests stop at redirects. The apps read the saved
secret at action time and scrub registered secrets from logs and error reports.
Same-origin browser scripts can access the vault while the page is open, so
the integrity of the app and its dependencies matters.
Signed-source mirror markets#
Use the source runner (unavailable reference) with the witnesses and threshold configured in the deployment. The runner builds and retains the signed statement and the evidence required for independent review. The app or CLI submits the signed result. The on-chain program checks the signatures against the registry and binds the statement to the specific market and operation.
Kalshi and Polymarket V2 use public source responses. In an OpticOdds qualification environment, supply the provider key to the runner through the requester's private credential file. The requester sends it over the attested, encrypted channel to the witness making the provider request. Live OpticOdds operation requires provider access, an approved witness measurement, and an admitted profile policy.
Permissionless finalization after review, expiry after the evidence deadline, and eligible account cleanup use chain state. For setup and operation, see the independent stack guide.
Device verification#
Verify that saved keys stay locked before first unlock and are removed by Forget. During key validation and a native market action, check that the credential appears only in the HTTPS bearer header sent to the configured Hermes host.