Stork
GitHubXStork
  • INTRODUCTION
    • Welcome to Stork
    • Core Concepts
    • How It Works
    • Products
  • Getting Started
    • Becoming a Publisher
    • Becoming a Subscriber
    • Putting Data On-Chain
    • Accessing Data On-Chain
  • API Reference
    • Websocket API
      • Publisher
      • Subscriber
    • REST API
    • Contract APIs
      • EVM
      • Solana / SVM
      • Sui
      • Aptos
      • CosmWasm
    • Chain Pusher Configs
      • Asset Config YAML
    • Publisher Agent Configs
      • Config JSON
      • Keys JSON
  • Resources
    • Asset ID Registry
    • Contract Addresses
      • EVM
      • Solana / SVM
      • Sui
      • Aptos
      • CosmWasm
    • Adapters
    • Public Keys
    • FAQ
Powered by GitBook
On this page
  • Who Can Become a Subscriber?
  • Using Data Off-Chain
  • Using Data On-Chain
Edit on GitHub
  1. Getting Started

Becoming a Subscriber

Consuming data from Stork.

PreviousBecoming a PublisherNextPutting Data On-Chain

Last updated 16 days ago

Subscribers on Stork are the consumers of Stork aggregated data.

Who Can Become a Subscriber?

Anyone who has a need for high-frequency, high-accuracy, low-latency data can become a Subscriber. Storks data feeds are measurably faster, more efficient and more stable than contemporary oracles.

Using Data Off-Chain

Using data off-chain is as simple as listening to the or hitting its , and then using the update data in your application. Both APIs respond with JSON messages that have a top level field called data with the following structure:

{
    "data": [
        "<plain-text asset id>": {
            "timestamp": <unix timestamp>,
            "asset_id": "<plain-text asset id>,
            "signature_type": "<signature type - evm | stark>",
            "trigger": "<trigger>",
            "price": "<price multiplied by 10^18>",
            "stork_signed_price": {
                "public_key": "<stork aggregator public key>",
                "encoded_asset_id": "<keccak256 encoded asset id>",
                "price": "<price multiplied by 10^18>",
                "timestamped_signature": {
                    "signature": {
                        "r": "<r component of ECDSA secp256k1 signature>",
                        "s": "<r component of ECDSA secp256k1 signature>",
                        "v": "<s component of ECDSA secp256k1 signature"
                    },
                    "timestamp": <unix timestamp>,
                    "msg_hash": "keccak256 message hash"
                },
                "publisher_merkle_root": "<publisher merkle root",
                "calculation_alg": {
                    "type": "<aggregation function name>",
                    "version": "<aggregation function version",
                    "checksum": "<checksum for aggregation function>"
                }
            },
            "signed_prices": [
                {
                    "publisher_key": "<publishers public key>",
                    "external_asset_id": "<plain-text asset id",
                    "signature_type": "<signature type - evm | stark>",
                    "price": "price multiplied by 10^18",
                    "timestamped_signature": {
                        "signature": {
                            "r": "<r component of ECDSA secp256k1 signature>",
                            "s": "<r component of ECDSA secp256k1 signature>",
                            "v": "<s component of ECDSA secp256k1 signature"
                        },
                        "timestamp": <unix timestamp>,
                        "msg_hash": "<keccak256 message hash>"
                    }
                },
                ...
            ]
        }
    }
}

Using Data On-Chain

For information on putting data on-chain and accessing it from your smart-contract, see the following sections:

Interested in becoming a Subscriber? Contact Stork Labs! Email: Twitter:

Putting Data On-Chain
Accessing Data On-Chain
sales@stork.network
@StorkOracle
websocket
REST API
Aggregator