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

# Get Contract Pricing

> Derive IV and Greeks and estimate margin, fees, and liquidation for an order.



## OpenAPI

````yaml POST /contracts/pricing
openapi: 3.1.0
info:
  title: Options API
  version: 1.0.0
  description: >-
    REST endpoints for Rails Options. Base URLs vary by environment — see the
    Environments page. Authorize with the access token obtained from the Auth
    API.
servers:
  - url: https://api-options.sandbox.rails.xyz
security:
  - bearerAuth: []
paths:
  /contracts/pricing:
    post:
      summary: Get Contract Pricing
      description: >-
        For a given option contract, side, quantity, and candidate premium,
        derives the implied volatility and Greeks (by inverting Black-76 from
        the price) and estimates the margin, fees, buying power, and liquidation
        price for the order against your current account state.
      operationId: getOptionsContractPricing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - market
                - side
                - forward
                - price
                - riskFreeRate
                - qty
              properties:
                market:
                  type: string
                  description: >-
                    Option contract name, e.g. `BTC-19JUN26-62000-C`. Strike,
                    expiry, and type are derived from it.
                side:
                  type: string
                  description: 'Order side: `buy` or `sell`.'
                forward:
                  type: string
                  description: Forward price of the underlying (positive decimal).
                price:
                  type: string
                  description: >-
                    Candidate option premium to evaluate (non-negative decimal).
                    Implied volatility and Greeks are derived from it.
                riskFreeRate:
                  type: string
                  description: Annualized risk-free rate as a decimal, e.g. `0.05`.
                qty:
                  type: string
                  description: Order quantity (positive decimal).
            example:
              market: BTC-3JUL26-62000-C
              side: buy
              forward: '61665.1057145'
              price: '150.00'
              riskFreeRate: '0.05'
              qty: '1'
      responses:
        '200':
          description: Pricing, Greeks, and order estimates
          content:
            application/json:
              schema:
                type: object
                properties:
                  input:
                    type: object
                    description: Echo of the request inputs.
                  iv:
                    type: string
                    description: Implied volatility derived from the supplied price.
                  markPrice:
                    type: string
                    description: Current mark price of the contract.
                  delta:
                    type: string
                  gamma:
                    type: string
                  vega:
                    type: string
                  theta:
                    type: string
                  rho:
                    type: string
                  buyingPower:
                    type: string
                    description: Buying power available for this order.
                  estimatedFees:
                    type: string
                    description: Estimated fees for the order.
                  marginUsed:
                    type: string
                    description: Margin the order would consume.
                  estimatedLiquidationPrice:
                    type: string
                    description: Estimated liquidation price after the order.
                  newAvailableBalance:
                    type: string
                    description: Projected available balance after the order.
              example:
                input:
                  market: BTC-3JUL26-62000-C
                  side: buy
                  forward: '61665.1057145'
                  price: '150.00'
                  riskFreeRate: '0.05'
                  qty: '1'
                iv: '0.3041'
                markPrice: '149.16'
                delta: '0.3222'
                gamma: '0.00050170'
                vega: '8.4473'
                theta: '-240.74'
                rho: '-0.002176'
                buyingPower: '10000.00'
                estimatedFees: '18.50'
                marginUsed: '174.75'
                estimatedLiquidationPrice: '0.00'
                newAvailableBalance: '9806.75'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````