> ## 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_leg_prices

> Returns individual leg prices for a given combo structure based on an aggregated price of the strategy and the mark prices of the individual legs.

**Note:** Leg prices change dynamically with mark price fluctuations, and the algorithm is calibrated only for conventional option structures and future spreads. This method supports both inverse strategies and known linear structures within a single currency pair.

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

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




## OpenAPI

````yaml /api-reference/coinbase-deribit-app-api/adv-starbase-openapi.json get /private/get_leg_prices
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_leg_prices:
    get:
      tags:
        - Combo Books
        - Private
      description: >
        Returns individual leg prices for a given combo structure based on an
        aggregated price of the strategy and the mark prices of the individual
        legs.


        **Note:** Leg prices change dynamically with mark price fluctuations,
        and the algorithm is calibrated only for conventional option structures
        and future spreads. This method supports both inverse strategies and
        known linear structures within a single currency pair.


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


        **Scope:** `rat#view` or `wallet:user:read`
      parameters:
        - description: List of legs for which the prices will be calculated
          explode: true
          in: query
          name: legs
          required: true
          schema:
            items:
              properties:
                amount:
                  $ref: '#/components/schemas/amount'
                  description: >-
                    It represents the requested trade size. For perpetual and
                    inverse futures the amount is in USD units. For options and
                    linear futures it is the underlying base currency coin.
                direction:
                  $ref: '#/components/schemas/direction'
                  description: Direction of selected leg
                instrument_name:
                  $ref: '#/components/schemas/instrument_name'
                  description: Instrument name
              type: object
            type: array
          style: form
        - description: Price for the whole leg structure
          in: query
          name: price
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            examples:
              request:
                description: JSON-RPC Request Example
                value:
                  id: 1
                  jsonrpc: '2.0'
                  method: private/get_leg_prices
                  params:
                    legs:
                      - amount: 2
                        direction: buy
                        instrument_name: BTC-1NOV24-67000-C
                      - amount: 2
                        direction: sell
                        instrument_name: BTC-1NOV24-66000-C
                    price: 0.6
        description: JSON-RPC request body
      responses:
        '200':
          $ref: '#/components/responses/PrivateGetLegPricesResponse'
components:
  schemas:
    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
    direction:
      description: 'Direction: `buy`, or `sell`'
      enum:
        - buy
        - sell
      type: string
    instrument_name:
      description: Unique instrument identifier
      example: BTC-PERPETUAL
      type: string
    PrivateGetLegPricesResponse:
      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:
          properties:
            amount:
              description: >-
                This value multiplied by the ratio of a leg gives trade size on
                that leg.
              type: number
            legs:
              $ref: '#/components/schemas/leg_structure'
          type: object
      required:
        - jsonrpc
        - result
      type: object
    leg_structure:
      items:
        properties:
          direction:
            description: 'Direction: `buy`, or `sell`'
            enum:
              - buy
              - sell
            type: string
          instrument_name:
            description: Unique instrument identifier
            example: BTC-PERPETUAL
            type: string
          price:
            description: Price for a leg
            type: number
          ratio:
            description: Ratio of amount between legs
            type: integer
        type: object
      type: array
  responses:
    PrivateGetLegPricesResponse:
      content:
        application/json:
          examples:
            response:
              description: Response example
              value:
                id: 1
                jsonrpc: '2.0'
                result:
                  amount: 2
                  legs:
                    - direction: buy
                      instrument_name: BTC-1NOV24-67000-C
                      price: 0.6001
                      ratio: 1
                    - direction: sell
                      instrument_name: BTC-1NOV24-66000-C
                      price: 0.0001
                      ratio: 1
          schema:
            $ref: '#/components/schemas/PrivateGetLegPricesResponse'
      description: Success response

````