> ## Documentation Index
> Fetch the complete documentation index at: https://staging.docs.aile.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a fill by its order hash

> The confirmation of record for a quote you filled, from indexed chain events.



## OpenAPI

````yaml openapi.json GET /v1/orders/{hash}
openapi: 3.1.0
info:
  title: Aile Quote API
  version: v1-2026-11
  description: >-
    Get a price, send one transaction, receive the exact amount.


    **How it works**


    1. `GET /config` gives you the chain, the order protocol address
    (`contracts.lop`) and the tokens with their decimals.

    2. `GET /quote` gives you a price for a pair and an amount. Pass as `taker`
    the address that will send the transaction.

    3. From that address, approve `fill.allowanceTarget` for the token you sell.

    4. Send `fill.to`, `fill.data` and `fill.value` from that address before
    `expiresAt`.

    5. Read the receipt. The transaction delivers exactly `buyAmount` or
    reverts.


    **What a quote is**


    A quote is an order signed by the market maker. It is valid for about 30
    seconds, only the `taker` can use it, and it can be used once. `maxFirmSize`
    is the largest amount you can get right now at this rate, in both tokens.


    **What you can rely on**


    - Fields, routes and enumeration values are only ever added, never removed
    or changed in type.

    - Send `fill.to`, `fill.data` and `fill.value` exactly as returned.

    - `order`, `signature`, `maker` and the other `fill` fields are there for
    your information. Do not hard-code the maker address: it changes.

    - `maker.kind`, `signature.type`, `fill.method` and the problem `reason` can
    gain new values. Treat a `reason` you do not know as "no quote".


    **Access**


    Aile issues your API key. Send it as `Authorization: Bearer <key>` and keep
    it on your backend. `GET /quote` requires it. The other routes work without
    it; with it, their calls count against your own budget and are attributed to
    you instead of sharing the anonymous per-address limit. Over budget you get
    429 `key-rate-limit` with `Retry-After`. Use **Authorize** to try the routes
    on this page; the page forgets the key on reload.


    **Scope**


    Base mainnet, real assets. The pairs come from the market makers' books,
    between the tokens `GET /config` lists; a pair nobody quotes answers 400
    `bad-pair`.
servers:
  - url: https://staging.app.aile.tech/api/base
    description: Base
security: []
tags:
  - name: Service
    description: Discover the chain, the order protocol and the tokens
  - name: Quotes
    description: Receive a signed order and ready calldata
  - name: Orders
    description: Track a fill by its order hash
paths:
  /v1/orders/{hash}:
    get:
      tags:
        - Orders
      summary: Get a fill by its order hash
      description: >-
        The confirmation of record for a quote you filled: `orderHash` is the
        EIP-712 hash of the quote's `order`; status and fills come only from
        indexed chain events, so a fill shows here shortly after its transaction
        is mined. Your receipt's Transfer logs tell you the same sooner. A key
        is optional here.
      operationId: getOrder
      parameters:
        - schema:
            type: string
            pattern: ^0x[0-9a-fA-F]{64}$
          in: path
          name: hash
          required: true
          description: EIP-712 order hash
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoredOrder'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - {}
        - apiKey: []
components:
  schemas:
    StoredOrder:
      type: object
      properties:
        orderHash:
          type: string
          pattern: ^0x[0-9a-fA-F]{64}$
          description: 0x-prefixed 32-byte hash
        protocol:
          type: object
          properties:
            chainId:
              type: integer
              exclusiveMinimum: 0
            lop:
              type: string
              pattern: ^0x[0-9a-fA-F]{40}$
              description: 0x-prefixed 20-byte address
            settlement:
              anyOf:
                - type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                  description: 0x-prefixed 20-byte address
                - type: 'null'
          required:
            - chainId
            - lop
            - settlement
          additionalProperties: false
        order:
          $ref: '#/components/schemas/Order'
        signature:
          type: string
          pattern: ^0x(?:[0-9a-fA-F]{2})*$
          description: 0x-prefixed hex bytes
        extension:
          type: string
          pattern: ^0x(?:[0-9a-fA-F]{2})*$
          description: 0x-prefixed hex bytes
        verified:
          type: boolean
          description: Signature recovered to maker (false only in demo mode)
        status:
          type: string
          enum:
            - open
            - filled
            - partially_filled
            - cancelled
            - expired
          description: >-
            Set from chain events by the indexer. `expired`: an open or
            partially filled order 30 s past the expiry its `makerTraits` sign
            (`expiresAt`); a fill indexed later still counts, and the status
            then follows the fills. Desk drafts sign no expiry; a market maker’s
            own pair signs one 300 s after its quote.
        remainingMakingAmount:
          type: string
          pattern: ^\d{1,78}$
          description: uint256 as a decimal string of base units — never a float
        createdAt:
          type: string
          format: date-time
          description: ISO-8601 UTC timestamp
        updatedAt:
          type: string
          format: date-time
          description: ISO-8601 UTC timestamp
        exclusive:
          $ref: '#/components/schemas/OrderExclusive'
        expiresAt:
          anyOf:
            - type: string
              format: date-time
              description: ISO-8601 UTC timestamp
            - type: 'null'
          description: The expiry the order’s `makerTraits` sign; null when it signs none
        kind:
          type: string
          enum:
            - intent
            - firm
          description: >-
            `intent`: a signed order submitted to the gateway. `firm`: a firm
            quote the gateway returned (`GET /quote`), pinned to `taker`. Open:
            new values may be added.
        taker:
          anyOf:
            - type: string
              pattern: ^0x[0-9a-fA-F]{40}$
              description: 0x-prefixed 20-byte address
            - type: 'null'
          description: >-
            The taker a firm quote was returned for (lowercase); null on an
            intent order
        display:
          $ref: '#/components/schemas/OrderDisplay'
        fills:
          description: Newest first; the list endpoint caps them at 10
          type: array
          items:
            $ref: '#/components/schemas/Fill'
        pendingFill:
          $ref: '#/components/schemas/PendingFill'
      required:
        - orderHash
        - order
        - signature
        - verified
        - status
        - remainingMakingAmount
        - createdAt
        - updatedAt
        - exclusive
        - expiresAt
        - kind
        - taker
      additionalProperties: true
    Problem:
      type: object
      properties:
        type:
          type: string
          description: >-
            Problem type identifier; about:blank unless a machine-readable
            problem type is defined.
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
        reason:
          description: Machine-readable cause, where the route defines one
          type: string
      required:
        - type
        - title
        - status
      additionalProperties: true
      description: RFC 7807 problem details
    Order:
      type: object
      properties:
        salt:
          type: string
          pattern: ^\d{1,78}$
          description: Low 160 bits = keccak256(extension)
        maker:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
          description: 0x-prefixed 20-byte address
        receiver:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
          description: The settlement; it forwards the taker asset to the maker
        makerAsset:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
          description: 0x-prefixed 20-byte address
        takerAsset:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
          description: 0x-prefixed 20-byte address
        makingAmount:
          type: string
          pattern: ^\d{1,78}$
          description: uint256 as a decimal string of base units — never a float
        takingAmount:
          type: string
          pattern: ^\d{1,78}$
          description: The signed floor; the auction decays down to it
        makerTraits:
          type: string
          pattern: ^\d{1,78}$
          description: uint256 as a decimal string of base units — never a float
      required:
        - salt
        - maker
        - receiver
        - makerAsset
        - takerAsset
        - makingAmount
        - takingAmount
        - makerTraits
      additionalProperties: false
      description: >-
        LOP v4 order struct — the EIP-712 message. All uint256 fields are
        decimal strings.
    OrderExclusive:
      anyOf:
        - type: object
          properties:
            executor:
              anyOf:
                - type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                  description: 0x-prefixed 20-byte address
                - type: 'null'
              description: >-
                The executor that alone may fill until `until` (lowercase): a
                market maker's whose book priced the quote; null when the
                whitelist's first entry is no market maker's executor
            until:
              type: string
              format: date-time
              description: >-
                When the window ends (`allowedTime` + the first entry’s delta);
                then any admitted filler may fill
          required:
            - executor
            - until
          additionalProperties: false
        - type: 'null'
      description: >-
        The order's exclusive window, read from its signed whitelist at intake;
        null when the whitelist is empty
    OrderDisplay:
      type: object
      properties:
        sellToken:
          anyOf:
            - type: string
            - type: 'null'
        buyToken:
          anyOf:
            - type: string
            - type: 'null'
        sellAmount:
          anyOf:
            - type: string
              pattern: ^\d{1,78}$
              description: uint256 as a decimal string of base units — never a float
            - type: 'null'
        buyAmount:
          anyOf:
            - type: string
              pattern: ^\d{1,78}$
              description: uint256 as a decimal string of base units — never a float
            - type: 'null'
      required:
        - sellToken
        - buyToken
        - sellAmount
        - buyAmount
      additionalProperties: true
      description: Human-readable legs; null when the order body is unknown to this gateway
    Fill:
      type: object
      properties:
        txHash:
          type: string
          pattern: ^0x[0-9a-fA-F]{64}$
          description: 0x-prefixed 32-byte hash
        logIndex:
          type: integer
        blockNumber:
          anyOf:
            - type: string
            - type: 'null'
          description: Decimal string; null while pending
        blockTimestamp:
          anyOf:
            - type: string
              format: date-time
              description: ISO-8601 UTC timestamp
            - type: 'null'
        kind:
          type: string
          enum:
            - fill
            - cancel
        filledMakingAmount:
          anyOf:
            - type: string
              pattern: ^\d{1,78}$
              description: uint256 as a decimal string of base units — never a float
            - type: 'null'
        filledTakingAmount:
          anyOf:
            - type: string
              pattern: ^\d{1,78}$
              description: uint256 as a decimal string of base units — never a float
            - type: 'null'
          description: Taker asset the maker received for this slice
        taker:
          anyOf:
            - type: string
              pattern: ^0x[0-9a-fA-F]{40}$
              description: 0x-prefixed 20-byte address
            - type: 'null'
      required:
        - txHash
        - logIndex
        - blockNumber
        - blockTimestamp
        - kind
        - filledMakingAmount
        - filledTakingAmount
        - taker
      additionalProperties: true
      description: One applied settlement log
    PendingFill:
      type: object
      properties:
        txHash:
          type: string
          pattern: ^0x[0-9a-fA-F]{64}$
          description: 0x-prefixed 32-byte hash
        filler:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
          description: 0x-prefixed 20-byte address
        claimedAt:
          type: string
          format: date-time
          description: ISO-8601 UTC timestamp
        expiresAt:
          type: string
          format: date-time
          description: ISO-8601 UTC timestamp
      required:
        - txHash
        - claimedAt
        - expiresAt
      additionalProperties: true
      description: >-
        A filler announced a broadcast transaction. A hint that expires on its
        own; never a status.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        API key issued by Aile. Authorization: Bearer <key>. Required for
        quotes. Optional on the other routes: without it they share the
        anonymous per-address limit, with it the calls are attributed to you and
        charged to your own budget.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.