Batch Send
Nozomi sendBatch Client Integration Guide
sendBatch Client Integration Guide1. What sendBatch does
sendBatch doesPOST /api/sendBatch lets you submit multiple raw Solana transactions in one request using a compact binary format (no base64).
Use this when you already have serialized tx bytes and want to reduce per-request overhead.
2. Endpoint and auth
Method:
POSTPath:
/api/sendBatchRequired query param:
c=<client_id>Recommended header:
Content-Type: application/octet-stream
Example URL:
https://YOUR_HOST/api/sendBatch?c=YOUR_CLIENT_ID
3. Binary wire format
Body is a concatenation of entries:
[len_hi][len_lo][tx_bytes...] [len_hi][len_lo][tx_bytes...] ...
len_hi,len_lo: unsigned big-endianu16lengthlen > 0tx_bytes: raw serialized transaction bytes for that entry
No separators and no JSON wrapper are used.
4. Limits and validation
Max entries per request:
16Max tx size per entry:
1232bytesMin tx size accepted:
66bytesMax total request body:
19,744bytes (16 * (1232 + 2))
Requests violating framing, count, or parsing rules are rejected.
5. Response behavior (important)
sendBatch is stream-processed.
That means entries are handled in order as bytes arrive. If entry N fails:
entries
1..N-1may already be accepted and forwardedthere is no rollback
response is an error for the overall request
Your client should treat this endpoint as partially successful on some failures.
6. HTTP status codes and response bodies
All responses are plain text (text/plain).
200 OK+ empty body Full request accepted.400 Bad Request+Bad Request\nFraming/format errors (invalid length prefixes, truncated payload, too many entries, empty batch, etc.).400 Bad Request+Transaction too large\nAt least one tx exceeded allowed size, or body exceeded max cap.400 Bad Request+Failed to parse transaction\nTransaction bytes failed metadata/parse checks.400 Bad Request+Malformed transaction string\nTransaction payload is malformed (for example, too small).400 Bad Request+Insufficient tip\nTx did not satisfy configured tip policy.401 Unauthorized+Unauthorized\nMissing/invalidcclient id.429 Too Many Requests+Too Many Requests\nRate limit exceeded.405 Method Not Allowed+Used HTTP Method is not allowed. POST is required\nNon-POST usage.500 Internal Server Error+Internal Server Error\nInternal forwarding/queue failure.
7. JavaScript reference implementation
8. curl example
9. Production recommendations
Keep batch sizes small enough for your retry strategy (for example 2-8 txs).
Track tx signatures client-side before send, so you can reconcile partial success.
On non-
200responses, do not assume the whole batch failed.Make retries idempotent at the tx/signature level in your system.
Log both HTTP status and response text; response text is meaningful for error class.
10. CORS/preflight
OPTIONSis supported.Response headers include:
Access-Control-Allow-Origin: *Access-Control-Allow-Methods: POST, GET, OPTIONSAccess-Control-Allow-Headers: Content-Type
Last updated

