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

# Get sentiment by pair

> Retrieve sentiment data for a specific currency pair

## Path parameters

<ParamField path="pair" type="string" required>
  Currency pair (e.g., "EURUSD", "GBPUSD")
</ParamField>

## Query parameters

<ParamField query="startDate" type="string">
  Filter results from this date (ISO 8601 format)
</ParamField>

<ParamField query="endDate" type="string">
  Filter results until this date (ISO 8601 format)
</ParamField>

## Response

Returns an array of sentiment data formatted for charting, sorted by date (oldest first).

<ResponseField name="data" type="array">
  Array of chart data points

  <Expandable title="data point">
    <ResponseField name="date" type="string">
      Timestamp
    </ResponseField>

    <ResponseField name="long" type="number">
      Long position percentage
    </ResponseField>

    <ResponseField name="short" type="number">
      Short position percentage
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api-verifier-2.onrender.com/api/sentiment/EURUSD?startDate=2024-01-01&endDate=2024-01-15"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "date": "2024-01-01T00:00:00.000Z",
      "long": 48,
      "short": 52
    },
    {
      "date": "2024-01-02T00:00:00.000Z",
      "long": 45,
      "short": 55
    },
    {
      "date": "2024-01-03T00:00:00.000Z",
      "long": 51,
      "short": 49
    }
  ]
  ```
</ResponseExample>
