sap adrena build open long
sap_adrena_build_open_longBuild an unsigned transaction to open or increase a long perp position on Adrena only after policy, balance, oracle-readiness, and simulation checks pass. Returns transactionBase64 for local signing via sap_payments_finalize_transaction only when safeToApprove=true and approvalBlocked=false. If oracleReadiness.ready=false, simulationError, safeToApprove is not true, or approvalBlocked appears, do not show approval and do not call finalize.
SAP MCP execution guidance: Intent: hosted unsigned transaction builder. Pricing: paid builder; estimate first, then pay/build and finalize unsigned transactions locally when returned. Routing: paid hosted call; call sap_estimate_tool_cost first, then use sap_payments_call_paid_tool if the runtime cannot handle x402 natively. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Position owner wallet public key (base58). This is the fee payer and signer. | |
| leverage | Yes | Leverage multiplier (e.g. 3 = 3x). | |
| priceUsd | No | Optional limit price in USD. Omit for market order. | |
| principalToken | Yes | Asset to trade (long). Supported: JITOSOL, WBTC, BONK. | |
| collateralToken | Yes | Collateral token. Must match principal for longs. Supported: JITOSOL, WBTC, BONK. | |
| collateralAmount | Yes | Collateral amount in human-readable units (e.g. 10 = 10 JITOSOL). | |
| stopLossPriceUsd | No | Optional stop-loss price in USD. When provided, the policy engine treats this trade as having a stop loss. Omit to skip the SL requirement (if policy requires SL, this field must be present). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | MCP content blocks returned to the caller. | |
| isError | No | True when the tool result represents an application-level error. |