OstiumBuilder Service
API ReferenceHTTP APIExchange Operations

Exchange: Modify

Modify limit orders or update TP/SL on open trades.

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/exchange/modify

Builds an unsigned transaction to modify a limit order or update TP/SL on an open trade.

Headers

HeaderRequiredDescription
X-Trader-AddressYesTrader wallet address.
X-API-KeyNoDelegated mode (delegate wallet must be verified).
Content-TypeYesapplication/json or text/plain (JSON string).

Request Body

FieldTypeRequiredDescription
anumberYesPair index.
inumberYesOrder or trade index.
pstringNoNew limit order price (numeric string > 0).
tpstringNoNew take-profit price ("0" resets to default).
slstringNoNew stop-loss price ("0" resets to default).

Constraints

  • At least one of p, tp, or sl is required.
  • If p is omitted, only one of tp or sl may be set per request.
  • Delegated mode supports one modify action per request.

Response Body (unsigned)

FieldTypeRequiredDescription
transactionsUnsignedTransaction[]YesOne unsigned transaction.

Response Body (delegated)

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

Example Request

curl -X POST https://builder.ostiscan.xyz/v1/exchange/modify \
  -H "Content-Type: application/json" \
  -H "X-Trader-Address: 0xYourWallet" \
  -d '{"a":0,"i":0,"tp":"46000"}'

Response (200, unsigned)

{
  "transactions": [
    { "to": "0x...", "data": "0x...", "value": "0", "from": "0xYourWallet" }
  ]
}

Response (200, delegated)

{
  "txHash": "0x...",
  "smartAccountAddress": "0x..."
}

Errors

See /docs/errors.

On this page