Publisher
Publishing data to a Stork Aggregator via WebSocket.
Base Endpoint
The standard endpoint for interacting with Stork via websocket is:
wss://api.jp.stork-oracle.network
Authentication
All websocket connection requests must include an Authorization
header with the value set as Basic <token>
. For example:
wscat -c 'wss://api.jp.stork-oracle.network/evm/publish' -H "Authorization: Basic fakeToken123"
Endpoints
/evm/publish
Publish signed data updates using EVM-compatible signatures.
Example:
wscat -c 'wss://api.jp.stork-oracle.network/evm/publish' -H "Authorization: Basic fakeToken123"
/stark/publish
Publish signed data updates using Stark-compatible signatures
Example:
wscat -c 'wss://api.jp.stork-oracle.network/stark/publish' -H "Authorization: Basic fakeToken123"
Messages
Publish Message
{
"type": "signed_prices",
"trace_id": string,
"data": {
string: {
"oracle_id": string,
"asset_id": string,
"trigger": string,
"signed_price": {
"publisher_key": string,
"external_asset_id": string,
"signature_type": string,
"price": string,
"timestamped_signature": {
"signature": {
"r": string,
"s": string,
"v": string
},
"timestamp": string,
"msg_hash": string
},
"metadata": object // optional
}
}
}
}
Description:
Publish signed price updates for one or more assets.
Fields:
"type"
: Type of the message. Always"signed_prices"
."trace_id"
: A unique identifier for debugging purposes."data"
: An object containing updates for each asset. Each key represents an asset ID, and the value is the signed price update:"oracle_id"
: ID of the oracle."asset_id"
: The asset being updated."trigger"
: The event triggering this update."signed_price"
:"publisher_key"
: The public key of the publisher."external_asset_id"
: The external representation of the asset ID."signature_type"
: Signature type (e.g.,evm
orstark
)."price"
: The updated price."timestamped_signature"
:"signature"
: The cryptographic signature of the update."r"
: R-component of the signature."s"
: S-component of the signature."v"
: V-component of the signature (only for EVM signatures).
"timestamp"
: Timestamp of the signed update."msg_hash"
: The hash of the message being signed.
"metadata"
: Any additional information related to the update. Optional.
Example:
Last updated