← APIs / Attestations
Verified

Attestations

Apiosk Basicsby Apiosk Basics · General

Signed JWS receipts over payload hashes and validation results, plus receipt verification and optional attestation retrieval by id.

securityapi
Price per request
$0.02
About

Signed JWS receipts over payload hashes and validation results, plus receipt verification and optional attestation retrieval by id. Pure computation, no caller API key, no outbound provider dependency. The gateway meters access per request over x402.

Base URL
https://gateway.apiosk.com/attestations
Technical Specs
Auth Methodx402
Response FormatJSON
Endpoints8
Endpoints
MethodPathDescriptionCost
GET /attest Retrieve an attestation by id with GET /attest/{id}. The gateway prefix-matches this registered path.
$0.02 default
View details
POST /attest Create a signed JWS receipt containing payload hash, result hash, timestamp and validation results.
$0.02 default
View details
POST /market-price Return a signed spot price for a token in a quote currency (default USD) from a public keyless source (CoinGecko). The JWS-HS256 envelope is a provenance receipt an agent keeps for every few-cent call, verifiable via /verify.
$0.02 default
View details
POST /onchain-reserve Read balanceOf for a token/holder pair on Base at the current block and return the balance with a signed JWS-HS256 receipt. The envelope carries the exact eth_call (contract, calldata, block) so anyone can re-run it against any Base node.
$0.03 default
View details
POST /oracle-reading Call a Chainlink aggregator latestRoundData directly on Base and return the round with a signed JWS-HS256 receipt. Pass a known pair (ETH/USD, BTC/USD, USDC/USD, DAI/USD, LINK/USD) or an explicit aggregator address; the number is itself on-chain and re-checkable from the feed address + block in the envelope.
$0.03 default
View details
POST /tx-confirmation Read a transaction receipt on Base, compare it against the head block, and return status (success/failed/pending), the block it landed in and a confirmation count, wrapped in a signed JWS-HS256 receipt. Independently re-checkable from the tx block + head block in the envelope.
$0.01 default
View details
POST /usdc-eure Signed USDC/EURe spot rate read directly from the EURe/USDC 0.30% Uniswap v3 pool on Polygon (mid-price from sqrtPriceX96). The on-chain rate behind the euro off-ramp; the envelope carries the exact eth_call slot0() so the number is independently re-checkable. Excludes the pool fee and slippage.
$0.03 default
View details
POST /verify Verify a previously issued attestation JWS and optionally confirm it matches a resubmitted payload.
$0.02 default
View details
Endpoint documentation
GET/attest
$0.02 default
Description

Retrieve an attestation by id with GET /attest/{id}. The gateway prefix-matches this registered path.

Pricing
$0.02 default
Request schema
{
  "properties": {},
  "type": "object"
}
Response schema
{
  "properties": {
    "id": {
      "type": "string"
    },
    "jws": {
      "type": "string"
    },
    "payload_hash": {
      "type": "string"
    }
  },
  "type": "object"
}
Example request
{}
Example response
{
  "id": "att_example",
  "jws": "...",
  "ok": true,
  "payload_hash": "..."
}
POST/attest
$0.02 default
Description

Create a signed JWS receipt containing payload hash, result hash, timestamp and validation results.

Pricing
$0.02 default
Request schema
{
  "properties": {
    "payload": {
      "description": "Any JSON payload to hash and attest."
    },
    "validation_results": {
      "description": "Validation result object to include in the receipt."
    }
  },
  "required": [
    "payload"
  ],
  "type": "object"
}
Response schema
{
  "properties": {
    "id": {
      "type": "string"
    },
    "jws": {
      "type": "string"
    },
    "payload_hash": {
      "type": "string"
    },
    "persisted": {
      "type": "boolean"
    }
  },
  "type": "object"
}
Example request
{
  "payload": {
    "iban": "NL91ABNA0417164300"
  },
  "validation_results": {
    "valid": true
  }
}
Example response
{
  "id": "att_example",
  "jws": "...",
  "ok": true,
  "payload_hash": "...",
  "persisted": true
}
POST/market-price
$0.02 default
Description

Return a signed spot price for a token in a quote currency (default USD) from a public keyless source (CoinGecko). The JWS-HS256 envelope is a provenance receipt an agent keeps for every few-cent call, verifiable via /verify.

Pricing
$0.02 default
Request schema
{
  "properties": {
    "base": {
      "description": "Token symbol (\"eth\") or explicit CoinGecko id (\"usd-coin\").",
      "type": "string"
    },
    "quote": {
      "default": "usd",
      "description": "Quote currency, e.g. usd, eur.",
      "type": "string"
    }
  },
  "required": [
    "base"
  ],
  "type": "object"
}
Response schema
{
  "description": "Signed envelope. `result` holds the reading; `jws` is a JWS-HS256 receipt verifiable via the sibling /verify route.",
  "properties": {
    "id": {
      "type": "string"
    },
    "jws": {
      "type": "string"
    },
    "observed_at": {
      "type": "string"
    },
    "ok": {
      "type": "boolean"
    },
    "result": {
      "type": "object"
    },
    "service": {
      "type": "string"
    },
    "source": {
      "type": "object"
    }
  },
  "type": "object"
}
Example request
{
  "base": "eth",
  "quote": "usd"
}
Example response
{
  "claims": {
    "iss": "apiosk-trust-primitives"
  },
  "id": "obs_...",
  "jws": "eyJ...",
  "kid": "apiosk-trust-primitives-v1",
  "observed_at": "2026-07-08T09:06:05.000Z",
  "ok": true,
  "request": {
    "base": "eth",
    "quote": "usd"
  },
  "result": {
    "as_of": "2026-07-08T09:06:04.000Z",
    "base": "eth",
    "coingecko_id": "ethereum",
    "price": 1753.08,
    "quote": "usd"
  },
  "service": "market-price",
  "signature_format": "JWS-HS256",
  "source": {
    "method": "simple/price",
    "provider": "coingecko"
  }
}
POST/onchain-reserve
$0.03 default
Description

Read balanceOf for a token/holder pair on Base at the current block and return the balance with a signed JWS-HS256 receipt. The envelope carries the exact eth_call (contract, calldata, block) so anyone can re-run it against any Base node.

Pricing
$0.03 default
Request schema
{
  "properties": {
    "chain": {
      "default": "base",
      "type": "string"
    },
    "holder": {
      "description": "Address whose reserve is checked (0x...).",
      "type": "string"
    },
    "token": {
      "description": "ERC-20 contract address (0x...).",
      "type": "string"
    }
  },
  "required": [
    "token",
    "holder"
  ],
  "type": "object"
}
Response schema
{
  "description": "Signed envelope; `source.call` is the exact eth_call to replay.",
  "properties": {
    "jws": {
      "type": "string"
    },
    "ok": {
      "type": "boolean"
    },
    "result": {
      "type": "object"
    },
    "source": {
      "type": "object"
    }
  },
  "type": "object"
}
Example request
{
  "chain": "base",
  "holder": "0xA039E3dEb5ca71E41905f90491FC5d016CE23B79",
  "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
Example response
{
  "id": "obs_...",
  "jws": "eyJ...",
  "ok": true,
  "result": {
    "balance": "12500.000000",
    "balance_raw": "12500000000",
    "block": 32000000,
    "chain": "base",
    "chain_id": 8453,
    "decimals": 6,
    "holder": "0x2ce6...",
    "symbol": "USDC",
    "token": "0x8335...2913"
  },
  "service": "onchain-reserve",
  "source": {
    "call": {
      "block": "0x1e84800",
      "data": "0x70a08231...",
      "to": "0x8335...2913"
    },
    "method": "eth_call balanceOf(address)",
    "provider": "base-rpc"
  }
}
POST/oracle-reading
$0.03 default
Description

Call a Chainlink aggregator latestRoundData directly on Base and return the round with a signed JWS-HS256 receipt. Pass a known pair (ETH/USD, BTC/USD, USDC/USD, DAI/USD, LINK/USD) or an explicit aggregator address; the number is itself on-chain and re-checkable from the feed address + block in the envelope.

Pricing
$0.03 default
Request schema
{
  "anyOf": [
    {
      "required": [
        "pair"
      ]
    },
    {
      "required": [
        "feed"
      ]
    }
  ],
  "properties": {
    "chain": {
      "default": "base",
      "type": "string"
    },
    "feed": {
      "description": "Explicit Chainlink aggregator address (overrides pair).",
      "type": "string"
    },
    "pair": {
      "description": "Known pair, e.g. ETH/USD, BTC/USD, USDC/USD, DAI/USD, LINK/USD.",
      "type": "string"
    }
  },
  "type": "object"
}
Response schema
{
  "description": "Signed envelope; `source.call` is the exact latestRoundData call to replay.",
  "properties": {
    "jws": {
      "type": "string"
    },
    "ok": {
      "type": "boolean"
    },
    "result": {
      "type": "object"
    },
    "source": {
      "type": "object"
    }
  },
  "type": "object"
}
Example request
{
  "pair": "ETH/USD"
}
Example response
{
  "id": "obs_...",
  "jws": "eyJ...",
  "ok": true,
  "result": {
    "answer": "1754.30000000",
    "answer_raw": "175430000000",
    "block": 32000000,
    "chain": "base",
    "chain_id": 8453,
    "decimals": 8,
    "description": "ETH / USD",
    "feed": "0x71041dddad3595f9ced3dccfbe3d1f4b0a16bb70",
    "round_id": "...",
    "updated_at": "2026-07-08T09:05:00.000Z"
  },
  "service": "oracle-reading",
  "source": {
    "method": "eth_call latestRoundData()",
    "provider": "chainlink",
    "via": "base-rpc"
  }
}
POST/tx-confirmation
$0.01 default
Description

Read a transaction receipt on Base, compare it against the head block, and return status (success/failed/pending), the block it landed in and a confirmation count, wrapped in a signed JWS-HS256 receipt. Independently re-checkable from the tx block + head block in the envelope.

Pricing
$0.01 default
Request schema
{
  "properties": {
    "chain": {
      "default": "base",
      "type": "string"
    },
    "min_confirmations": {
      "default": 1,
      "description": "Confirmations required to report finalized=true.",
      "type": "integer"
    },
    "tx_hash": {
      "description": "Transaction hash (0x..., 32 bytes).",
      "type": "string"
    }
  },
  "required": [
    "tx_hash"
  ],
  "type": "object"
}
Response schema
{
  "description": "Signed envelope with status, confirmations and finality.",
  "properties": {
    "jws": {
      "type": "string"
    },
    "ok": {
      "type": "boolean"
    },
    "result": {
      "type": "object"
    },
    "source": {
      "type": "object"
    }
  },
  "type": "object"
}
Example request
{
  "min_confirmations": 3,
  "tx_hash": "0xa3f1b4f732b6136bc730e5b25bc62426c2049b575be42b22a172089c921f295a"
}
Example response
{
  "id": "obs_...",
  "jws": "eyJ...",
  "ok": true,
  "result": {
    "block_number": 31999990,
    "chain": "base",
    "chain_id": 8453,
    "confirmations": 11,
    "finalized": true,
    "head_block": 32000000,
    "status": "success",
    "tx_hash": "0xabc..."
  },
  "service": "tx-confirmation",
  "source": {
    "method": "eth_getTransactionReceipt",
    "provider": "base-rpc"
  }
}
POST/usdc-eure
$0.03 default
Description

Signed USDC/EURe spot rate read directly from the EURe/USDC 0.30% Uniswap v3 pool on Polygon (mid-price from sqrtPriceX96). The on-chain rate behind the euro off-ramp; the envelope carries the exact eth_call slot0() so the number is independently re-checkable. Excludes the pool fee and slippage.

Pricing
$0.03 default
Request schema
{
  "additionalProperties": false,
  "description": "No parameters — the pool is fixed (EURe/USDC 0.30% on Polygon).",
  "properties": {},
  "type": "object"
}
Response schema
{
  "description": "Signed envelope; result.eure_per_usdc is the headline off-ramp direction, source.call is the exact slot0() call to replay.",
  "properties": {
    "jws": {
      "type": "string"
    },
    "ok": {
      "type": "boolean"
    },
    "result": {
      "type": "object"
    },
    "source": {
      "type": "object"
    }
  },
  "type": "object"
}
Example request
{}
Example response
{
  "id": "obs_...",
  "jws": "eyJ...",
  "ok": true,
  "result": {
    "base": "USDC",
    "block": 89871950,
    "chain": "polygon",
    "chain_id": 137,
    "eure_per_usdc": "0.87718046",
    "fee": 3000,
    "fee_percent": "0.3000",
    "pair": "USDC/EURe",
    "pool": "0x7d4324293304797cb662c6ea1b904b6af2b485f5",
    "quote": "EURe",
    "sqrt_price_x96": "84593132790838948516727",
    "usdc_per_eure": "1.14001627"
  },
  "service": "usdc-eure",
  "source": {
    "call": {
      "block": "0x55b8b0e",
      "data": "0x3850c7bd",
      "to": "0x7d4324293304797cb662c6ea1b904b6af2b485f5"
    },
    "method": "eth_call slot0()",
    "provider": "uniswap-v3",
    "via": "polygon-rpc"
  }
}
POST/verify
$0.02 default
Description

Verify a previously issued attestation JWS and optionally confirm it matches a resubmitted payload.

Pricing
$0.02 default
Request schema
{
  "properties": {
    "jws": {
      "type": "string"
    },
    "payload": {
      "description": "Optional original payload to hash and compare."
    }
  },
  "required": [
    "jws"
  ],
  "type": "object"
}
Response schema
{
  "properties": {
    "claims": {
      "type": [
        "object",
        "null"
      ]
    },
    "payload_hash_matches": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "signature_valid": {
      "type": "boolean"
    }
  },
  "type": "object"
}
Example request
{
  "jws": "eyJ...",
  "payload": {
    "iban": "NL91ABNA0417164300"
  }
}
Example response
{
  "ok": true,
  "payload_hash_matches": true,
  "signature_valid": true
}