Skip to content
Lumoracle

World GDP

by Lumoracle · 1 source · a report every 1 d

Signed by Lumoracle from the provider’s API

Per call
$0.02
sold in packs
Smallest payment
$0.20
what Lumoracle settles on chain
A report every
1 d
from 1 source
Uptime, 30 days
Measuring · 1 of 7 days
measured by Lumoracle
Calls, last 30 days
0

Endpoint

GET /v1/feeds/lumoracle/world-gdp-current-usd/latest

Bought a pack on this feed? Your code spends it with one header. Make an API key, then use the first example below.

One call
$0.02, sold in packs only
Pack of 10
$0.20, valid 30 days
Pack of 100
$2.00, valid 30 days
History page
5 calls
Pays
0xe240cF24…EfDe4C92

API key

terminal
# For a pack you already bought. Make a key in the dashboard, under API keys.
curl https://lumoracle.io/gw/v1/feeds/lumoracle/world-gdp-current-usd/latest \
  -H "Authorization: Bearer <your API key>"

# The calls left in your packs.
curl https://lumoracle.io/gw/v1/packs \
  -H "Authorization: Bearer <your API key>"

HTTP

terminal
# 1. Ask. The answer is 402 with the price, in the PAYMENT-REQUIRED header.
curl -i https://lumoracle.io/gw/v1/feeds/lumoracle/world-gdp-current-usd/latest

# 2. Sign the USDG authorization it describes, then ask again.
curl https://lumoracle.io/gw/v1/feeds/lumoracle/world-gdp-current-usd/latest \
  -H "PAYMENT-SIGNATURE: <base64 payment payload>"

TypeScript

buy.ts
import {Lumoracle} from '@lumoracle/sdk'

const lumoracle = new Lumoracle({gatewayUrl: 'https://lumoracle.io/gw', account, maxSpendUsdg: 5_000_000n})

const report = await lumoracle.read('lumoracle/world-gdp-current-usd') // pays, or spends a pack, by itself
report.value      // 0 decimals, a bigint
report.checks     // already verified: signer, kind, decimals, payload, age

TypeScript, with an API key

read.ts
import {Lumoracle} from '@lumoracle/sdk'

// No wallet on the server: the key spends calls you bought ahead and cannot buy more.
const lumoracle = new Lumoracle({gatewayUrl: 'https://lumoracle.io/gw', apiKey: process.env.LUMORACLE_API_KEY})

const report = await lumoracle.read('lumoracle/world-gdp-current-usd') // one call from your pack, nothing signed
report.value      // 0 decimals, a bigint
report.callsLeft  // what the pack still holds

Solidity

Example.sol
import {LumoracleConsumer} from "@lumoracle/contracts/src/LumoracleConsumer.sol";

contract Example is LumoracleConsumer {
    bytes32 constant WORLD_GDP_CURRENT_USD = 0x27666d9df498f8dbc043c8ed819f56f2edaa4033ea2afde2a87904b8367ebd44;

    function settle(bytes calldata report, bytes calldata sig) external {
        int256 value = _readOnce(WORLD_GDP_CURRENT_USD, report, sig, Policy({
            maxAgeSec: 172800,
            allowedKinds: KIND_MANAGED,
            minValue: 0,
            maxValue: type(int256).max
        }));
        // use value, scaled by 0 decimals
    }
}

Agents (MCP)

mcp.json
{
  "mcpServers": {
    "lumoracle": {
      "command": "npx",
      "args": ["-y", "@lumoracle/mcp"],
      "env": {"LUMORACLE_GATEWAY_URL": "https://lumoracle.io/gw", "LUMORACLE_PRIVATE_KEY": "<a wallet made for this agent>", "LUMORACLE_MAX_SPEND_USDG": "1000000"}
    }
  }
}

Agents (MCP), with an API key

mcp.json
{
  "mcpServers": {
    "lumoracle": {
      "command": "npx",
      "args": ["-y", "@lumoracle/mcp"],
      "env": {"LUMORACLE_GATEWAY_URL": "https://lumoracle.io/gw", "LUMORACLE_API_KEY": "<your API key>"}
    }
  }
}

Response schema

schema.json
{
  "type": "object",
  "title": "World GDP",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "value",
    "observedAtMs"
  ],
  "properties": {
    "value": {
      "type": "string"
    },
    "observedAtMs": {
      "type": "string"
    }
  }
}