Skip to main content

What This Does

  • Sends transactions with low latency
  • Tracks confirmation status in real time
  • Automatically retries unconfirmed transactions
  • Returns parsed transaction data and Raptor events
  • Measures send → confirm latency

Send a Transaction

Send a signed Solana transaction. Endpoint POST /send-transaction Request Body
{
  "transaction": "base64-encoded-transaction"
}
Response
{
  "signature": "4vJ9JU1bJJE96FWSJKvHsmmFADCg4gpZQff4P3bkLKi",
  "signature_base64": "RXNzaWduYXR1cmU=",
  "success": true
}
Notes
  • Returns immediately after accepting the transaction
  • Sending and retrying happens in the background
  • Transactions are retried for up to 30 seconds or until confirmed

Track a Transaction

Check the status of a transaction sent via /send-transaction. Endpoints
  • GET /transaction/{signature}
The signature can be base58 or base64. Response (example)
{
  "signature": "4vJ9JU1bJJE96FWSJKvHsmmFADCg4gpZQff4P3bkLKi",
  "status": "confirmed",
  "slot": 250123456,
  "sent_at": 1703123456789,
  "confirmed_at": 1703123456795,
  "latency_ms": 6,
  "transaction": { ... },
  "events": [ ... ]
}

Status Values

  • pending – sent but not confirmed
  • confirmed – finalized on-chain
  • failed – transaction error
  • expired – not confirmed before timeout

Raptor Events

If the transaction interacts with the Raptor program, events are automatically parsed and returned. Supported Events
  • SwapEvent
  • SwapCompleteEvent
  • PlaceOrderEvent
  • FillOrderEvent
  • CancelOrderEvent
  • UpdateOrderEvent
Event Format
{
  "name": "SwapEvent",
  "data": "base64-encoded-data",
  "parsed": {
    "dex": 1,
    "amountIn": 1000000,
    "amountOut": 999000
  }
}

Examples

Send a Transaction

const response = await fetch('/send-transaction', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ transaction: signedTx })
});

const result = await response.json();
console.log(result.signature);

Poll for Confirmation

async function waitForConfirmation(signature) {
  for (let i = 0; i < 30; i++) {
    const res = await fetch(`/transaction/${signature}`);
    const tx = await res.json();

    if (tx.status === 'confirmed' || tx.status === 'failed') {
      return tx;
    }

    await new Promise(r => setTimeout(r, 1000));
  }

  throw new Error('Timeout');
}

Read Swap Results

const tx = await fetch(`/transaction/${signature}`).then(r => r.json());

for (const event of tx.events ?? []) {
  if (event.name === 'SwapEvent') {
    console.log(event.parsed.amountIn, '→', event.parsed.amountOut);
  }
}

Errors

CodeMeaning
400Invalid transaction
404Transaction not tracked
503Sender or tracking disabled
{
  "error": "Transaction not found",
  "code": 404
}