Skip to main content
POST
Execute Batch Transaction

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 the proposalApproveTx 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 either burn 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

Example Request

Response Body

On success, the API returns a JSON object with the following fields:

Execution Result Object

Successful Execution Object

Example Response (Success)

Example Response (Partial Failure)

Execution Process

  1. Proposal Broadcast: The signed proposal transaction is broadcast to approve the batch execution.
  2. Sequential Processing: Each pipeline transaction in the batch is executed sequentially using Solana multisig batch execute instructions.
  3. Chunked Execution: Transactions are processed in chunks of 4 for optimal performance and reliability.
  4. Jito Bundle Integration: Each chunk is executed as a Jito bundle to ensure atomic execution and better transaction reliability.
  5. Status Tracking: The system tracks the status of each pipeline and updates the database with execution results.
  6. Resilient Handling: If a chunk fails, the system continues processing remaining chunks, providing partial success results.

Important Notes

  1. Prerequisites: Before calling this endpoint, you must:
    • Have called /flywheel/batch/init successfully
    • Signed the returned proposalApproveTx with your registered wallet address
    • Received the required approvals from company and project approvers
  2. Execution Order: Pipeline transactions are executed in the order they were submitted in the batch init call.
  3. Partial Success: If some transactions succeed and others fail, you’ll receive detailed results showing which transactions completed successfully.
  4. Transaction Finality: All returned transaction hashes represent confirmed transactions on the Solana blockchain.
  5. 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.

Example Error Response

Workflow Summary

  1. Call /flywheel/batch/init with your pipelines
  2. Sign the returned proposalApproveTx with your registered wallet
  3. Wait for required approvals (company + project approver)
  4. Call /flywheel/batch/execute with the batchId and signed transaction
  5. Monitor execution results and handle any partial failures as needed

Authorizations

x-believe-api-key
string
header
required

Headers

x-idempotency-key
string<uuid>
required

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.

batchId
string<uuid>
required

The unique identifier (UUID) of the batch to execute.

signedTx
string
required

Base64-encoded signed transaction (the proposalApproveTx from batch init, signed by you).

Response

Batch execution completed (may include partial failures).

batchId
string
required

The batch ID (UUID) that was executed.

result
object
required