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

# Get a hedge request

> Where a request stands, by Mercora's `id` from the POST response. A caller that lost the response sends the POST again with the same `external_id`.

Scope: `hedge_requests`.



## OpenAPI

````yaml /api-reference/openapi.json get /hedge-requests/{id}
openapi: 3.1.0
info:
  title: Mercora API
  version: v1
  description: >-
    Your own systems call Mercora with a workspace API key. Bodies are JSON with
    a fixed schema; unknown fields are refused. Errors are `{ error }`, plus
    `issues` on a 422. A create carries your own `external_id`: sending it again
    returns what was created the first time.
servers:
  - url: https://{workspace}.mercora.io/api/v1
    description: Your Mercora workspace
    variables:
      workspace:
        default: your-company
        description: Your workspace subdomain
security: []
tags:
  - name: Hedge requests
    description: >-
      Read the hedge books and positions, push hedge requests into the Inbox,
      read where they stand.
  - name: Automations
    description: >-
      Start runs of automations set to run from the API. What a run would change
      still waits for a person in Mercora.
paths:
  /hedge-requests/{id}:
    get:
      tags:
        - Hedge requests
      summary: Get a hedge request
      description: >-
        Where a request stands, by Mercora's `id` from the POST response. A
        caller that lost the response sends the POST again with the same
        `external_id`.


        Scope: `hedge_requests`.
      operationId: getHedgeRequest
      parameters:
        - schema:
            type: string
            description: Mercora's id for the hedge, from the POST response.
          required: true
          description: Mercora's id for the hedge, from the POST response.
          name: id
          in: path
      responses:
        '200':
          description: The hedge request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HedgeRequest'
              example:
                id: 60d63a3f-d449-4ffa-bb76-78b7b308cfdb
                external_id: PC-2026-014/2026-10-03T11:00:00Z
                state: awaiting_approval
                reason: null
                plan:
                  book: 3f2a9c41-7b1e-4c55-9d0e-1a2b3c4d5e6f
                  commodity: cocoa
                  exchange: LDN
                  direction: SELL
                  lots: 2
                  futures_symbol: QCH7
                  cover_month: 2027-03
                  broker: Example Broker
                fill: null
                futures_trade_id: null
                agiboo:
                  position: MAIN FUTURES
                created_at: '2026-10-03T10:54:06.092Z'
                url: >-
                  https://<workspace>/queue?doc=action:60d63a3f-d449-4ffa-bb76-78b7b308cfdb
        '401':
          description: Key missing, unknown or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The key lacks the `hedge_requests` scope, or the resource's module
            is off for the workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No hedge request with that id on this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Ours, logged with the workspace and key. Retrying is safe.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    HedgeRequest:
      type: object
      properties:
        id:
          type: string
          description: 'Mercora''s id for the hedge: GET /hedge-requests/{id}.'
        external_id:
          type: string
          description: The caller's own id it was sent with.
        state:
          type: string
          enum:
            - processing
            - awaiting_approval
            - accumulated
            - merged
            - sending
            - awaiting_fill
            - filled
            - closed
            - dismissed
            - failed
          description: >-
            processing: being planned · awaiting_approval: planned, waiting for
            an operator to send, accumulate or dismiss it · accumulated: parked
            to go out with a later hedge on the same month · merged: folded into
            another hedge's order · sending: the broker order is going out ·
            awaiting_fill: order sent, waiting for the broker's fill · filled:
            fill recorded · closed: closed without a recorded fill · dismissed:
            an operator dismissed it · failed: could not be planned or sent;
            `reason` says why
        reason:
          type:
            - string
            - 'null'
          description: Why it failed, when `state` is failed.
        plan:
          type:
            - object
            - 'null'
          properties:
            book:
              type:
                - string
                - 'null'
              description: The book (hedge rule id) it was planned on.
            commodity:
              type: string
            exchange:
              type: string
            direction:
              type: string
              enum:
                - BUY
                - SELL
            lots:
              type: number
            futures_symbol:
              type: string
              description: Broker-facing contract symbol, e.g. "QCH7".
            cover_month:
              type:
                - string
                - 'null'
              description: >-
                YYYY-MM, as requested; null if the contract month cannot be
                read.
            broker:
              type: string
          required:
            - book
            - commodity
            - exchange
            - direction
            - lots
            - futures_symbol
            - cover_month
            - broker
          description: >-
            The order Mercora planned. Null while processing and when planning
            failed.
        fill:
          type:
            - object
            - 'null'
          properties:
            lots:
              type: number
            price:
              type: number
          required:
            - lots
            - price
          description: The broker's fill, once recorded.
        futures_trade_id:
          type:
            - string
            - 'null'
          description: The executed trade in Mercora's futures ledger, once filled.
        agiboo:
          type:
            - object
            - 'null'
          properties:
            position:
              type: string
          required:
            - position
          description: >-
            Only for a workspace that books hedges in Agiboo; null when the
            hedge names no Agiboo position.
        created_at:
          type: string
          description: ISO 8601 timestamp.
        url:
          type: string
          description: The hedge in the Mercora Inbox.
      required:
        - id
        - external_id
        - state
        - reason
        - plan
        - fill
        - futures_trade_id
        - agiboo
        - created_at
        - url
    Error:
      type: object
      properties:
        error:
          type: string
        issues:
          type: array
          items:
            type: object
            properties:
              field:
                type:
                  - string
                  - 'null'
              message:
                type: string
            required:
              - field
              - message
          description: 'On a 422: one entry per field that failed.'
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A workspace API key (mk_…), made under Settings → Administration → API.

````

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