{"openapi":"3.1.0","info":{"title":"Contract Bytecode API","version":"1.0.0","description":"Fetch any smart contract's deployed EVM bytecode live from the chain's public JSON-RPC, disassemble it into human-readable opcodes, and extract the 4-byte function selectors from its dispatcher. Unlike source-verification or 4-byte directories, this works on ANY deployed contract — verified or not — so it reveals the raw on-chain logic of contracts nobody has published source for. Give it a chain and an address and get the runtime bytecode, a full offset-by-offset opcode disassembly (paged), and the detected function selectors. The reverse-engineering layer for auditors, MEV searchers and security tooling. Reads straight from the chain across Ethereum, Base, Arbitrum, Optimism, BNB, Polygon and more. Live, short cache only.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/bytecode-api","description":"oanor gateway"}],"tags":[{"name":"Bytecode"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/bytecode":{"get":{"operationId":"get_v1_bytecode","tags":["Bytecode"],"summary":"Deployed runtime bytecode of a contract","description":"","parameters":[{"name":"address","in":"query","required":true,"description":"Contract address (0x + 40 hex)","schema":{"type":"string"},"example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{"name":"chain","in":"query","required":false,"description":"Chain name or id","schema":{"type":"string"},"example":"ethereum"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The contract's deployed runtime bytecode read live via eth_getCode. EOAs and undeployed addresses return 404.","chain":"ethereum","source":"public JSON-RPC (publicnode)","address":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","bytecode":"0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633659cfe6146100775780634f1ef286146100ba5780635c60da1b146101085780638f2839701461015f578063f851a440146101a2575b6100756101f9565b005b34801561008357600080fd5b506100b8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610213565b005b610106600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001919091929391929390505050610268565b005b34801561011457600080fd5b5061011d610308565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016b57600080fd5b506101a0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610360565b005b3480156101ae57600080fd5b506101b761051e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610201610576565b61021161020c610651565b610682565b565b61021b6106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561025c57610257816106d9565b610265565b6102646101f9565b5b50565b6102706106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102fa576102ac836106d9565b3073ffffffffffffffffffffffffffffffffffffffff163483836040518083838082843782019150509250505060006040518083038185875af19250505015156102f557600080fd5b610303565b6103026101f9565b5b505050565b60006103126106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103545761034d610651565b905061035d565b61035c6101f9565b5b90565b6103686106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561051257600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610466576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001807f43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f81526020017f787920746f20746865207a65726f20616464726573730000000000000000000081525060400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61048f6106a8565b82604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a161050d81610748565b61051b565b61051a6101f9565b5b50565b60006105286106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561056a576105636106a8565b9050610573565b6105726101f9565b5b90565b61057e6106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151515610647576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001807f43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e20667281526020017f6f6d207468652070726f78792061646d696e000000000000000000000000000081525060400191505060405180910390fd5b61064f610777565b565b6000807f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c36001029050805491505090565b3660008037600080366000845af43d6000803e80600081146106a3573d6000f35b3d6000fd5b6000807f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b6001029050805491505090565b6106e281610779565b7fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b60007f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b60010290508181555050565b565b60006107848261084b565b151561081e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001807f43616e6e6f742073657420612070726f787920696d706c656d656e746174696f81526020017f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000081525060400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c360010290508181555050565b600080823b9050600081119150509190505600a165627a7a72305820a4a547cfc7202c5acaaae74d428e988bc62ad5024eb0165532d3a8f91db4ed240029","size_bytes":2186},"meta":{"timestamp":"2026-06-14T08:04:12.175Z","request_id":"48406410-4582-4591-ae50-397aba62db7a"},"status":"ok","message":"Bytecode retrieved successfully","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/disassemble":{"get":{"operationId":"get_v1_disassemble","tags":["Bytecode"],"summary":"Full opcode disassembly (paged)","description":"","parameters":[{"name":"address","in":"query","required":true,"description":"Contract address (0x + 40 hex)","schema":{"type":"string"},"example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{"name":"chain","in":"query","required":false,"description":"Chain name or id","schema":{"type":"string"},"example":"ethereum"},{"name":"limit","in":"query","required":false,"description":"Instructions per page (1-5000)","schema":{"type":"string"},"example":"50"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"EVM disassembly of the runtime bytecode. Each instruction has its byte offset, opcode, mnemonic and (for PUSH) the immediate data. Page with limit/offset.","chain":"ethereum","count":50,"limit":50,"offset":0,"source":"public JSON-RPC (publicnode) + local EVM decode","address":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","truncated":true,"size_bytes":2186,"instructions":[{"push":"0x80","offset":0,"opcode":"0x60","mnemonic":"PUSH1"},{"push":"0x40","offset":2,"opcode":"0x60","mnemonic":"PUSH1"},{"offset":4,"opcode":"0x52","mnemonic":"MSTORE"},{"push":"0x04","offset":5,"opcode":"0x60","mnemonic":"PUSH1"},{"offset":7,"opcode":"0x36","mnemonic":"CALLDATASIZE"},{"offset":8,"opcode":"0x10","mnemonic":"LT"},{"push":"0x006d","offset":9,"opcode":"0x61","mnemonic":"PUSH2"},{"offset":12,"opcode":"0x57","mnemonic":"JUMPI"},{"push":"0x00","offset":13,"opcode":"0x60","mnemonic":"PUSH1"},{"offset":15,"opcode":"0x35","mnemonic":"CALLDATALOAD"},{"push":"0x0100000000000000000000000000000000000000000000000000000000","offset":16,"opcode":"0x7c","mnemonic":"PUSH29"},{"offset":46,"opcode":"0x90","mnemonic":"SWAP1"},{"offset":47,"opcode":"0x04","mnemonic":"DIV"},{"push":"0xffffffff","offset":48,"opcode":"0x63","mnemonic":"PUSH4"},{"offset":53,"opcode":"0x16","mnemonic":"AND"},{"offset":54,"opcode":"0x80","mnemonic":"DUP1"},{"push":"0x3659cfe6","offset":55,"opcode":"0x63","mnemonic":"PUSH4"},{"offset":60,"opcode":"0x14","mnemonic":"EQ"},{"push":"0x0077","offset":61,"opcode":"0x61","mnemonic":"PUSH2"},{"offset":64,"opcode":"0x57","mnemonic":"JUMPI"},{"offset":65,"opcode":"0x80","mnemonic":"DUP1"},{"push":"0x4f1ef286","offset":66,"opcode":"0x63","mnemonic":"PUSH4"},{"offset":71,"opcode":"0x14","mnemonic":"EQ"},{"push":"0x00ba","offset":72,"opcode":"0x61","mnemonic":"PUSH2"},{"offset":75,"opcode":"0x57","mnemonic":"JUMPI"},{"offset":76,"opcode":"0x80","mnemonic":"DUP1"},{"push":"0x5c60da1b","offset":77,"opcode":"0x63","mnemonic":"PUSH4"},{"offset":82,"opcode":"0x14","mnemonic":"EQ"},{"push":"0x0108","offset":83,"opcode":"0x61","mnemonic":"PUSH2"},{"offset":86,"opcode":"0x57","mnemonic":"JUMPI"},{"offset":87,"opcode":"0x80","mnemonic":"DUP1"},{"push":"0x8f283970","offset":88,"opcode":"0x63","mnemonic":"PUSH4"},{"offset":93,"opcode":"0x14","mnemonic":"EQ"},{"push":"0x015f","offset":94,"opcode":"0x61","mnemonic":"PUSH2"},{"offset":97,"opcode":"0x57","mnemonic":"JUMPI"},{"offset":98,"opcode":"0x80","mnemonic":"DUP1"},{"push":"0xf851a440","offset":99,"opcode":"0x63","mnemonic":"PUSH4"},{"offset":104,"opcode":"0x14","mnemonic":"EQ"},{"push":"0x01a2","offset":105,"opcode":"0x61","mnemonic":"PUSH2"},{"offset":108,"opcode":"0x57","mnemonic":"JUMPI"},{"offset":109,"opcode":"0x5b","mnemonic":"JUMPDEST"},{"push":"0x0075","offset":110,"opcode":"0x61","mnemonic":"PUSH2"},{"push":"0x01f9","offset":113,"opcode":"0x61","mnemonic":"PUSH2"},{"offset":116,"opcode":"0x56","mnemonic":"JUMP"},{"offset":117,"opcode":"0x5b","mnemonic":"JUMPDEST"},{"offset":118,"opcode":"0x00","mnemonic":"STOP"},{"offset":119,"opcode":"0x5b","mnemonic":"JUMPDEST"},{"offset":120,"opcode":"0x34","mnemonic":"CALLVALUE"},{"offset":121,"opcode":"0x80","mnemonic":"DUP1"},{"offset":122,"opcode":"0x15","mnemonic":"ISZERO"}],"instruction_count":844},"meta":{"timestamp":"2026-06-14T08:04:12.296Z","request_id":"1a2ff7b2-fd01-4cc0-9ff4-7e68cc606a43"},"status":"ok","message":"Disassembly retrieved successfully","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/selectors":{"get":{"operationId":"get_v1_selectors","tags":["Bytecode"],"summary":"4-byte function selectors from the contract dispatcher","description":"","parameters":[{"name":"address","in":"query","required":true,"description":"Contract address (0x + 40 hex)","schema":{"type":"string"},"example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{"name":"chain","in":"query","required":false,"description":"Chain name or id (ethereum, base, arbitrum, optimism, bsc, polygon...)","schema":{"type":"string"},"example":"ethereum"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"4-byte function selectors extracted from the contract dispatcher (DUP1 PUSH4 <sel> EQ pattern). Resolve names via a 4-byte signature directory. Proxies and unusual dispatchers may expose fewer.","chain":"ethereum","count":5,"source":"public JSON-RPC (publicnode) + local EVM decode","address":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","selectors":["0x3659cfe6","0x4f1ef286","0x5c60da1b","0x8f283970","0xf851a440"]},"meta":{"timestamp":"2026-06-14T08:04:12.384Z","request_id":"48e98237-2950-467f-8547-bf06ae8672e5"},"status":"ok","message":"Selectors retrieved successfully","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Service metadata, supported chains & live sample","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"chains":["ethereum","base","arbitrum","optimism","bsc","polygon","avalanche","gnosis","fantom","linea","scroll","blast"],"sample":{"chain":"ethereum","selectors_found":5},"source":"public JSON-RPC nodes (publicnode.com) via eth_getCode; EVM disassembly computed locally","service":"bytecode-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/bytecode":"Deployed runtime bytecode of a contract (chain, address).","GET /v1/selectors":"4-byte function selectors from the contract dispatcher (chain, address).","GET /v1/disassemble":"Full opcode disassembly, paged (chain, address, limit, offset)."},"description":"Fetch any contract's deployed EVM bytecode live via public JSON-RPC, disassemble it into opcodes, and extract its 4-byte function selectors — works on verified AND unverified contracts. The reverse-engineering layer for auditors, MEV searchers and security tools. Live, short cache only.","upstream_status":"ok"},"meta":{"timestamp":"2026-06-14T08:04:12.463Z","request_id":"9294c2c6-a8b7-43f7-9002-c6778cfa2107"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":4200,"rps_limit":3,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1290,"monthly_call_quota":98000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":4200,"monthly_call_quota":640000,"rps_limit":20,"hard_limit":true},{"slug":"business","name":"Business","price_cents_month":12500,"monthly_call_quota":4400000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/bytecode-api"}