OstiumBuilder Service
API ReferenceHTTP API

HTTP Overview

Base path, request format, common headers, and response shapes.

Alpha Version

The Ostium Builder Service is in Alpha. API endpoints, specifications, and builder URLs may change without notice. Use with caution in production environments.

Base Path

All HTTP endpoints are served under /v1.

Content Types

Requests must be JSON and may use either header:

  • Content-Type: application/json
  • Content-Type: text/plain (JSON string body)

Authentication Headers

  • X-Trader-Address (required): trader wallet address
  • X-API-Key (optional): required for delegated mode

Header matching is case-insensitive.

Data Types

  • Prices and USD amounts are strings to preserve precision (example: "42500.25").
  • Leverage is a string (example: "10" for 10x).
  • Indexes are integers (a, i, t, o).

Trader Address Fallback

For HTTP only, you may pass the trader address as a query param:

  • ?address=0x...

Headers are preferred and always take priority when both are present.

Request ID

You may send X-Request-ID to tag a request. If omitted, the service generates one. The response always includes the request ID as X-Request-ID.

Rate Limits

HTTP requests are rate-limited per IP. When limits apply, the response includes:

  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-RateLimit-Reset (seconds until reset)
  • Retry-After (on 429)

See /docs/rate-limits for configuration details.

Common Response Shapes

Unsigned Transactions

Returned by default (non-delegated mode).

FieldTypeRequiredDescription
transactionsUnsignedTransaction[]YesOne or more unsigned transactions to sign and submit.

UnsignedTransaction

FieldTypeRequiredDescription
tostringYesContract address.
datastringYesABI-encoded calldata.
valuestringYesETH value (usually "0").
fromstringNoTrader address (when provided by the service).

Delegated Mode Response

Returned when X-API-Key is present and the delegate wallet is verified.

FieldTypeRequiredDescription
txHashstringYesTransaction hash of the delegated action.
smartAccountAddressstringYesSmart account used for delegation.

Error Response (HTTP)

FieldTypeRequiredDescription
errorstringYesHuman-readable error message.
codenumberYesHTTP status code.
errorCodestringYesMachine-readable error code.
detailsobjectNoExtra context (e.g., validation errors).

Common errorCode values:

  • VALIDATION_ERROR
  • INVALID_REQUEST
  • INVALID_ACTION
  • INVALID_ADDRESS
  • NOT_FOUND
  • UNAUTHORIZED
  • RATE_LIMIT_EXCEEDED
  • INTERNAL_ERROR
  • SERVICE_UNAVAILABLE

See /docs/errors for the full error envelopes.

OpenAPI

The service exposes its OpenAPI spec:

On this page