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

# private/get_open_orders_by_instrument

> Retrieves a list of all open orders for a specific instrument. Open orders are orders that have been placed but not yet filled or cancelled.

Results can be filtered by order type. This method is useful for checking active orders for a particular instrument.

**Scope:** `rat#view` or `wallet:transactions:read`

[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_open_orders_by_instrument)





## OpenAPI

````yaml /api-reference/coinbase-deribit-app-api/adv-starbase-openapi.json get /private/get_open_orders_by_instrument
openapi: 3.0.0
info:
  description: Coinbase Retail Advanced Trade API for derivatives trading.
  title: Coinbase Retail Advanced Trade (Deribit) API
  version: 2.1.1
servers:
  - url: https://drb.coinbase.com/api/v2
security: []
tags:
  - description: Can only be used over websockets.
    name: WebSocket Only
  - description: Public methods can be used without authentication.
    name: Public
  - description: >-
      <p>Private methods require authentication. All requests must include a
      valid OAuth2 token.</p>

      <p>A token can be requested using the <a
      href="#public-auth">/public/auth</a> method.</p>

      <p>When using the websockets protocol, the token must be included as a
      parameter <code>access_token</code> in the message. When using REST (HTTP
      GET), the token may also be passed in the <code>Authorization</code>
      header.</p>
    name: Private
  - name: Authentication
  - name: Session Management
  - description: >-
      Subscription works as [notifications](#notifications), so users will
      automatically (after subscribing) receive messages from the server.
      Overview for each channel response format is described in
      [subscriptions](#subscriptions) section.
    name: Subscription Management
  - name: Account Management
  - name: Trading
  - name: Market Data
paths:
  /private/get_open_orders_by_instrument:
    get:
      tags:
        - Trading
        - Private
      description: >+
        Retrieves a list of all open orders for a specific instrument. Open
        orders are orders that have been placed but not yet filled or cancelled.


        Results can be filtered by order type. This method is useful for
        checking active orders for a particular instrument.


        **Scope:** `rat#view` or `wallet:transactions:read`


        [Try in API
        console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_open_orders_by_instrument)

      parameters:
        - description: Instrument name
          in: query
          name: instrument_name
          required: true
          schema:
            $ref: '#/components/schemas/instrument_name'
        - description: Order type, default - `all`
          in: query
          name: type
          required: false
          schema:
            $ref: '#/components/schemas/order_type2'
      requestBody:
        content:
          application/json:
            examples:
              request:
                description: JSON-RPC Request Example
                value:
                  id: 8442
                  jsonrpc: '2.0'
                  method: private/get_open_orders_by_instrument
                  params:
                    instrument_name: ETH-22FEB19-120-C
        description: JSON-RPC request body
      responses:
        '200':
          $ref: '#/components/responses/PrivateGetOpenOrdersResponse'
components:
  schemas:
    instrument_name:
      description: Unique instrument identifier
      example: BTC-PERPETUAL
      type: string
    order_type2:
      description: >-
        Order type: `"all"`, `"limit"`, `"trigger_all"`, `"stop_all"`,
        `"stop_limit"`, `"stop_market"`, `"take_all"`, `"take_limit"`,
        `"take_market"`, `"trailing_all"`, `"trailing_stop"`
      enum:
        - all
        - limit
        - trigger_all
        - stop_all
        - stop_limit
        - stop_market
        - take_all
        - take_limit
        - take_market
        - trailing_all
        - trailing_stop
      type: string
    PrivateGetOpenOrdersResponse:
      properties:
        id:
          description: The id that was sent in the request
          type: integer
        jsonrpc:
          description: The JSON-RPC version (2.0)
          enum:
            - '2.0'
          type: string
        result:
          items:
            $ref: '#/components/schemas/order'
          type: array
      required:
        - jsonrpc
        - result
      type: object
    order:
      properties:
        advanced:
          $ref: '#/components/schemas/advanced'
        amount:
          $ref: '#/components/schemas/amount'
        api:
          $ref: '#/components/schemas/api'
        app_name:
          description: >-
            The name of the application that placed the order on behalf of the
            user (optional).
          example: Example Application
          type: string
        auto_replaced:
          description: >-
            Options, advanced orders only - `true` if last modification of the
            order was performed by the pricing engine, otherwise `false`.
          type: boolean
        average_price:
          $ref: '#/components/schemas/average_price'
        block_trade:
          $ref: '#/components/schemas/block_trade_order'
        cancel_reason:
          $ref: '#/components/schemas/cancel_reason'
        contracts:
          $ref: '#/components/schemas/contracts'
        creation_timestamp:
          $ref: '#/components/schemas/timestamp'
        direction:
          $ref: '#/components/schemas/direction'
        display_amount:
          $ref: '#/components/schemas/display_amount'
        filled_amount:
          $ref: '#/components/schemas/filled_amount'
        implv:
          $ref: '#/components/schemas/implv'
        instrument_name:
          $ref: '#/components/schemas/instrument_name'
        is_liquidation:
          description: >-
            Optional (not added for spot). `true` if order was automatically
            created during liquidation
          type: boolean
        is_primary_otoco:
          description: >-
            `true` if the order is an order that can trigger an OCO pair,
            otherwise not present.
          type: boolean
        is_rebalance:
          description: >-
            Optional (only for spot). `true` if order was automatically created
            during cross-collateral balance restoration
          type: boolean
        is_secondary_oto:
          $ref: '#/components/schemas/is_secondary_oto'
        label:
          $ref: '#/components/schemas/label'
        last_update_timestamp:
          $ref: '#/components/schemas/timestamp'
        mmp:
          description: '`true` if the order is a MMP order, otherwise `false`.'
          type: boolean
        mmp_cancelled:
          description: '`true` if order was cancelled by mmp trigger (optional)'
          example: true
          type: boolean
        mmp_group:
          description: >-
            Name of the MMP group supplied in the `private/mass_quote` request.
            Only present for quote orders.
          type: string
        mobile:
          $ref: '#/components/schemas/mobile'
        oco_ref:
          $ref: '#/components/schemas/oco_ref'
        order_id:
          $ref: '#/components/schemas/order_id'
        order_state:
          $ref: '#/components/schemas/order_state'
        order_type:
          $ref: '#/components/schemas/order_type'
        original_order_type:
          $ref: '#/components/schemas/original_order_type'
        oto_order_ids:
          description: The Ids of the orders that will be triggered if the order is filled
          items:
            $ref: '#/components/schemas/order_id'
            description: Order Id
          type: array
        post_only:
          $ref: '#/components/schemas/post_only'
        price:
          $ref: '#/components/schemas/open_order_price'
        primary_order_id:
          $ref: '#/components/schemas/order_id'
          description: ID of the order that triggered this order.
        quote:
          description: If order is a quote. Present only if true.
          type: boolean
        quote_id:
          description: >-
            The same QuoteID as supplied in the `private/mass_quote` request.
            Only present for quote orders.
          type: string
        quote_set_id:
          description: >-
            Identifier of the QuoteSet supplied in the `private/mass_quote`
            request. Only present for quote orders.
          type: string
        reduce_only:
          $ref: '#/components/schemas/reduce_only'
        refresh_amount:
          $ref: '#/components/schemas/refresh_amount'
        reject_post_only:
          $ref: '#/components/schemas/reject_post_only'
        replaced:
          description: >-
            `true` if the order was edited (by user or - in case of advanced
            options orders - by pricing engine), otherwise `false`.
          type: boolean
        risk_reducing:
          description: >-
            `true` if the order is marked by the platform as a risk reducing
            order (can apply only to orders placed by PM users), otherwise
            `false`.
          type: boolean
        time_in_force:
          $ref: '#/components/schemas/time_in_force'
        trigger:
          $ref: '#/components/schemas/trigger'
        trigger_fill_condition:
          $ref: '#/components/schemas/trigger_fill_condition'
        trigger_offset:
          $ref: '#/components/schemas/trigger_offset'
        trigger_order_id:
          description: >-
            Id of the trigger order that created the order (Only for orders that
            were created by triggered orders).
          example: SLIB-370
          type: string
        trigger_price:
          $ref: '#/components/schemas/trigger_price'
        trigger_reference_price:
          $ref: '#/components/schemas/trigger_reference_price'
        triggered:
          $ref: '#/components/schemas/triggered'
        usd:
          $ref: '#/components/schemas/usd'
        web:
          $ref: '#/components/schemas/web'
      required:
        - order_id
        - order_state
        - order_type
        - time_in_force
        - instrument_name
        - creation_timestamp
        - last_update_timestamp
        - direction
        - price
        - label
        - post_only
        - api
      type: object
    advanced:
      description: >
        advanced type: `"usd"` or `"implv"` (Only for options; field is omitted
        if not applicable).
      enum:
        - usd
        - implv
      type: string
    amount:
      description: >-
        It represents the requested order size. For perpetual and inverse
        futures the amount is in USD units. For options and linear futures it is
        the underlying base currency coin.
      type: number
    api:
      description: '`true` if created with API'
      type: boolean
    average_price:
      description: Average fill price of the order
      type: number
    block_trade_order:
      description: '`true` if order made from block_trade trade, added only in that case.'
      example: true
      type: boolean
    cancel_reason:
      description: >-
        Enumerated reason behind cancel `"user_request"`, `"autoliquidation"`,
        `"cancel_on_disconnect"`, `"risk_mitigation"`, `"pme_risk_reduction"`
        (portfolio margining risk reduction), `"pme_account_locked"` (portfolio
        margining account locked per currency), `"position_locked"`,
        `"mmp_trigger"` (market maker protection), `"mmp_config_curtailment"`
        (market maker configured quantity decreased), `"edit_post_only_reject"`
        (cancelled on edit because of `reject_post_only` setting),
        `"oco_other_closed"` (the oco order linked to this order was closed),
        `"oto_primary_closed"` (the oto primary order that was going to trigger
        this order was cancelled), `"settlement"` (closed because of a
        settlement)
      enum:
        - user_request
        - autoliquidation
        - cancel_on_disconnect
        - risk_mitigation
        - pme_risk_reduction
        - pme_account_locked
        - position_locked
        - mmp_trigger
        - mmp_config_curtailment
        - edit_post_only_reject
        - oco_other_closed
        - oto_primary_closed
        - settlement
      type: string
    contracts:
      description: >-
        It represents the order size in contract units. (Optional, may be absent
        in historical data).
      type: number
    timestamp:
      description: The timestamp (milliseconds since the Unix epoch)
      example: 1536569522277
      type: integer
    direction:
      description: 'Direction: `buy`, or `sell`'
      enum:
        - buy
        - sell
      type: string
    display_amount:
      description: >-
        The actual display amount of iceberg order. Absent for other types of
        orders.
      type: number
    filled_amount:
      description: >-
        Filled amount of the order. For perpetual and futures the filled_amount
        is in USD units, for options - in units or corresponding cryptocurrency
        contracts, e.g., BTC or ETH.
      type: number
    implv:
      description: Implied volatility in percent. (Only if `advanced="implv"`)
      type: number
    is_secondary_oto:
      description: >-
        `true` if the order is an order that can be triggered by another order,
        otherwise not present.
      type: boolean
    label:
      description: User defined label (up to 64 characters)
      type: string
    mobile:
      description: >-
        Optional field with value `true` added only when created with Mobile
        Application
      type: boolean
    oco_ref:
      description: Unique reference that identifies a one_cancels_others (OCO) pair.
      type: string
    order_id:
      description: Unique order identifier
      example: ETH-100234
      type: string
    order_state:
      description: >-
        Order state: `"open"`, `"filled"`, `"rejected"`, `"cancelled"`,
        `"untriggered"`
      enum:
        - open
        - filled
        - rejected
        - cancelled
        - untriggered
        - triggered
      type: string
    order_type:
      description: >-
        Order type: `"limit"`, `"market"`, `"stop_limit"`, `"stop_market"`,
        `"take_limit"`, `"take_market"`, `"trailing_stop"`
      enum:
        - market
        - limit
        - stop_market
        - stop_limit
        - take_market
        - take_limit
        - trailing_stop
      type: string
    original_order_type:
      description: Original order type. Optional field
      enum:
        - market
        - market_limit
      type: string
    post_only:
      description: '`true` for post-only orders only'
      type: boolean
    open_order_price:
      description: >-
        Price in base currency or "market_price" in case of open trigger market
        orders
      oneOf:
        - type: number
        - enum:
            - market_price
          type: string
    reduce_only:
      description: Optional (not added for spot). '`true` for reduce-only orders only'
      type: boolean
    refresh_amount:
      description: >-
        The initial display amount of iceberg order. Iceberg order display
        amount will be refreshed to that value after match consuming actual
        display amount. Absent for other types of orders
      type: number
    reject_post_only:
      description: >-
        `true` if order has `reject_post_only` flag (field is present only when
        `post_only` is `true`)
      type: boolean
    time_in_force:
      description: >-
        Order time in force: `"good_til_cancelled"`, `"good_til_day"`,
        `"fill_or_kill"` or `"immediate_or_cancel"`
      enum:
        - good_til_cancelled
        - good_til_day
        - fill_or_kill
        - immediate_or_cancel
      type: string
    trigger:
      description: >-
        Trigger type (only for trigger orders). Allowed values: `"index_price"`,
        `"mark_price"`, `"last_price"`.
      enum:
        - index_price
        - mark_price
        - last_price
      type: string
    trigger_fill_condition:
      description: >-
        <p>The fill condition of the linked order (Only for linked order types),
        default: `first_hit`.</p> <ul> <li>`"first_hit"` - any execution of the
        primary order will fully cancel/place all secondary orders.</li>
        <li>`"complete_fill"` - a complete execution (meaning the primary order
        no longer exists) will cancel/place the secondary orders.</li>
        <li>`"incremental"` - any fill of the primary order will cause
        proportional partial cancellation/placement of the secondary order. The
        amount that will be subtracted/added to the secondary order will be
        rounded down to the contract size.</li> </ul>
      enum:
        - first_hit
        - complete_fill
        - incremental
      type: string
    trigger_offset:
      description: >-
        The maximum deviation from the price peak beyond which the order will be
        triggered (Only for trailing trigger orders)
      type: number
    trigger_price:
      description: Trigger price (Only for future trigger orders)
      type: number
    trigger_reference_price:
      description: >-
        The price of the given trigger at the time when the order was placed
        (Only for trailing trigger orders)
      type: number
    triggered:
      description: Whether the trigger order has been triggered
      type: boolean
    usd:
      description: Option price in USD (Only if `advanced="usd"`)
      type: number
    web:
      description: '`true` if created via Deribit frontend (optional)'
      type: boolean
  responses:
    PrivateGetOpenOrdersResponse:
      content:
        application/json:
          examples:
            response:
              description: Response example
              value:
                id: 1953
                jsonrpc: '2.0'
                result:
                  - amount: 10
                    api: true
                    average_price: 0
                    creation_timestamp: 1550050597036
                    direction: buy
                    filled_amount: 0
                    instrument_name: BTC-15FEB19-3250-P
                    is_liquidation: false
                    is_rebalance: false
                    label: fooBar
                    last_update_timestamp: 1550050597036
                    max_show: 10
                    order_id: '146062'
                    order_state: open
                    order_type: limit
                    post_only: false
                    price: 0.0028
                    reduce_only: false
                    time_in_force: good_til_cancelled
          schema:
            $ref: '#/components/schemas/PrivateGetOpenOrdersResponse'
      description: Success response

````