Becoming a Subscriber

Consuming data from Stork.

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 Aggregator websocket or hitting it's REST API, 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: sales@stork.network Twitter: @StorkOracle

Last updated