---
title: "List refining margins"
url: "https://developer.argaam.com/apis/macroeconomic-layer-api-sandbox-v1/versions/e4c9f983-817a-417e-bfa3-115c2b14f8bd/operations/getCommoditiesRefiningMargins"
---

> Full API specification: https://developer.argaam.com/apis/macroeconomic-layer-api-sandbox-v1/versions/e4c9f983-817a-417e-bfa3-115c2b14f8bd.md

# List refining margins

`GET` `/api/v1.1/commodities/refining-margins`

Operation ID: `getCommoditiesRefiningMargins`

Returns the refining margins available on this layer. Bound the result with the `from` and `to` date parameters.

## Query parameters

- `from` (string, optional) - Start of the date range, inclusive. Format `YYYY-MM-DD`.
- `to` (string, optional) - End of the date range, inclusive. Format `YYYY-MM-DD`.

## Responses

- `200` - Success

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Macroeconomic Layer API
  version: v1.1
servers:
  - url: https://api-sandbox.argaam.com
    description: Argaam API Gateway (Sandbox)
paths:
  /api/v1.1/commodities/refining-margins:
    get:
      tags:
        - Commodities
      parameters:
        - name: from
          in: query
          schema:
            type: string
          example: 2024-01-01
          description: Start of the date range, inclusive. Format `YYYY-MM-DD`.
        - name: to
          in: query
          schema:
            type: string
          example: 2024-03-31
          description: End of the date range, inclusive. Format `YYYY-MM-DD`.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ShippingPrice"
      summary: List refining margins
      description: |-
        Returns the refining margins available on this layer.

        Bound the result with the `from` and `to` date parameters.
      operationId: getCommoditiesRefiningMargins
security:
  - ApiKeyAuth: []
components:
  schemas:
    ShippingPrice:
      type: object
      properties:
        commodityID:
          type: integer
          format: int32
        commodityNameEn:
          type: string
          nullable: true
        commodityNameAr:
          type: string
          nullable: true
        forDate:
          type: string
          format: date-time
        price:
          type: number
          format: double
          nullable: true
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
```
