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
Edit on GitHub
  1. API Reference

REST API

PreviousSubscriberNextContract APIs

Last updated 10 days ago

Real-Time and historical Data API for Stork signed data.

Authentication

All REST requests must include an Authorization header with the value set as Basic <token> . For example if your token is gmork123:

curl -x GET 'https://rest.jp.stork-oracle.network/v1/prices/assets' -H "Authorization: Basic gmork123"

Rate Limits

There is currently a universal rate limit of 5 requests/sec.

Need a higher rate limit? Reach out to Stork. or open.

Note

This tool is meant to illustrate the structure of REST api responses, but unfortunately due to third party limitations, some loss of precision on large numbers may be experienced in the browser. If you wish to test the verifiability of Stork prices from the REST api, we recommend using CURL to view the raw response.

sales@stork.network
Twitter DMs

List Available Assets

get

Get the list of available asset IDs.

Responses
200
OK
application/json
404
Not Found
get
GET /v1/prices/assets HTTP/1.1
Host: rest.jp.stork-oracle.network
Accept: */*
{
  "data": [
    "BTCUSD"
  ]
}

Get Latest Prices

get

Get latest real-time prices for specified assets.

Authorizations
Query parameters
assetsstringRequired

Comma-separated list of asset symbols (e.g. BTCUSD,ETHUSD)

Responses
200
OK
application/json
400
Bad Request
application/json
get
GET /v1/prices/latest HTTP/1.1
Host: rest.jp.stork-oracle.network
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "BTCUSD": {
      "timestamp": 1745436557621941000,
      "asset_id": "BTCUSD",
      "signature_type": "evm",
      "trigger": "unspecified",
      "price": "93034248063749982000000",
      "stork_signed_price": {
        "public_key": "0x3db9E960ECfCcb11969509FAB000c0c96DC51830",
        "encoded_asset_id": "0x7404e3d104ea7841c3d9e6fd20adfe99b4ad586bc08d8f3bd3afef894cf184de",
        "price": "93034248063749982000000",
        "timestamped_signature": {
          "signature": {
            "r": "0xb8e46bc91712ee9a1d5f163c4a25d6cbbf6660dc8e2dcdfafb19d89cdc87f3b3",
            "s": "0x69b91a8412e19f90f4cd34e800e34b3702cd93169994bf9d75b20029458bce93",
            "v": "0x1c"
          },
          "timestamp": 1745436557678933200,
          "msg_hash": "0xa71936d99252e6b430fbb0b82a86a90ee03ab21ab6cdb9b7ce7762f3b19082c1"
        },
        "publisher_merkle_root": "0xb85ded8bf6d17f5040fba3f92e4ea0cd4dd94ff96f88389ac997f2f869cfc7de",
        "calculation_alg": {
          "type": "median",
          "version": "v1",
          "checksum": "9be7e9f9ed459417d96112a7467bd0b27575a2c7847195c68f805b70ce1795ba"
        }
      },
      "signed_prices": [
        {
          "publisher_key": "0x60684C26449D2987F21Cf2E4D66716AE2B09Ea30",
          "external_asset_id": "BTCUSD",
          "signature_type": "evm",
          "price": "93034248063749982000000",
          "timestamped_signature": {
            "signature": {
              "r": "0xe5001b90d6dbba8a50cb0b842e2a4fbbc9ba778c5dd6eaf7e55656149adc2e94",
              "s": "0x2032f85009051f061fddfef527f316a4b29c4ff754016e083936a8ae87fecc36",
              "v": "0x1c"
            },
            "timestamp": 1745436557621941000,
            "msg_hash": "0xa749104b6864c0518ab4f4c6e3e09759f0620ae3895f9fea30fc618d1801f706"
          }
        },
        {
          "publisher_key": "0xdE54a40A841d0764966B89bBE5d71c5189122AA3",
          "external_asset_id": "BTCUSD",
          "signature_type": "evm",
          "price": "93034248063749982000000",
          "timestamped_signature": {
            "signature": {
              "r": "0xe33549245979112871b699f30199d7f6ffce0472e47561610ac91abbdd32d504",
              "s": "0x375d91724aa3741d34e305e135d695f39d33285669c1484978cd27e64f84b363",
              "v": "0x1b"
            },
            "timestamp": 1745436557621941000,
            "msg_hash": "0xfaac8ea9c656d7e8f997bedb8dfe9822946c18fba4bd1b74fb23b9c537f5bcf2"
          }
        }
      ]
    }
  }
}

Get Historical Price Metrics

get

Get OHLC price data for a specific asset within a time range.

Authorizations
Query parameters
fromintegerRequired

Start timestamp (Unix seconds)

tointegerRequired

Start timestamp (Unix seconds)

resolutionstring · enumRequired

Time resolution in minutes, or 1 day, 1 week, or 1 month.

Possible values:
symbolstringRequired

A unique identifier for an asset.

Example: BTCUSD
Responses
200
OK
application/json
get
GET /v1/tradingview/history HTTP/1.1
Host: rest.jp.stork-oracle.network
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "data": {
    "t": [
      1745440680,
      1745440740
    ],
    "o": [
      93844.72017265,
      93823.3268325
    ],
    "h": [
      93844.72017265,
      93826.57309804998
    ],
    "l": [
      93819.18021595,
      93777.20385154997
    ],
    "c": [
      93823.3268325,
      93777.20385154997
    ]
  }
}

List EVM chain Deployments

get

Get the list of EVM chain deployments and their details.

Responses
200
OK
application/json
404
Not Found
get
GET /v1/deployments/evm HTTP/1.1
Host: rest.jp.stork-oracle.network
Accept: */*
{
  "data": [
    {
      "chain_id": 50401,
      "network": "Sophon",
      "environment": "Mainnet",
      "proxy_address": "0x6a2ab154d7c5Ba9fdea6d8A0C79818A4463a63f9",
      "block_explorer_url": "https://explorer.sophon.xyz/"
    }
  ]
}

Get Implied Volatility

get

Get signed implied volatility data for a specific option.

Authorizations
Query parameters
symbolstringRequired

Asset symbol (e.g. BTCUSD)

expirystring · dateRequired

Option expiry date in YYYY-MM-DD format

strikestringRequired

Strike price in USD

typestring · enumRequired

Option type (PUT or CALL)

Possible values:
Responses
200
OK
application/json
400
Bad Request
application/json
500
Internal Server Error
application/json
get
GET /v1/options/implied_volatility HTTP/1.1
Host: rest.jp.stork-oracle.network
Authorization: YOUR_API_KEY
Accept: */*
{
  "symbol": "BTCUSD",
  "expiry": "2024-12-31",
  "strike": "50000",
  "type": "PUT",
  "timestamp": 1,
  "stork_signed_implied_volatility": {
    "public_key": "0x0a803F9b1CCe32e2773e0d2e98b37E0775cA5d44",
    "encoded_asset_id": "0x7404e3d104ea7841c3d9e6fd20adfe99b4ad586bc08d8f3bd3afef894cf184de",
    "price": "101344782928537490000000",
    "timestamped_signature": {
      "signature": {
        "r": "0xb193e9ff3e3c0346ca74e194b8eab13cc9d49b73a68167b7a021ec979cb3aef7",
        "s": "0x07a7176c245e24777755ae3037450862bb4dbc1e4ff49304cd82c3d818a8e598",
        "v": "0x1b"
      },
      "timestamp": 1734127259251174100,
      "msg_hash": "0x977891628f4fc326f858ec33ba03da335e2ec4648a9f9332ab0317a64165fa7c"
    },
    "publisher_merkle_root": "0x4e0a03960cea21f67d7f2b66c5457fa4fea3632a68d0f3bc01adb0588446efdf",
    "calculation_alg": {
      "type": "median",
      "version": "v1",
      "checksum": "9be7e9f9ed459417d96112a7467bd0b27575a2c7847195c68f805b70ce1795ba"
    }
  },
  "signed_implied_volatilities": [
    {
      "external_asset_id": "BTCUSD",
      "implied_volatility": "101344782928537490000000",
      "timestamped_signature": {
        "signature": {
          "r": "0xb193e9ff3e3c0346ca74e194b8eab13cc9d49b73a68167b7a021ec979cb3aef7",
          "s": "0x07a7176c245e24777755ae3037450862bb4dbc1e4ff49304cd82c3d818a8e598",
          "v": "0x1b"
        },
        "timestamp": 1734127259251174100,
        "msg_hash": "0x977891628f4fc326f858ec33ba03da335e2ec4648a9f9332ab0317a64165fa7c"
      },
      "public_key": "0x51aa9e9C781F85a2C0636A835EB80114c4553098"
    }
  ]
}

Get Underlying Future Price

get

Get signed underlying future price data for a specific option.

Authorizations
Query parameters
symbolstringRequired

Asset symbol (e.g. BTCUSD)

expirystring · dateRequired

Option expiry date in YYYY-MM-DD format

strikestringRequired

Strike price in USD

typestring · enumRequired

Option type (PUT or CALL)

Possible values:
Responses
200
OK
application/json
400
Bad Request
application/json
500
Internal Server Error
application/json
get
GET /v1/options/underlying_future_price HTTP/1.1
Host: rest.jp.stork-oracle.network
Authorization: YOUR_API_KEY
Accept: */*
{
  "symbol": "BTCUSD",
  "expiry": "2024-12-31",
  "strike": "50000",
  "type": "PUT",
  "timestamp": 1,
  "signed_underlying_future_prices": [
    {
      "underlying_future_price": "101344782928537490000000",
      "timestamped_signature": {
        "signature": {
          "r": "0xb193e9ff3e3c0346ca74e194b8eab13cc9d49b73a68167b7a021ec979cb3aef7",
          "s": "0x07a7176c245e24777755ae3037450862bb4dbc1e4ff49304cd82c3d818a8e598",
          "v": "0x1b"
        },
        "timestamp": 1734127259251174100,
        "msg_hash": "0x977891628f4fc326f858ec33ba03da335e2ec4648a9f9332ab0317a64165fa7c"
      },
      "external_asset_id": "BTCUSD",
      "public_key": "0x51aa9e9C781F85a2C0636A835EB80114c4553098"
    }
  ]
}
  • Authentication
  • Rate Limits
  • Note
  • GETList Available Assets
  • GETGet Latest Prices
  • GETGet Historical Price Metrics
  • GETList EVM chain Deployments
  • GETGet Implied Volatility
  • GETGet Underlying Future Price