openapi: 3.1.0 info: title: BscScan Accounts Logs API version: 1.0.0 description: BscScan is the leading block explorer and analytics platform for BNB Smart Chain (BSC), providing a REST API for querying transactions, token transfers, smart contract ABIs, gas prices, BEP-20 token information, and on-chain statistics. API subscriptions are unified under the Etherscan V2 platform, enabling access to 60+ EVM chains via a single API key using the chainid parameter (BSC chainid=56). license: name: UNLICENSED url: https://docs.bscscan.com/ servers: - url: https://api.bscscan.com/v2/api description: BscScan BNB Smart Chain Mainnet (Etherscan V2, chainid=56) - url: https://api-testnet.bscscan.com/api description: BscScan BNB Smart Chain Testnet security: - apiKeyAuth: [] tags: - name: Logs paths: /?module=logs&action=getLogs: get: operationId: get-event-logs-by-address externalDocs: url: https://docs.bscscan.com/api-endpoints/logs#get-event-logs-by-address summary: Get Event Logs by Address description: Returns the event logs from an address, with optional filtering by block range. tags: - Logs parameters: - in: query name: address schema: $ref: '#/components/schemas/AddressHash' required: true example: '0xbd3531da5cf5857e7cfaa92426877b022e612cf8' - in: query name: fromBlock schema: $ref: '#/components/schemas/IntegerMin0' required: true example: '12878196' - in: query name: toBlock schema: $ref: '#/components/schemas/IntegerMin0' required: true example: '12878196' - in: query name: page schema: $ref: '#/components/schemas/IntegerMin1' required: false example: '1' - in: query name: offset schema: $ref: '#/components/schemas/IntegerMin1Max1000' required: false example: '1000' responses: '200': description: Operation result. content: application/json: schema: oneOf: - allOf: - $ref: '#/components/schemas/ResponseOK' - $ref: '#/components/schemas/ResultArrayOfObjects' - $ref: '#/components/schemas/ResponseNOTOK' example: status: '1' message: OK result: - address: '0xbd3531da5cf5857e7cfaa92426877b022e612cf8' topics: - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' - '0x0000000000000000000000000000000000000000000000000000000000000000' - '0x000000000000000000000000c45a4b3b698f21f88687548e7f5a80df8b99d93d' - '0x00000000000000000000000000000000000000000000000000000000000000b5' data: 0x blockNumber: '0xc48174' timeStamp: '0x60f9ce56' gasPrice: '0x2e90edd000' gasUsed: '0x247205' logIndex: 0x transactionHash: '0x4ffd22d986913d33927a392fe4319bcd2b62f3afe1c15a2c59f77fc2cc4c20a9' transactionIndex: 0x - address: '0xbd3531da5cf5857e7cfaa92426877b022e612cf8' topics: - '0x645f26e653c951cec836533f8fe0616d301c20a17153debc17d7c3dbe4f32b28' - '0x00000000000000000000000000000000000000000000000000000000000000b5' data: 0x blockNumber: '0xc48174' timeStamp: '0x60f9ce56' gasPrice: '0x2e90edd000' gasUsed: '0x247205' logIndex: '0x1' transactionHash: '0x4ffd22d986913d33927a392fe4319bcd2b62f3afe1c15a2c59f77fc2cc4c20a9' transactionIndex: 0x /?module=logs&action=getLogs&get-event-logs-by-topics: get: operationId: get-event-logs-by-topics externalDocs: url: https://docs.bscscan.com/api-endpoints/logs#get-event-logs-by-topics summary: Get Event Logs by Topics description: Returns the events log in a block range, filtered by topics. tags: - Logs parameters: - in: query name: fromBlock schema: $ref: '#/components/schemas/IntegerMin0' required: true example: '12878196' - in: query name: toBlock schema: $ref: '#/components/schemas/IntegerMin0' required: true example: '12879196' - in: query name: topic schema: $ref: '#/components/schemas/Topic' required: true example: '' - in: query name: topicOperator schema: $ref: '#/components/schemas/TopicOperator' required: false example: '' - in: query name: page schema: $ref: '#/components/schemas/IntegerMin1' required: false example: '1' - in: query name: offset schema: $ref: '#/components/schemas/IntegerMin1Max1000' required: false example: '1000' responses: '200': description: Operation result. content: application/json: schema: oneOf: - allOf: - $ref: '#/components/schemas/ResponseOK' - $ref: '#/components/schemas/ResultArrayOfObjects' - $ref: '#/components/schemas/ResponseNOTOK' example: status: '1' message: OK result: - address: '0xbd3531da5cf5857e7cfaa92426877b022e612cf8' topics: - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' - '0x0000000000000000000000000000000000000000000000000000000000000000' - '0x000000000000000000000000c45a4b3b698f21f88687548e7f5a80df8b99d93d' - '0x00000000000000000000000000000000000000000000000000000000000000b5' data: 0x blockNumber: '0xc48174' timeStamp: '0x60f9ce56' gasPrice: '0x2e90edd000' gasUsed: '0x247205' logIndex: 0x transactionHash: '0x4ffd22d986913d33927a392fe4319bcd2b62f3afe1c15a2c59f77fc2cc4c20a9' transactionIndex: 0x - address: '0xbd3531da5cf5857e7cfaa92426877b022e612cf8' topics: - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' - '0x0000000000000000000000000000000000000000000000000000000000000000' - '0x000000000000000000000000c45a4b3b698f21f88687548e7f5a80df8b99d93d' - '0x00000000000000000000000000000000000000000000000000000000000000b6' data: 0x blockNumber: '0xc48174' timeStamp: '0x60f9ce56' gasPrice: '0x2e90edd000' gasUsed: '0x247205' logIndex: '0x2' transactionHash: '0x4ffd22d986913d33927a392fe4319bcd2b62f3afe1c15a2c59f77fc2cc4c20a9' transactionIndex: 0x /?module=logs&action=getLogs&get-event-logs-by-address-filtered-by-topics: get: operationId: get-event-logs-by-address-filtered-by-topics externalDocs: url: https://docs.bscscan.com/api-endpoints/logs#get-event-logs-by-address-filtered-by-topics summary: Get Event Logs by Address filtered by Topics description: Returns the event logs from an address, filtered by topics and block range. tags: - Logs parameters: - in: query name: fromBlock schema: $ref: '#/components/schemas/IntegerMin0' required: true example: '15073139' - in: query name: toBlock schema: $ref: '#/components/schemas/IntegerMin0' required: true example: '15074139' - in: query name: address schema: $ref: '#/components/schemas/AddressHash' required: true example: '0x59728544b08ab483533076417fbbb2fd0b17ce3a' - in: query name: topic schema: $ref: '#/components/schemas/Topic' required: true example: '' - in: query name: topicOperator schema: $ref: '#/components/schemas/TopicOperator' required: false example: '' - in: query name: page schema: $ref: '#/components/schemas/IntegerMin1' required: false example: '1' - in: query name: offset schema: $ref: '#/components/schemas/IntegerMin1Max1000' required: false example: '1000' responses: '200': description: Operation result. content: application/json: schema: oneOf: - allOf: - $ref: '#/components/schemas/ResponseOK' - $ref: '#/components/schemas/ResultArrayOfObjects' - $ref: '#/components/schemas/ResponseNOTOK' example: status: '1' message: OK result: - address: '0x59728544b08ab483533076417fbbb2fd0b17ce3a' topics: - '0x27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d' - '0x00000000000000000000000023581767a106ae21c074b2276d25e5c3e136a68b' - '0x000000000000000000000000000000000000000000000000000000000000236d' - '0x000000000000000000000000c8a5592031f93debea5d9e67a396944ee01bb2ca' data: '0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000f207539952d0000' blockNumber: '0xe60262' timeStamp: '0x62c26caf' gasPrice: '0x5e2d742c9' gasUsed: '0xfb7f8' logIndex: '0x4b' transactionHash: '0x26fe1a0a403fd44ef11ee72f3b4ceff590b6ea533684cb279cb4242be463304c' transactionIndex: '0x39' - address: '0x59728544b08ab483533076417fbbb2fd0b17ce3a' topics: - '0x27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d' - '0x00000000000000000000000023581767a106ae21c074b2276d25e5c3e136a68b' - '0x0000000000000000000000000000000000000000000000000000000000002261' - '0x000000000000000000000000c8a5592031f93debea5d9e67a396944ee01bb2ca' data: '0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000' blockNumber: '0xe6035b' timeStamp: '0x62c27ab1' gasPrice: '0x27e523173' gasUsed: '0x3b86e' logIndex: '0x1d7' transactionHash: '0x3a299413cf2c91e376e542efcf3fc308c562da79af6e992401217cc6208c7f74' transactionIndex: '0x92' components: schemas: ResponseNOTOK: type: object properties: status: type: string enum: - '0' message: type: string pattern: ^NOTOK(-.*)?$ examples: - NOTOK - NOTOK-Missing/Invalid API Key, rate limit of 1/5sec applied result: type: string required: - status - message - result IntegerMin1Max1000: type: integer format: int32 minimum: 1 maximum: 1000 ResultArrayOfObjects: type: object properties: result: $ref: '#/components/schemas/ArrayOfObjects' Topic: type: string enum: - topic0 - topic1 - topic2 - topic3 ResponseOK: type: object properties: status: type: string enum: - '1' message: type: string enum: - OK result: description: call result required: - status - message - result AddressHash: type: string pattern: 0x[A-Fa-f0-9]{40} example: '0x01234567890abcdef01234567890abcdef012345' TopicOperator: type: string enum: - and - or ArrayOfObjects: type: array items: type: object additionalProperties: true IntegerMin0: type: integer minimum: 0 IntegerMin1: type: integer minimum: 1 securitySchemes: apiKeyAuth: type: apiKey in: query name: apikey externalDocs: url: https://docs.bscscan.com/