> ## Documentation Index
> Fetch the complete documentation index at: https://digraphsas-docs-pricing.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a Delta order

> Server-built EIP-712 typed data ready to sign. Pass the route from /v2/delta/prices verbatim.



## OpenAPI

````yaml api-reference/specs/delta-v2.json POST /v2/delta/orders/build
openapi: 3.0.3
info:
  title: Velora Delta API V2
  version: 2.0.0
  description: >-
    Velora Delta API V2 — server-built EIP-712 orders, route-based pricing with
    alternatives, paginated order history, and a unified status model. Ships
    alongside Delta V1; both protocols share the same on-chain contracts.
servers:
  - url: https://api.velora.xyz
    description: Production
security: []
paths:
  /v2/delta/orders/build:
    post:
      summary: Build a signable Delta V2 order from a route
      description: >-
        Returns EIP-712 typed data ready to sign and the order hash. Pass the
        unmodified `route` from `GET /v2/delta/prices`. Use `orderType` to
        select Standard / External / Productive / TWAP families.
      operationId: deltaV2OrdersBuild
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildOrderV2Request'
      responses:
        '200':
          description: EIP-712 typed data ready to sign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuiltOrderV2'
        '400':
          description: Invalid params (missing TWAP totals, mismatched slice amounts, etc.)
components:
  schemas:
    BuildOrderV2Request:
      type: object
      required:
        - route
        - owner
        - deadline
      properties:
        side:
          type: string
          enum:
            - SELL
            - BUY
          default: SELL
        route:
          $ref: '#/components/schemas/Route'
          description: >-
            Pass the unmodified `route` from `GET /v2/delta/prices`. The chain
            ID is derived from the route.
        owner:
          type: string
        beneficiary:
          type: string
          description: Defaults to `owner`.
        deadline:
          type: integer
          description: Required. Unix seconds after which the order is unfillable.
        nonce:
          type: string
        permit:
          type: string
          description: Permit / Permit2 payload, or `0x` if approved on-chain.
        slippage:
          type: integer
          minimum: 0
          maximum: 10000
          default: 100
          description: Slippage in basis points.
        limitAmount:
          type: string
          description: Override the SDK-computed destAmount (SELL) / srcAmount (BUY).
        metadata:
          type: string
          default: 0x
        partiallyFillable:
          type: boolean
          default: false
        partnerAddress:
          type: string
          description: Defaults to zero address.
        partnerFeeBps:
          type: integer
          minimum: 0
          maximum: 200
          default: 0
        partnerTakesSurplus:
          type: boolean
          default: false
        capSurplus:
          type: boolean
          default: true
        orderType:
          type: string
          enum:
            - Order
            - ProductiveOrder
            - ExternalOrder
            - TWAPOrder
            - TWAPBuyOrder
          default: Order
        handler:
          type: string
          description: Required for `ExternalOrder`.
        data:
          type: string
          description: Required for `ExternalOrder`. Handler-specific encoded bytes.
        strategy:
          type: string
          description: Required for `ProductiveOrder`.
        useShares:
          type: boolean
          default: true
        interval:
          type: integer
          minimum: 60
          description: Required for TWAP. Slice interval in seconds.
        numSlices:
          type: integer
          minimum: 2
          description: Required for TWAP.
        totalSrcAmount:
          type: string
          description: >-
            Required for `TWAPOrder`. `route.origin.input.amount` must equal
            `floor(totalSrcAmount / numSlices)`.
        totalDestAmount:
          type: string
          description: >-
            Required for `TWAPBuyOrder`. `route.origin.output.amount` must equal
            `floor(totalDestAmount / numSlices)`.
        maxSrcAmount:
          type: string
          description: >-
            Required for `TWAPBuyOrder`. Maximum total source the user is
            willing to spend.
    BuiltOrderV2:
      type: object
      properties:
        toSign:
          type: object
          properties:
            domain:
              type: object
              properties:
                name:
                  type: string
                version:
                  type: string
                chainId:
                  type: integer
                verifyingContract:
                  type: string
            types:
              type: object
              description: EIP-712 typed-data field definitions.
            value:
              type: object
              description: >-
                The on-chain Order struct values, ready to be signed and
                submitted.
        orderHash:
          type: string
          description: EIP-712 hash. Use for status lookup before the order id is assigned.
    Route:
      type: object
      properties:
        origin:
          $ref: '#/components/schemas/RouteStep'
        destination:
          $ref: '#/components/schemas/RouteStep'
        bridge:
          $ref: '#/components/schemas/RouteBridge'
        fees:
          type: object
          properties:
            gas:
              $ref: '#/components/schemas/TokenAmount'
            bridge:
              type: array
              items:
                $ref: '#/components/schemas/TokenAmount'
    RouteStep:
      type: object
      properties:
        input:
          $ref: '#/components/schemas/TokenAmount'
        output:
          $ref: '#/components/schemas/TokenAmount'
    RouteBridge:
      type: object
      nullable: true
      properties:
        protocol:
          type: string
        estimatedTimeMs:
          type: integer
        tags:
          type: array
          items:
            type: string
            enum:
              - recommended
              - fastest
              - best-return
        contractParams:
          type: object
          properties:
            protocolSelector:
              type: string
            outputToken:
              type: string
            scalingFactor:
              type: integer
            protocolData:
              type: string
    TokenAmount:
      type: object
      properties:
        token:
          $ref: '#/components/schemas/Token'
        amount:
          type: string
        amountUSD:
          type: string
    Token:
      type: object
      properties:
        chainId:
          type: integer
        address:
          type: string

````