Skip to main content
POST
/
v2
/
delta
/
orders
/
build
Build a signable Delta V2 order from a route
curl --request POST \
  --url https://api.velora.xyz/v2/delta/orders/build \
  --header 'Content-Type: application/json' \
  --data '
{
  "route": {
    "origin": {
      "input": {
        "token": {
          "chainId": 123,
          "address": "<string>"
        },
        "amount": "<string>",
        "amountUSD": "<string>"
      },
      "output": {
        "token": {
          "chainId": 123,
          "address": "<string>"
        },
        "amount": "<string>",
        "amountUSD": "<string>"
      }
    },
    "destination": {
      "input": {
        "token": {
          "chainId": 123,
          "address": "<string>"
        },
        "amount": "<string>",
        "amountUSD": "<string>"
      },
      "output": {
        "token": {
          "chainId": 123,
          "address": "<string>"
        },
        "amount": "<string>",
        "amountUSD": "<string>"
      }
    },
    "bridge": {
      "protocol": "<string>",
      "estimatedTimeMs": 123,
      "tags": [],
      "contractParams": {
        "protocolSelector": "<string>",
        "outputToken": "<string>",
        "scalingFactor": 123,
        "protocolData": "<string>"
      }
    },
    "fees": {
      "gas": {
        "token": {
          "chainId": 123,
          "address": "<string>"
        },
        "amount": "<string>",
        "amountUSD": "<string>"
      },
      "bridge": [
        {
          "token": {
            "chainId": 123,
            "address": "<string>"
          },
          "amount": "<string>",
          "amountUSD": "<string>"
        }
      ]
    }
  },
  "owner": "<string>",
  "deadline": 123,
  "side": "SELL",
  "beneficiary": "<string>",
  "nonce": "<string>",
  "permit": "<string>",
  "slippage": 100,
  "limitAmount": "<string>",
  "metadata": "0x",
  "partiallyFillable": false,
  "partnerAddress": "<string>",
  "partnerFeeBps": 0,
  "partnerTakesSurplus": false,
  "capSurplus": true,
  "orderType": "Order",
  "handler": "<string>",
  "data": "<string>",
  "strategy": "<string>",
  "useShares": true,
  "interval": 61,
  "numSlices": 3,
  "totalSrcAmount": "<string>",
  "totalDestAmount": "<string>",
  "maxSrcAmount": "<string>"
}
'
{
  "toSign": {
    "domain": {
      "name": "<string>",
      "version": "<string>",
      "chainId": 123,
      "verifyingContract": "<string>"
    },
    "types": {},
    "value": {}
  },
  "orderHash": "<string>"
}

Body

application/json
route
object
required

Pass the unmodified route from GET /v2/delta/prices. The chain ID is derived from the route.

owner
string
required
deadline
integer
required

Required. Unix seconds after which the order is unfillable.

side
enum<string>
default:SELL
Available options:
SELL,
BUY
beneficiary
string

Defaults to owner.

nonce
string
permit
string

Permit / Permit2 payload, or 0x if approved on-chain.

slippage
integer
default:100

Slippage in basis points.

Required range: 0 <= x <= 10000
limitAmount
string

Override the SDK-computed destAmount (SELL) / srcAmount (BUY).

metadata
string
default:0x
partiallyFillable
boolean
default:false
partnerAddress
string

Defaults to zero address.

partnerFeeBps
integer
default:0
Required range: 0 <= x <= 200
partnerTakesSurplus
boolean
default:false
capSurplus
boolean
default:true
orderType
enum<string>
default:Order
Available options:
Order,
ProductiveOrder,
ExternalOrder,
TWAPOrder,
TWAPBuyOrder
handler
string

Required for ExternalOrder.

data
string

Required for ExternalOrder. Handler-specific encoded bytes.

strategy
string

Required for ProductiveOrder.

useShares
boolean
default:true
interval
integer

Required for TWAP. Slice interval in seconds.

Required range: x >= 60
numSlices
integer

Required for TWAP.

Required range: x >= 2
totalSrcAmount
string

Required for TWAPOrder. route.origin.input.amount must equal floor(totalSrcAmount / numSlices).

totalDestAmount
string

Required for TWAPBuyOrder. route.origin.output.amount must equal floor(totalDestAmount / numSlices).

maxSrcAmount
string

Required for TWAPBuyOrder. Maximum total source the user is willing to spend.

Response

EIP-712 typed data ready to sign.

toSign
object
orderHash
string

EIP-712 hash. Use for status lookup before the order id is assigned.

Last modified on June 11, 2026