OstiumBuilder Service
API ReferenceHTTP APIAuth

Auth: Create

Create an API key and receive setup transactions.

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.

POST /v1/auth/create

Creates an API key and delegate wallet, then returns setup transactions.

Headers

HeaderRequiredDescription
X-Trader-AddressYesTrader wallet address.

Response Body

FieldTypeRequiredDescription
apiKeystringYesAPI key for delegated mode. Store securely.
smartAccountAddressstringYesSmart account address.
delegateApprovalTxUnsignedTransactionYesTransaction to delegate trading.
usdcApprovalRequiredbooleanYesWhether a USDC approval is needed.
usdcApprovalTxUnsignedTransactionNoUSDC approval transaction (nullable).
chainIdnumberYesChain ID (e.g., 42161).

UnsignedTransaction

FieldTypeRequiredDescription
tostringYesContract address.
datastringYesABI-encoded calldata.
valuestringYesETH value (usually "0").
fromstringNoTrader address.

Example

curl -X POST https://builder.ostiscan.xyz/v1/auth/create \
  -H "X-Trader-Address: 0xYourWallet"

Example Response

{
  "apiKey": "<store-this>",
  "smartAccountAddress": "0x...",
  "delegateApprovalTx": { "to": "0x...", "data": "0x...", "value": "0", "from": "0x..." },
  "usdcApprovalRequired": true,
  "usdcApprovalTx": { "to": "0x...", "data": "0x...", "value": "0", "from": "0x..." },
  "chainId": 42161
}

Notes

  • If usdcApprovalRequired is false, usdcApprovalTx is null.
  • If an active delegate wallet already exists for the trader, the request fails.

Errors

See /docs/errors.

On this page