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

# Get an order

> Permissions required: **Read trade activity**

Returns the full current state of an order, including its execution
state.

The `accountId` may be the account or subaccount ID the order was placed
with, or any subaccount ID the order was allocated to. The kind of ID
determines the view of the order that is returned:
- **Account ID**: quantities, fills, and fees are order-level
  aggregates. If the order was placed with allocations,
  `allocationCount` is present; use the account allocations endpoint
  (`GET /accounts/{accountId}/allocations?orderIds={orderId}`) to
  page through the per-allocation execution state.
- **Subaccount ID**: quantities, fills, and fees are scoped to the
  subaccount's portion of the order, and `subaccountId` and
  `allocationId` are present. This is the recommended way to
  retrieve a subaccount's view of an order.



## OpenAPI

````yaml /knowledge-base/openapi/v4.yaml get /accounts/{accountId}/orders/{orderId}
openapi: 3.1.0
info:
  title: Anchorage Digital Account APIs (v4)
  version: 4.0.0-beta
  description: >-
    Reference for the Anchorage Digital v4 API, the surface behind Crypto as a
    Service: account management (accounts and the account tree, beneficiaries,
    freeze/unfreeze/close), balances and transactions, trusted destinations,
    orders and allocations, withdrawals, deposit instructions, deposit
    attributions, the policy engine (policies, approval keys), and supported
    asset types. Approval groups, endorsements, compliance profiles, customers
    (onboarding), fee configuration updates, interest enrollment, funding
    allocations, and destination removal are under construction and return
    mocked data only.


    Status: BETA. The v4 API is available in the sandbox only
    (https://api.anchorage-staging.com/v4) and is not available in production
    yet. The contract may change until general availability. Which endpoints are
    live, in final testing, or under construction:
    https://docs.anchorage.com/platform/developers/caas/caas-overview


    Authentication: every request carries an `Api-Access-Key` header. Every
    POST, PATCH, and DELETE additionally requires an `Idempotency-Key`, and is
    signed with `Api-Signature` (hex-encoded Ed25519 over
    `timestamp_epoch_seconds + uppercase(http_method) + request_path +
    request_body`) plus `Api-Timestamp` (unix epoch seconds).


    Pagination: list endpoints accept `after` (cursor) and `limit` (page size, 1
    to 1000, default 100) and return a `page.endCursor` to continue from. Errors
    use a common envelope with a human-readable `message`; batch endpoints
    return a result per item instead.


    Guides: https://docs.anchorage.com/platform/developers/caas/caas-overview
servers:
  - url: https://api.anchorage-staging.com/v4
security:
  - Api-Access-Key: []
tags:
  - name: Accounts
  - name: Compliance Profiles
  - name: Balances
  - name: Transactions
  - name: Trusted Destinations
  - name: Orders & Allocations
  - name: Withdrawals
  - name: Deposit Instructions
  - name: Deposit Attributions
  - name: Policies
  - name: Approval Groups
  - name: Endorsements
  - name: Customers
  - name: Asset Types
paths:
  /accounts/{accountId}/orders/{orderId}:
    get:
      tags:
        - Orders & Allocations
      summary: Get an order
      description: |-
        Permissions required: **Read trade activity**

        Returns the full current state of an order, including its execution
        state.

        The `accountId` may be the account or subaccount ID the order was placed
        with, or any subaccount ID the order was allocated to. The kind of ID
        determines the view of the order that is returned:
        - **Account ID**: quantities, fills, and fees are order-level
          aggregates. If the order was placed with allocations,
          `allocationCount` is present; use the account allocations endpoint
          (`GET /accounts/{accountId}/allocations?orderIds={orderId}`) to
          page through the per-allocation execution state.
        - **Subaccount ID**: quantities, fills, and fees are scoped to the
          subaccount's portion of the order, and `subaccountId` and
          `allocationId` are present. This is the recommended way to
          retrieve a subaccount's view of an order.
      operationId: getOrder
      parameters:
        - name: accountId
          in: path
          schema:
            type: string
            format: uuid
            example: 3486b413-93d3-4447-afce-2b9c9dc34a32
          required: true
          description: >-
            Account ID or subaccount ID (a UUID). May be the ID the order was
            placed with, or any subaccount ID the order was allocated to.
        - name: orderId
          in: path
          schema:
            type: string
            format: uuid
            example: 3486b413-93d3-4447-afce-2b9c9dc34a32
          required: true
          description: The order ID (a UUID) returned when the order was placed.
      responses:
        '200':
          description: The order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
              examples:
                partiallyFilledStopLimit:
                  summary: Partially filled stop-limit buy
                  value:
                    data:
                      id: a94c8d75-6c9d-4903-95f3-5b0893e76cb7
                      externalId: 6fb5fc79-0bb4-446d-82dd-d4687fb56a02
                      symbol: BTC-USD
                      side: BUY
                      currency: USD
                      counterCurrency: BTC
                      quantity: '10000.00'
                      orderType: STOP_LIMIT
                      timeInForce: GTC
                      limitPrice: '22000.00'
                      triggerPrice: '21900.00'
                      status: PARTIALLY_FILLED
                      avgPrice: '21990.01'
                      avgPriceAllIn: '22011.89'
                      filledQuantity: '6000.00'
                      counterQuantity: '0.27285'
                      counterQuantityAllIn: '0.27258'
                      remainingQuantity: '4000.00'
                      canceledQuantity: '0.00'
                      fee: '0.00027'
                      feeCurrency: BTC
                      submitTime: '2026-08-11T14:58:09.909251Z'
                      lastUpdateTime: '2026-08-11T15:02:31.925050Z'
                subaccountView:
                  summary: Allocated market sell, viewed via a subaccount ID
                  value:
                    data:
                      id: 5d3f8c2a-1e4b-4a6c-8d9e-0f1a2b3c4d5e
                      externalId: 5b8e2f4d-6a1c-4e9b-b3d7-2c4e6f8a0b1c
                      symbol: BTC-USD
                      side: SELL
                      currency: BTC
                      counterCurrency: USD
                      quantity: '0.6'
                      orderType: MARKET
                      timeInForce: IOC
                      status: FILLED
                      avgPrice: '64998.50'
                      avgPriceAllIn: '64933.50'
                      filledQuantity: '0.6'
                      counterQuantity: '38999.10'
                      counterQuantityAllIn: '38960.10'
                      remainingQuantity: '0.00'
                      canceledQuantity: '0.00'
                      fee: '39.00'
                      feeCurrency: USD
                      subaccountId: 7d1e3f5a-2b4c-4d6e-8f0a-1c2e3a4b5c6d
                      allocationId: 9c8b7a6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
                      submitTime: '2026-08-11T14:33:00.120000Z'
                      lastUpdateTime: '2026-08-11T14:33:00.480000Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
components:
  schemas:
    OrderResponse:
      title: Order Response
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Order'
    ErrorDetails:
      title: ErrorDetails
      type: object
      properties:
        message:
          description: A human-readable message providing more details about the error.
          example: Missing required field 'amount'.
          type: string
      required:
        - message
    Order:
      title: Order
      type: object
      description: "Full current state of an order: the parameters it was placed with,\nplus its execution state.\n\nQuantity fields and their units:\n- `quantity`, `filledQuantity`, `remainingQuantity`, and\n\t`canceledQuantity` are in units of `currency`.\n- `counterQuantity` and `counterQuantityAllIn` are in units of\n\t`counterCurrency`.\n- Prices (`avgPrice`, `avgPriceAllIn`, `limitPrice`,\n\t`triggerPrice`) are in the quote currency of `symbol`.\n- Invariant: `filledQuantity + remainingQuantity + canceledQuantity\n\t= quantity`.\n\nAn order is returned in one of two views:\n- **Account-level view** (order endpoints with an account ID in the\n\tpath): quantities, fills, and fees are order-level aggregates\n\tacross all allocations. If the order was placed with allocations,\n\t`allocationCount` is present, and the per-allocation execution\n\tstate is available from the account allocations endpoint\n\t(`GET /accounts/{accountId}/allocations?orderIds={orderId}`).\n- **Subaccount-scoped view** (order endpoints with a subaccount ID\n\tin the path, and every entry returned by the account allocations\n\tendpoint): `quantity`, `filledQuantity`, `remainingQuantity`,\n\t`canceledQuantity`, `counterQuantity`, `counterQuantityAllIn`,\n\tand `fee` are scoped to one subaccount's portion of the order,\n\tand `subaccountId` and `allocationId` are present. Fills and fees\n\tare apportioned pro-rata across allocations, so `avgPrice` and\n\t`avgPriceAllIn` are identical in both views. The quantity\n\tinvariant above holds within the view."
      required:
        - id
        - symbol
        - side
        - currency
        - counterCurrency
        - quantity
        - orderType
        - timeInForce
        - status
        - filledQuantity
        - remainingQuantity
        - canceledQuantity
        - submitTime
        - lastUpdateTime
      properties:
        id:
          description: Unique order ID (a UUID), assigned when the order was accepted.
          type: string
          format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
        externalId:
          type: string
          description: External ID provided when the order was placed.
        symbol:
          type: string
          description: Symbol for the order, e.g. BTC-USD.
        side:
          type: string
          description: Order side, either "BUY" or "SELL".
          enum:
            - BUY
            - SELL
        tradingPair:
          description: Pair of assets this trade is for.
          type: string
        currency:
          type: string
          description: >-
            The currency in which order quantity is specified, e.g. BTC or USD.
            One of the two legs of `symbol`.
        counterCurrency:
          type: string
          description: >-
            The other leg of `symbol`: the currency received (for a BUY of
            `currency`) or paid, in which `counterQuantity` is expressed.
        quantity:
          type: string
          description: >-
            Order quantity in units of `currency`, as specified when the order
            was placed.
        orderType:
          type: string
          description: "Order type the order was placed with. One of:\n* `MARKET` - executed immediately at the best available price.\n* `LIMIT` - executed at a specified price or better.\n* `LIMIT_ALL_IN` - a limit order priced and filled inclusive of fees.\n* `STOP_LOSS` - dormant until a trigger price is reached, then\n\tsubmitted as a market order.\n* `STOP_LIMIT` - dormant until a trigger price is reached, then\n\tsubmitted as a limit order.\n* `TAKE_PROFIT_LIMIT` - dormant until a trigger price is reached in\n\tthe profitable direction, then submitted as a limit order.\n* `RFQ` - a request-for-quote order, negotiated and filled at a\n\tquoted price.\n* `TWAP` - a time-weighted average price algorithmic order.\n* `VWAP` - a volume-weighted average price algorithmic order.\n* `PEGGED` - priced relative to a moving reference, such as the\n\tmarket midpoint.\n* `POV` - a percentage-of-volume algorithmic order, sized to a\n\ttarget share of market volume.\n* `MANUAL` - booked manually outside the standard order-entry flow.\n* `OTHER` - an order type not covered by any of the above.\n\n`MARKET`, `LIMIT`, `STOP_LOSS`, `STOP_LIMIT`, and\n`TAKE_PROFIT_LIMIT` are the only types this API's own place-order\nendpoint accepts; the rest can only appear on an order placed\nthrough another channel."
          enum:
            - MARKET
            - LIMIT
            - LIMIT_ALL_IN
            - STOP_LOSS
            - STOP_LIMIT
            - TAKE_PROFIT_LIMIT
            - RFQ
            - TWAP
            - VWAP
            - PEGGED
            - POV
            - MANUAL
            - OTHER
        timeInForce:
          type: string
          description: "Time in force the order was placed with. One of:\n* `FOK` (fill or kill) - the order had to be fully filled\n\timmediately or was canceled with no partial execution.\n* `IOC` (immediate or cancel) - any portion fillable immediately\n\twas executed, and the remainder was canceled.\n* `GTC` (good till canceled) - the order stays active until fully\n\texecuted or explicitly canceled.\n* `GTD` (good till date) - the order stays active until fully\n\texecuted or `expiryTime` is reached.\n* `DAY` - the order stays active until the end of the trading day,\n\tthen expires if not fully executed. Can only appear on an order\n\tplaced through another channel; this API's own place-order\n\tendpoint never places one."
          enum:
            - FOK
            - IOC
            - GTC
            - GTD
            - DAY
        limitPrice:
          type: string
          description: >-
            Limit price the order was placed with. Present only for `LIMIT`,
            `STOP_LIMIT`, and `TAKE_PROFIT_LIMIT` orders.
        triggerPrice:
          type: string
          description: >-
            Trigger price the order was placed with. Present only for
            `STOP_LOSS`, `STOP_LIMIT`, and `TAKE_PROFIT_LIMIT` orders.
        expiryTime:
          description: >-
            Expiry time the order was placed with. Present only for `GTD`
            orders.
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        specLotId:
          type: string
          description: |-
            Specification lot ID the order was placed with, if any. In the
            subaccount-scoped view, this is the spec lot ID that applies
            to the subaccount's portion of the order, whether it was
            provided via the order-level `specLotId` or the
            allocation-level one.
        status:
          type: string
          description: "Current status of the order. One of:\n* `SUBMITTED` - received and working; nothing executed yet. This\n\tincludes orders awaiting processing and stop/take-profit\n\torders that are dormant until their trigger is reached.\n* `PARTIALLY_FILLED` - partially executed; the remainder is\n\tstill working.\n* `FILLED` - fully executed.\n* `CANCELING` - a cancel request has been received but not\n\tyet confirmed.\n* `CANCELED` - canceled with no executions.\n* `PARTIALLY_CANCELED` - canceled after partial execution; the\n\tfilled portion stands.\n* `EXPIRED` - terminated without (full) execution due to time in\n\tforce (`FOK` orders that could not be fully filled, `IOC`\n\tremainders, and `GTD` orders that reached `expiryTime`).\n* `REJECTED` - rejected; see `rejectReason`."
          enum:
            - SUBMITTED
            - PARTIALLY_FILLED
            - FILLED
            - CANCELING
            - CANCELED
            - PARTIALLY_CANCELED
            - EXPIRED
            - REJECTED
        rejectCode:
          type: string
          description: "Machine-readable reason the order was rejected. Present only\nwhen `status` is `REJECTED`.\n\nField validation:\n* `INVALID_SYMBOL`, `INVALID_QUANTITY`, `INVALID_ORDER_TYPE`,\n\t`INVALID_TIME_IN_FORCE`, `INVALID_EXPIRY_TIME`,\n\t`INVALID_EXTERNAL_ID` - the named field is missing, malformed,\n\tor not allowed for this order.\n* `INVALID_SIDE` - `side` is missing, malformed, or not allowed\n\tfor this order type, e.g. a `BUY` `STOP_LOSS`.\n* `INVALID_CURRENCY` - `currency` is missing, malformed, or not\n\tallowed for this order type, e.g. a `STOP_LOSS` with\n\t`currency` set to the quote currency of `symbol`.\n* `INVALID_PRICE` - a price failed validation (e.g. outside\n\tallowed price bands).\n* `INVALID_LIMIT_PRICE`, `INVALID_TRIGGER_PRICE` - the named price\n\tis missing, malformed, or not allowed for this order type.\n\nAccount:\n* `INVALID_ACCOUNT` - unknown or inaccessible account or\n\tsubaccount ID.\n* `ACCOUNT_DISABLED_FOR_TRADING` - the account exists but trading\n\tis disabled on it.\n* `UNAUTHORIZED_FOR_TRADING` - the caller is not authorized to\n\ttrade on this account.\n\nAllocations:\n* `INVALID_ALLOCATION` - allocations are malformed, missing when\n\trequired (FBO account ID), not allowed (subaccount ID), or\n\tthe allocation quantities do not sum to the order `quantity`.\n* `INVALID_ACCOUNTS_IN_ALLOCATION` - an allocation references an\n\tunknown subaccount, or a subaccount that does not belong to\n\tthe account.\n\nSpec lots:\n* `INVALID_SPEC_LOT_ID` - the specified lot does not exist, does\n\tnot belong to the subaccount, or cannot cover this trade.\n* `INVALID_SIDE_FOR_SPEC_LOT_ID` - a spec lot ID was provided on a\n\tnon-`SELL` order.\n* `INVALID_TIME_IN_FORCE_FOR_SPEC_LOT_ID` - a spec lot ID was provided\n\twith a time in force other than `FOK`.\n\nExecution:\n* `INSUFFICIENT_BALANCE` - the account's holdings cannot cover\n\tthe order. The balance is checked before the order is accepted,\n\tso this is normally returned synchronously as a 400 by the\n\tplace endpoint rather than on a `REJECTED` order.\n* `INSUFFICIENT_LIQUIDITY` - the order cannot be filled within\n\tits constraints.\n* `DUPLICATE_ORDER` - the `externalId` was already used by an\n\taccepted order. Returned synchronously as a 409 by the place\n\tendpoint.\n* `INVALID_CURRENCY_FOR_FOK` - an `FOK` order specified the wrong\n\tcurrency leg. `BUY` orders must specify `quantity` in the\n\tquote currency, `SELL` orders in the base currency.\n\nCancellation:\n* `ORDER_NOT_CANCELABLE` - a cancel request targeted an order\n\tthat cannot be canceled (used by the cancel endpoint).\n\nOther:\n* `INTERNAL_ERROR` - an internal error occurred; the order was\n\tnot executed."
          enum:
            - INVALID_SYMBOL
            - INVALID_CURRENCY
            - INVALID_SIDE
            - INVALID_QUANTITY
            - INVALID_ORDER_TYPE
            - INVALID_TIME_IN_FORCE
            - INVALID_EXPIRY_TIME
            - INVALID_EXTERNAL_ID
            - INVALID_PRICE
            - INVALID_LIMIT_PRICE
            - INVALID_TRIGGER_PRICE
            - INVALID_ACCOUNT
            - ACCOUNT_DISABLED_FOR_TRADING
            - UNAUTHORIZED_FOR_TRADING
            - INVALID_ALLOCATION
            - INVALID_ACCOUNTS_IN_ALLOCATION
            - INVALID_SPEC_LOT_ID
            - INVALID_SIDE_FOR_SPEC_LOT_ID
            - INVALID_TIME_IN_FORCE_FOR_SPEC_LOT_ID
            - INSUFFICIENT_BALANCE
            - INSUFFICIENT_LIQUIDITY
            - DUPLICATE_ORDER
            - INVALID_CURRENCY_FOR_FOK
            - ORDER_NOT_CANCELABLE
            - INTERNAL_ERROR
        rejectReason:
          type: string
          description: >-
            Human-readable description of why the order was rejected, providing
            detail beyond `rejectCode`. Present only when `status` is
            `REJECTED`.
        avgPrice:
          type: string
          description: >-
            Average execution price across all fills, in the quote currency of
            `symbol`. Present only once the order has (partially) filled.
        avgPriceAllIn:
          type: string
          description: >-
            Average execution price across all fills, inclusive of fees. Present
            only once the order has (partially) filled.
        filledQuantity:
          type: string
          description: Cumulative executed quantity, in units of `currency`.
        counterQuantity:
          type: string
          description: >-
            Cumulative executed quantity in units of `counterCurrency`,
            exclusive of fees.
        counterQuantityAllIn:
          type: string
          description: >-
            Cumulative executed quantity in units of `counterCurrency`,
            inclusive of fees (i.e. the net amount after `fee` is applied).
        remainingQuantity:
          type: string
          description: Quantity still open for execution, in units of `currency`.
        canceledQuantity:
          type: string
          description: Quantity that was canceled before execution, in units of `currency`.
        fee:
          type: string
          description: Total fee charged for the order, in `feeCurrency`.
        feeCurrency:
          type: string
          description: The currency in which `fee` is charged.
        allocationCount:
          type: integer
          description: |-
            Number of subaccount allocations the order was placed with.
            Present only in the account-level view, and only when the order
            was placed with allocations; mutually exclusive with
            `allocationId`. Use the account allocations endpoint
            (`GET /accounts/{accountId}/allocations?orderIds={orderId}`) to
            page through the allocations.
        subaccountId:
          description: |-
            The subaccount (a UUID) this view is scoped to. Present only in
            the subaccount-scoped view.
          type: string
          format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
        allocationId:
          description: |-
            Unique ID (a UUID) of the subaccount allocation whose scoped
            values this view shows. Present only in the subaccount-scoped
            view; mutually exclusive with `allocationCount`. Present both
            for orders allocated into the subaccount and for orders placed
            directly into it — a directly placed order is a single implicit
            allocation.
          type: string
          format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
        submitTime:
          description: Time the order was received.
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        lastUpdateTime:
          description: >-
            Time of the most recent update to the order (fill, cancel, expiry,
            etc.).
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
  securitySchemes:
    Api-Access-Key:
      type: apiKey
      name: Api-Access-Key
      in: header
      description: An API key associated with a security role

````

## Related topics

- [Orders](https://docs.anchorage.com/knowledge-base/platform/developers/caas/caas-orders.md)
- [Get order by ID](https://docs.anchorage.com/knowledge-base/porto/api-reference/v2/trading/get-order-by-id.md)
- [List orders](https://docs.anchorage.com/knowledge-base/api-reference/v2/trading/list-orders.md)
