B3 Contracts API
The Contracts API from B3 — 3 operation(s) for contracts.
The Contracts API from B3 — 3 operation(s) for contracts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/b3-contracts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: B3 Contracts API
version: '1.0'
description: 'Operations tagged Contracts across 2 of this provider''s published API definitions: b3-b3os-workflow-openapi.json, b3-b3os-workflow-openapi_2.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Contracts
paths:
/v1/contracts:
get:
description: List contract projects for the organization
parameters:
- description: Limit (default 20)
in: query
name: limit
schema:
type: integer
- description: Offset (default 0)
in: query
name: offset
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListContractProjectsSlimSuccessResponse'
description: OK
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Internal Server Error
tags:
- Contracts
summary: Get contracts
x-summary-source: derived
operationId: getV1Contracts
x-operation-id-source: derived
/v1/contracts/{id}/verify:
post:
description: Verify a deployed contract's source code on block explorer (Etherscan, Basescan, etc.)
parameters:
- description: Contract project ID
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
oneOf:
- type: object
- $ref: '#/components/schemas/VerifyContractParams'
summary: request
description: Verification parameters
description: Verification parameters
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyContractResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Not Found
tags:
- Contracts
summary: Create contracts by id verify
x-summary-source: derived
operationId: postV1ContractsByIdVerify
x-operation-id-source: derived
/v1/contract/projects/{id}/stream:
get:
description: SSE endpoint for real-time contract status updates (test results, audit, etc.)
parameters:
- description: Contract Project ID
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
text/event-stream:
schema:
type: string
description: SSE stream with contract events
'400':
content:
text/event-stream:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Bad Request
'403':
content:
text/event-stream:
schema:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
description: Forbidden
summary: Stream contract project events
tags:
- Contracts
operationId: getV1ContractProjectsByIdStream
x-operation-id-source: derived
components:
schemas:
ContractProjectListItem:
properties:
allDeployments:
items:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.DeployResult'
type: array
uniqueItems: false
createdAt:
type: string
currentStep:
type: integer
deployments:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.Deployments'
id:
type: string
name:
type: string
solVersion:
type: string
status:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.ContractProjectStatus'
testResults:
$ref: '#/components/schemas/ContractTestSummary'
updatedAt:
type: string
type: object
github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.ContractProjectStatus:
enum:
- planned
- generating
- code_generated
- testing
- tested
- auditing
- audited
- deploying
- testnet_deployed
- mainnet_deployed
- failed
type: string
x-enum-comments:
ContractStatusAuditing: Intermediate status during security audit
ContractStatusDeploying: Intermediate status during deployment
ContractStatusGenerating: Intermediate status during code generation
ContractStatusTesting: Intermediate status during test execution
x-enum-varnames:
- ContractStatusPlanned
- ContractStatusGenerating
- ContractStatusCodeGenerated
- ContractStatusTesting
- ContractStatusTested
- ContractStatusAuditing
- ContractStatusAudited
- ContractStatusDeploying
- ContractStatusTestnetDeployed
- ContractStatusMainnetDeployed
- ContractStatusFailed
ContractTestSummary:
properties:
failed:
type: integer
passed:
type: integer
total:
type: integer
type: object
VerifyContractResponse:
properties:
contractAddress:
type: string
explorerUrl:
type: string
message:
type: string
status:
example: verified
type: string
type: object
github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.VerificationStatus:
description: Verification status
enum:
- pending
- verified
- failed
type: string
x-enum-varnames:
- VerificationStatusPending
- VerificationStatusVerified
- VerificationStatusFailed
github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse:
properties:
code:
type: integer
details:
items: {}
type: array
uniqueItems: false
message:
type: string
requestId:
type: string
type: object
PaginatedData-schemas_ContractProjectListItem:
properties:
hasMore:
type: boolean
items:
items:
$ref: '#/components/schemas/ContractProjectListItem'
type: array
uniqueItems: false
limit:
type: integer
offset:
type: integer
type: object
github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.DeployResult:
properties:
address:
type: string
blockNumber:
type: integer
chainId:
type: integer
deployedAt:
type: string
deploymentMode:
description: standard, create2, or create3
type: string
gasUsed:
type: integer
isDeterministic:
description: Whether CREATE2/CREATE3 was used
type: boolean
networkType:
description: mainnet or testnet
type: string
predictedAddress:
description: Pre-computed address for deterministic deployments
type: string
salt:
description: CREATE2/CREATE3 salt for deterministic address
type: string
txHash:
type: string
verificationStatus:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.VerificationStatus'
verificationUrl:
description: URL to view verified contract on block explorer
type: string
verified:
description: Whether contract source is verified on block explorer
type: boolean
type: object
ListContractProjectsSlimSuccessResponse:
properties:
code:
example: 0
type: integer
data:
$ref: '#/components/schemas/PaginatedData-schemas_ContractProjectListItem'
message:
example: successfully
type: string
requestId:
type: string
type: object
github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.Deployments:
additionalProperties:
$ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.DeployResult'
description: 'Deployments is populated from the contract_deployments table, NOT from a DB column.
Kept for backward-compatible JSON serialization in API responses.'
type: object
VerifyContractParams:
properties:
chainId:
type: integer
contractAddress:
description: Optional - uses address from deployment if not provided
type: string
required:
- chainId
type: object
x-refined-from:
- b3-b3os-workflow-openapi.json
- b3-b3os-workflow-openapi_2.json