Delta orders are server-built: you don’t compose EIP-712 typed data locally.
getDeltaPrice returns a recommended route plus alternatives, buildDeltaOrder returns ready-to-sign typed data, and order history is paginated.When to use this
- The user shouldn’t pay gas, or doesn’t have gas on the source chain.
- You want MEV protection. Orders fill via private auction, not the public mempool.
- You want one signed intent to settle crosschain. See Crosschain Delta.
How it’s exposed
Delta lives at two layers in the SDK:sdk.delta.*is the pre-bound bag attached toconstructSimpleSDK/constructFullSDK:sdk.delta.getDeltaPrice,sdk.delta.submitDeltaOrder,sdk.delta.signDeltaOrder, etc. This is what most consumers use.- The bare
construct*functions and types are exported at the package root for advanced wiring (e.g.,constructPartialSDK) and type annotations:constructBuildDeltaOrder,constructSubmitDeltaOrder,constructAllDeltaOrdersHandlers, and types likeDeltaPrice,DeltaRoute,BuiltDeltaOrder,DeltaAuction,BridgeRoute.
The flow
Get a Delta price
Call
sdk.delta.getDeltaPrice with source/destination tokens, amount, decimals, and partner. The response includes the recommended route plus alternatives and the contract spender to approve.Approve the source token (or sign a Permit)
Call
sdk.delta.approveTokenForDelta(amount, srcToken), or sign a Permit / Permit2 message with the Delta contract (returned in price.spender) as the verifying contract. Native tokens skip this step.Build, sign, and post the order
Either call the one-shot orchestrator
sdk.delta.submitDeltaOrder, or run the three steps yourself (buildDeltaOrder → signDeltaOrder → postDeltaOrder) when you need control over signing.One-call submit
submitDeltaOrder runs build → sign → post in a single call. This is the recommended path for most flows.
Split flow
Use the three-step flow when you need to customize signing: for example, a hardware wallet that prompts on each call, a multisig that signs asynchronously, or batched signing across orders.buildDeltaOrder returns { toSign, orderHash }. The server has already composed the EIP-712 typed data, and signDeltaOrder wraps your contract caller’s signTypedData to produce the signature. It’s generic across order families, so the market, limit, and TWAP flows all sign through the same call.
If your signer is a smart contract (e.g., a multisig or 4337 wallet) that can’t produce an off-chain EIP-712 signature, use sdk.delta.preSignDeltaOrder to register the order hash on-chain instead.
Poll for execution
OrderHelpers.checks.isExecutedAuction returns true only when same-chain orders show status === "COMPLETED", and crosschain orders also have their destination-chain leg filled.
List orders
getDeltaOrders returns a paginated list filtered by user, chain, status, and order type:
DeltaAuction<T>, generic over onChainOrderType. It may report 'FillableOrder' for a partiallyFillable Standard order; treat it exactly like 'Order' (identical shape). Use type: "LIMIT" to filter for limit orders.
Partner fee
Passpartner (and optionally partnerAddress, partnerFeeBps, partnerTakesSurplus) to getDeltaPrice, submitDeltaOrder, buildDeltaOrder, and postDeltaOrder. The SDK sends these directly to the server, which resolves and validates the fee in one call, so there’s no local getPartnerFee round-trip.
Cancel an order
Crosschain Delta
PassdestChainId to getDeltaPrice to settle on a different chain than the source. The returned route is bridge-aware; submitting the order is identical to same-chain. See Crosschain Delta for the full design and getBridgeRoutes for advanced route inspection.
Other Delta products
Limit orders and TWAP are Delta orders too. They reuse this exact build → sign → post → poll flow with a couple of extra fields:- Limit orders: a Delta order with a target-price constraint and
type: "LIMIT". - TWAP is a Delta order split into time-weighted slices, built with
buildTWAPDeltaOrder/submitTWAPDeltaOrder.
Migrate from V1 to V2
Only relevant if you’re upgrading an existing integration from an older SDK version. New integrations can ignore this section; everything above already uses the current API.
sdk.delta.* namespace and method names as V1. What changes is that orders are now server-built (you no longer compose EIP-712 typed data locally), pricing is route-based, and order history is paginated. The on-chain contracts, approval flow, and signature format are unchanged.
Pricing
getDeltaPrice takes the same params, but the response shape changes:
DeltaPrice { srcAmount, destAmount, partner, partnerFee, destToken, ... }. V2 returns DeltaPrice { route, alternatives, side, partner: { name, feePercent }, spender }. Swap details now live under price.route, and alternatives lets users pick a different bridge.
One-call submit
Split flow (build → sign → post)
buildDeltaOrder now returns { toSign, orderHash } from the server (V1 returned SignableDeltaOrderData with a locally-composed .data). signDeltaOrder is unchanged and is generic across the market, limit, and TWAP flows.
Listing orders
DeltaAuction[]. V2 returns a paginated { data, total, page, limit, hasMore } envelope, and userAddress is required.
Cancelling
Bridge inspection
getBridgeRoutes returns a flat routes[] array instead of V1’s nested srcChainId → destChainId → tokens[] map.
What stays the same
sdk.delta.*— same namespace and method names.approveTokenForDelta,getDeltaContract,preSignDeltaOrder, andgetPartnerFeeare unchanged.- Type names (
DeltaPrice,DeltaAuction,BuiltDeltaOrder) are still imported bare from the package root — only their shapes changed. - The on-chain order struct and signature format are identical, so V2 is just a different way to assemble the same on-chain payload.
Related pages
- Market — the other swap execution path (user-submitted transactions).
- Limit orders: a Delta order with a target price.
- TWAP, a Delta order split into scheduled slices.
- Why Delta. The protocol design.
- Monetize — partner-fee fields.
- API reference → Delta covers the HTTP endpoints.