Overview
The Execute Batch Transaction endpoint processes a signed batch transaction and executes all pipeline transactions within the batch. This endpoint should be called after theproposalApproveTx from batch init has been signed with your registered wallet address and approved by the required parties.
The endpoint processes transactions in chunks of 4 for optimal performance and uses Jito bundles to ensure reliable execution on Solana. It provides detailed results including successful executions, failures, and transaction hashes.
Authentication
This endpoint requires API key authentication. The API key must have eitherburn or airdrop scopes.
To authenticate, provide your API key in the x-believe-api-key request header.
Example:
Rate Limiting
Requests to this endpoint are rate-limited to 10 requests per minute per API key.Request Body
| Field | Type | Required | Description | 
|---|---|---|---|
| batchId | string | Yes | The unique identifier (UUID) of the batch to execute (returned from batch init). | 
| signedTx | string | Yes | Base64-encoded signed transaction (the proposalApproveTxfrom batch init, signed by you). | 
Example Request
Response Body
On success, the API returns a JSON object with the following fields:| Field | Type | Description | 
|---|---|---|
| batchId | string | The batch ID (UUID) that was executed. | 
| result | Object | Detailed execution results for all transactions in the batch. | 
Execution Result Object
| Field | Type | Description | 
|---|---|---|
| total | number | Total number of pipeline transactions in the batch. | 
| totalSuccessful | number | Number of pipeline transactions that executed successfully. | 
| totalFailed | number | Number of pipeline transactions that failed to execute. | 
| successfulExecutions | Array | Array of successful bundle executions with their details. | 
| failedOnTransactionIndex | number | (Optional) Transaction index where failure occurred. | 
| failedStartTransactionIndex | number | (Optional) Starting transaction index of the failed batch. | 
| failedTxMsg | string | (Optional) Error message describing the failure. | 
Successful Execution Object
| Field | Type | Description | 
|---|---|---|
| bundleId | string | Jito bundle ID (hex string) for this group of transactions. | 
| txHashes | Array | Array of Solana transaction signatures (base58 strings) for executed transactions. | 
Example Response (Success)
Example Response (Partial Failure)
Execution Process
- Proposal Broadcast: The signed proposal transaction is broadcast to approve the batch execution.
- Sequential Processing: Each pipeline transaction in the batch is executed sequentially using Solana multisig batch execute instructions.
- Chunked Execution: Transactions are processed in chunks of 4 for optimal performance and reliability.
- Jito Bundle Integration: Each chunk is executed as a Jito bundle to ensure atomic execution and better transaction reliability.
- Status Tracking: The system tracks the status of each pipeline and updates the database with execution results.
- Resilient Handling: If a chunk fails, the system continues processing remaining chunks, providing partial success results.
Important Notes
- 
Prerequisites: Before calling this endpoint, you must:
- Have called /flywheel/batch/initsuccessfully
- Signed the returned proposalApproveTxwith your registered wallet address
- Received the required approvals from company and project approvers
 
- Have called 
- Execution Order: Pipeline transactions are executed in the order they were submitted in the batch init call.
- Partial Success: If some transactions succeed and others fail, you’ll receive detailed results showing which transactions completed successfully.
- Transaction Finality: All returned transaction hashes represent confirmed transactions on the Solana blockchain.
- Jito Integration: The endpoint uses Jito bundles for execution, which may include tip transactions that don’t appear in your pipeline results.
Error Codes
The batch execute endpoint can return specific error codes related to the execution process.| Error Code | Status | Description | 
|---|---|---|
| ERR_TOKEN_NOT_FOUND | 404 | The token associated with the API key could not be found. | 
| ERR_KEY_NOT_FOUND | 404 | The API key could not be found or is invalid. | 
| ERR_FLYWHEEL_NOT_FOUND | 404 | No flywheel is associated with the provided API key. | 
| ERR_BATCH_EXECUTE_FAILED | 500 | Failed to execute the batch. Check the response for detailed failure information. | 
Example Error Response
Workflow Summary
- Call /flywheel/batch/initwith your pipelines
- Sign the returned proposalApproveTxwith your registered wallet
- Wait for required approvals (company + project approver)
- Call /flywheel/batch/executewith thebatchIdand signed transaction
- Monitor execution results and handle any partial failures as needed
Authorizations
Headers
A unique key generated by the client to ensure a request is processed at most once.
Body
application/json
Batch execution details with signed transaction.