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

# Get order

> Returns every order a transaction placed, filled or cancelled, as POST /v1/execute lists them. Orders appear up to about a minute after they land on chain; until then this returns not_found, and POST /v1/execute with the original request reads them live.



## OpenAPI

````yaml https://api.sunrise.xyz/openapi get /v1/orders/{txHash}
openapi: 3.1.0
info:
  title: Sunrise API
  description: >-
    Authenticated API for Sunrise.


    Errors carry a `code`; each code means one next step (see the Errors page).
    New codes may be added: for a code you don't know, get a new quote on a 409,
    and send the same request again on a 5xx from execute.


    A path that doesn't exist answers 404 `not_found`, and a method a path
    doesn't take answers 405 `method_not_allowed`.
  version: 1.0.0
servers:
  - url: https://api.sunrise.xyz
security:
  - bearerAuth: []
paths:
  /v1/orders/{txHash}:
    get:
      tags:
        - Execution
      summary: Get order
      description: >-
        Returns every order a transaction placed, filled or cancelled, as POST
        /v1/execute lists them. Orders appear up to about a minute after they
        land on chain; until then this returns not_found, and POST /v1/execute
        with the original request reads them live.
      operationId: getOrder
      parameters:
        - in: path
          name: txHash
          schema:
            type: string
            pattern: ^[1-9A-HJ-NP-Za-km-z]{64,88}$
          required: true
          description: >-
            Signature of any of the order's transactions: its open, fill or
            cancel.
      responses:
        '200':
          description: The transaction's orders.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    enum:
                      - true
                    type: boolean
                  data:
                    type: object
                    properties:
                      txHash:
                        type: string
                        description: The transaction signature that was looked up.
                      orders:
                        type: array
                        items:
                          oneOf:
                            - oneOf:
                                - type: object
                                  properties:
                                    orderId:
                                      type: string
                                      description: The quote's `providerRequestId`.
                                    type:
                                      enum:
                                        - rfq
                                      type: string
                                    status:
                                      description: Sent, not landed yet.
                                      enum:
                                        - PENDING
                                      type: string
                                    details:
                                      type: object
                                      properties:
                                        openTxHash:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Signature of the transaction that opened
                                            the order.
                                      required:
                                        - openTxHash
                                  required:
                                    - orderId
                                    - type
                                    - status
                                    - details
                                - type: object
                                  properties:
                                    orderId:
                                      type: string
                                      description: The quote's `providerRequestId`.
                                    type:
                                      enum:
                                        - rfq
                                      type: string
                                    status:
                                      description: Landed. Waits for a fill.
                                      enum:
                                        - OPEN
                                      type: string
                                    details:
                                      type: object
                                      properties:
                                        openTxHash:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Signature of the transaction that opened
                                            the order.
                                      required:
                                        - openTxHash
                                  required:
                                    - orderId
                                    - type
                                    - status
                                    - details
                                - type: object
                                  properties:
                                    orderId:
                                      type: string
                                      description: The quote's `providerRequestId`.
                                    type:
                                      enum:
                                        - rfq
                                      type: string
                                    status:
                                      description: >-
                                        Filled. POST /v1/execute also reports a
                                        partial fill as FILLED.
                                      enum:
                                        - FILLED
                                      type: string
                                    details:
                                      type: object
                                      properties:
                                        openTxHash:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Signature of the transaction that opened
                                            the order.
                                        fillTxHash:
                                          type: string
                                          minLength: 1
                                          description: Signature of the fill transaction.
                                        deliveredAmountRaw:
                                          type: string
                                          pattern: ^\d+$
                                          description: >-
                                            What the fill delivered to the wallet,
                                            in raw base units of the output token.
                                        returnedAmountRaw:
                                          type: string
                                          pattern: ^\d+$
                                          description: >-
                                            What the fill returned to the wallet, in
                                            raw base units of the input token.
                                      required:
                                        - openTxHash
                                        - fillTxHash
                                  required:
                                    - orderId
                                    - type
                                    - status
                                    - details
                                - type: object
                                  properties:
                                    orderId:
                                      type: string
                                      description: The quote's `providerRequestId`.
                                    type:
                                      enum:
                                        - rfq
                                      type: string
                                    status:
                                      description: >-
                                        Filled in part. Final: the fill returned
                                        the rest of the input to the wallet.
                                      enum:
                                        - PARTIALLY_FILLED
                                      type: string
                                    details:
                                      type: object
                                      properties:
                                        openTxHash:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Signature of the transaction that opened
                                            the order.
                                        fillTxHash:
                                          type: string
                                          minLength: 1
                                          description: Signature of the fill transaction.
                                        deliveredAmountRaw:
                                          type: string
                                          pattern: ^\d+$
                                          description: >-
                                            What the fill delivered to the wallet,
                                            in raw base units of the output token.
                                        returnedAmountRaw:
                                          type: string
                                          pattern: ^\d+$
                                          description: >-
                                            What the fill returned to the wallet, in
                                            raw base units of the input token.
                                      required:
                                        - openTxHash
                                        - fillTxHash
                                        - returnedAmountRaw
                                  required:
                                    - orderId
                                    - type
                                    - status
                                    - details
                                - type: object
                                  properties:
                                    orderId:
                                      type: string
                                      description: The quote's `providerRequestId`.
                                    type:
                                      enum:
                                        - rfq
                                      type: string
                                    status:
                                      description: >-
                                        Cancelled. The input went back to the
                                        wallet.
                                      enum:
                                        - CANCELLED
                                      type: string
                                    details:
                                      type: object
                                      properties:
                                        openTxHash:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Signature of the transaction that opened
                                            the order.
                                        cancelTxHash:
                                          type: string
                                          minLength: 1
                                          description: Signature of the cancel transaction.
                                      required:
                                        - openTxHash
                                        - cancelTxHash
                                  required:
                                    - orderId
                                    - type
                                    - status
                                    - details
                                - type: object
                                  properties:
                                    orderId:
                                      type: string
                                      description: The quote's `providerRequestId`.
                                    type:
                                      enum:
                                        - rfq
                                      type: string
                                    status:
                                      description: >-
                                        The fill was reversed. The input went
                                        back to the wallet.
                                      enum:
                                        - REFUNDED
                                      type: string
                                    details:
                                      type: object
                                      properties:
                                        openTxHash:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Signature of the transaction that opened
                                            the order.
                                        refundTxHash:
                                          type: string
                                          minLength: 1
                                          description: Signature of the refund transaction.
                                      required:
                                        - openTxHash
                                        - refundTxHash
                                  required:
                                    - orderId
                                    - type
                                    - status
                                    - details
                                - type: object
                                  properties:
                                    orderId:
                                      type: string
                                      description: The quote's `providerRequestId`.
                                    type:
                                      enum:
                                        - rfq
                                      type: string
                                    status:
                                      description: Nothing was traded.
                                      enum:
                                        - FAILED
                                      type: string
                                    details:
                                      type: object
                                      properties:
                                        openTxHash:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Signature of the transaction that opened
                                            the order.
                                      required:
                                        - openTxHash
                                  required:
                                    - orderId
                                    - type
                                    - status
                                    - details
                          description: >-
                            An order the transaction placed. `type` fixes the
                            shape of `details`; within a type, `status` does.
                        description: >-
                          Every order the transaction placed, filled or
                          cancelled, as POST /v1/execute lists them.
                    required:
                      - txHash
                      - orders
                  timestamp:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Identifies this request; also sent as the X-Request-Id
                      header. Quote it when asking Sunrise about a request.
                required:
                  - success
                  - data
                  - timestamp
                  - requestId
        '400':
          description: 'invalid_request: A field or parameter is wrong or missing.'
          x-codes:
            - invalid_request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    enum:
                      - false
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          One of the codes this response lists in its
                          description and x-codes.
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          txHash:
                            type: string
                            description: >-
                              The hash of the order's transaction, which was
                              sent to the chain.
                          fields:
                            type: array
                            items:
                              type: string
                            description: The request fields that aren't valid.
                        required: []
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                  requestId:
                    type: string
                    description: >-
                      Identifies this request; also sent as the X-Request-Id
                      header. Quote it when asking Sunrise about a request.
                  timestamp:
                    type: string
                required:
                  - success
                  - error
                  - requestId
                  - timestamp
                additionalProperties: false
        '401':
          description: 'unauthorized: The API key is missing or invalid.'
          x-codes:
            - unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    enum:
                      - false
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          One of the codes this response lists in its
                          description and x-codes.
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          txHash:
                            type: string
                            description: >-
                              The hash of the order's transaction, which was
                              sent to the chain.
                          fields:
                            type: array
                            items:
                              type: string
                            description: The request fields that aren't valid.
                        required: []
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                  requestId:
                    type: string
                    description: >-
                      Identifies this request; also sent as the X-Request-Id
                      header. Quote it when asking Sunrise about a request.
                  timestamp:
                    type: string
                required:
                  - success
                  - error
                  - requestId
                  - timestamp
                additionalProperties: false
        '403':
          description: 'forbidden: The key can''t make this request or use this route.'
          x-codes:
            - forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    enum:
                      - false
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          One of the codes this response lists in its
                          description and x-codes.
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          txHash:
                            type: string
                            description: >-
                              The hash of the order's transaction, which was
                              sent to the chain.
                          fields:
                            type: array
                            items:
                              type: string
                            description: The request fields that aren't valid.
                        required: []
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                  requestId:
                    type: string
                    description: >-
                      Identifies this request; also sent as the X-Request-Id
                      header. Quote it when asking Sunrise about a request.
                  timestamp:
                    type: string
                required:
                  - success
                  - error
                  - requestId
                  - timestamp
                additionalProperties: false
        '404':
          description: 'not_found: The path or token does not exist.'
          x-codes:
            - not_found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    enum:
                      - false
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          One of the codes this response lists in its
                          description and x-codes.
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          txHash:
                            type: string
                            description: >-
                              The hash of the order's transaction, which was
                              sent to the chain.
                          fields:
                            type: array
                            items:
                              type: string
                            description: The request fields that aren't valid.
                        required: []
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                  requestId:
                    type: string
                    description: >-
                      Identifies this request; also sent as the X-Request-Id
                      header. Quote it when asking Sunrise about a request.
                  timestamp:
                    type: string
                required:
                  - success
                  - error
                  - requestId
                  - timestamp
                additionalProperties: false
        '429':
          description: >-
            rate_limited: Too many requests; see Retry-After.

            verification_rate_limited: The API key's verification budget is used
            up; see Retry-After.
          x-codes:
            - rate_limited
            - verification_rate_limited
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    enum:
                      - false
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          One of the codes this response lists in its
                          description and x-codes.
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          txHash:
                            type: string
                            description: >-
                              The hash of the order's transaction, which was
                              sent to the chain.
                          fields:
                            type: array
                            items:
                              type: string
                            description: The request fields that aren't valid.
                        required: []
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                  requestId:
                    type: string
                    description: >-
                      Identifies this request; also sent as the X-Request-Id
                      header. Quote it when asking Sunrise about a request.
                  timestamp:
                    type: string
                required:
                  - success
                  - error
                  - requestId
                  - timestamp
                additionalProperties: false
          headers:
            X-Sunrise-RateLimit-Scope:
              description: >-
                Local per-key verification budget exceeded; back off requests
                for this key.
              schema:
                type: string
                enum:
                  - key
            Retry-After:
              description: Seconds to wait; present for local verification throttling.
              schema:
                type: integer
                example: 60
        '500':
          description: 'internal_error: An unexpected error in the Sunrise API.'
          x-codes:
            - internal_error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    enum:
                      - false
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          One of the codes this response lists in its
                          description and x-codes.
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          txHash:
                            type: string
                            description: >-
                              The hash of the order's transaction, which was
                              sent to the chain.
                          fields:
                            type: array
                            items:
                              type: string
                            description: The request fields that aren't valid.
                        required: []
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                  requestId:
                    type: string
                    description: >-
                      Identifies this request; also sent as the X-Request-Id
                      header. Quote it when asking Sunrise about a request.
                  timestamp:
                    type: string
                required:
                  - success
                  - error
                  - requestId
                  - timestamp
                additionalProperties: false
        '502':
          description: 'bad_gateway: A service behind the API failed.'
          x-codes:
            - bad_gateway
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    enum:
                      - false
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          One of the codes this response lists in its
                          description and x-codes.
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          txHash:
                            type: string
                            description: >-
                              The hash of the order's transaction, which was
                              sent to the chain.
                          fields:
                            type: array
                            items:
                              type: string
                            description: The request fields that aren't valid.
                        required: []
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                  requestId:
                    type: string
                    description: >-
                      Identifies this request; also sent as the X-Request-Id
                      header. Quote it when asking Sunrise about a request.
                  timestamp:
                    type: string
                required:
                  - success
                  - error
                  - requestId
                  - timestamp
                additionalProperties: false
        '503':
          description: 'service_unavailable: A service is temporarily unavailable.'
          x-codes:
            - service_unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    enum:
                      - false
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          One of the codes this response lists in its
                          description and x-codes.
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          txHash:
                            type: string
                            description: >-
                              The hash of the order's transaction, which was
                              sent to the chain.
                          fields:
                            type: array
                            items:
                              type: string
                            description: The request fields that aren't valid.
                        required: []
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                  requestId:
                    type: string
                    description: >-
                      Identifies this request; also sent as the X-Request-Id
                      header. Quote it when asking Sunrise about a request.
                  timestamp:
                    type: string
                required:
                  - success
                  - error
                  - requestId
                  - timestamp
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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