# Ethereum Signatures API
> Decode Ethereum smart-contract function and event signatures, keyless. Turn a 4-byte function selector (the first 4 bytes of any transaction calldata, e.g. 0xa9059cbb) into its human-readable function signature (transfer(address,uint256)), decode a 32-byte event topic from a log into its event signature, or search the database by name to find a selector. Many selectors have hash collisions — the API flags the original / canonical signature. Backed by the open 4byte.directory database, live. Essential for transaction decoders, block explorers, wallets, security tools and on-chain analytics — the signature-decoding layer for any EVM tooling.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/ethsignatures-api/..."
```

## Pricing
- **Free** (Free) — 5,000 calls/Mo, 3 req/s
- **Starter** ($10/Mo) — 120,000 calls/Mo, 8 req/s
- **Pro** ($33/Mo) — 800,000 calls/Mo, 20 req/s
- **Business** ($94/Mo) — 5,000,000 calls/Mo, 50 req/s

## Endpoints

### Decode

#### `GET /v1/event` — Decode a 32-byte event topic to its event signature

**Parameters:**
- `hex` (query, required, string) — 32-byte event topic (0x + 64 hex chars) Example: `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ethsignatures-api/v1/event?hex=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
```

**Response:**
```json
{
    "data": {
        "note": "All event signatures whose keccak-256 hash equals this 32-byte topic. most_likely (lowest id) is the canonical one.",
        "count": 1,
        "source": "4byte.directory",
        "signatures": [
            {
                "id": 1,
                "most_likely": true,
                "text_signature": "Transfer(address,address,uint256)"
            }
        ],
        "most_likely": "Transfer(address,address,uint256)",
        "hex_signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:18.614Z",
        "request_id": "03940096-2010-4752-a182-6a4507fa9d94"
    },
    "status": "ok",
    "message": "Event signature decoded successfully",
    "success": true
}
```

#### `GET /v1/function` — Decode a 4-byte function selector to its signature(s)

**Parameters:**
- `hex` (query, required, string) — 4-byte function selector (0x + 8 hex chars) Example: `0xa9059cbb`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ethsignatures-api/v1/function?hex=0xa9059cbb"
```

**Response:**
```json
{
    "data": {
        "note": "All function signatures whose keccak-256 hash starts with this 4-byte selector. most_likely (lowest id) is the original / canonical one; the rest are hash collisions.",
        "count": 6,
        "source": "4byte.directory",
        "signatures": [
            {
                "id": 145,
                "most_likely": true,
                "text_signature": "transfer(address,uint256)"
            },
            {
                "id": 31780,
                "most_likely": false,
                "text_signature": "many_msg_babbage(bytes1)"
            },
            {
                "id": 161159,
                "most_likely": false,
                "text_signature": "transfer(bytes4[9],bytes5[6],int48[11])"
            },
            {
                "id": 313067,
                "most_likely": false,
                "text_signature": "func_2093253501(bytes)"
            },
            {
                "id": 844280,
                "most_likely": false,
                "text_signature": "join_tg_invmru_haha_fd06787(address,bool)"
            },
            {
                "id": 1111734,
                "most_likely": false,
                "text_signature": "workMyDirefulOwner(uint256,uint256)"
            }
        ],
        "most_likely": "transfer(address,uint256)",
        "hex_signature": "0xa9059cbb"
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:18.714Z",
        "request_id": "89d2c275-2ceb-43a9-a3f2-8f5606f346d8"

…(truncated, see openapi.json for full schema)
```

### Search

#### `GET /v1/search` — Search signatures by text and get their selectors

**Parameters:**
- `text` (query, required, string) — Function name or partial text Example: `transfer`
- `limit` (query, optional, string) — Results (1-100, default 25) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ethsignatures-api/v1/search?text=transfer&limit=25"
```

**Response:**
```json
{
    "data": {
        "note": "Function signatures matching the text query, each with its 4-byte selector.",
        "count": 25,
        "query": "transfer",
        "total": 25787,
        "source": "4byte.directory",
        "signatures": [
            {
                "id": 1207759,
                "hex_signature": "0x069d7896",
                "text_signature": "ScannedTicketCannotBeTransferred()"
            },
            {
                "id": 1207712,
                "hex_signature": "0x5524e9dc",
                "text_signature": "CrossChainTransferCompleted(uint64,uint64,uint256,uint64)"
            },
            {
                "id": 1207510,
                "hex_signature": "0x16d7fd37",
                "text_signature": "bulkTransferFrom(address,address,uint48[])"
            },
            {
                "id": 1207492,
                "hex_signature": "0x234b7ede",
                "text_signature": "transferUserERC20(address,address,uint256,address,address)"
            },
            {
                "id": 1207491,
                "hex_signature": "0xa0531b02",
                "text_signature": "transferSurchargeRecipient(address)"
            },
            {
                "id": 1207490,
                "hex_signature": "0xb2c5c510",
                "text_signature": "transferDAppERC20(address,address,uint256,address,address)"
            },
            {
                "id": 1207274,
                "hex_signature": "0xa8b9e56b",
              
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata & live sample

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ethsignatures-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "function takes hex = a 4-byte selector (0x + 8 hex). event takes hex = a 32-byte topic (0x + 64 hex). search takes text (e.g. transfer) and optional limit (1-100). Many selectors have hash collisions; most_likely (lowest id) is the original signature.",
        "sample": {
            "most_likely": "transfer(address,uint256)",
            "hex_signature": "0xa9059cbb"
        },
        "source": "4byte.directory open API (www.4byte.directory/api/v1), live",
        "service": "ethsignatures-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/event": "Decode a 32-byte event topic to its event signature (hex=0xddf252ad...).",
            "GET /v1/search": "Search signatures by text and get their selectors (text=transfer).",
            "GET /v1/function": "Decode a 4-byte function selector to its signature(s) (hex=0xa9059cbb)."
        },
        "description": "Decode Ethereum smart-contract function and event signatures, keyless. Turn a 4-byte function selector (first 4 bytes of any transaction's calldata, e.g. 0xa9059cbb) into its human-readable signature (transfer(address,uint256)), decode a 32-byte event topic from a log, or search the database by name. Essential for transaction decoders, block explorers, wallets, security tools and on-chain analytics. Live, nothing stored beyond a short cache. The signature-decoding layer for any EVM tooling.",
        "upstream_status": "ok"
    },
    "meta":
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/ethsignatures-api
OpenAPI spec: https://www.oanor.com/api/ethsignatures-api/openapi.json
