Skip to main content

Calculate an order quote by value

This endpoint does not create an order.

It processes the order as if it were placed, returning estimated cost and bundles allocations.

Parameters
valuestring^[0-9]+(\.[0-9]+)?$required

Maximum price of CO2 offsets to purchase (in the account's currency).

value must not be lower than the currency's minimum unit.


bundle_selectionarray of object

Bundle selection percentages.

The sum of all percentages must equal 100.

If not specified, the preconfigured allocation ratios are going to be used.

If, for each selection, percentage is not provided, the selection is divided equally (best effort) between bundles. percentage must be provided for all or none of the bundles.


quantity_truncenum

Unit, t for tonne, kg for kilogram, g for gram

Enum:
  • g
  • kg
  • t
Returns
currencystringrequired

Currency code


estimated_quantitystring^[0-9]+(\.[0-9]+)?$required

Estimated quantity (tonnes CO2).

May be lower than requested_quantity.


estimated_offset_coststring^[0-9]+(\.[0-9]+)?$required

Estimated offset cost

Unit: order quote currency


estimated_total_coststring^[0-9]+(\.[0-9]+)?$required

Estimated total cost inclusive of Lune fees.

Unit: order quote currency


estimated_commissionstring^[0-9]+(\.[0-9]+)?$required

Estimated commission


bundlesarray of objectrequired

Bundles included in the quote including quantity and cost breakdown.


requested_valuestring^[0-9]+(\.[0-9]+)?$required

Requested order value inclusive of commission


requested_quantitystring^[0-9]+(\.[0-9]+)?$required

Requested quantity of CO2 offsets to purchase in tonnes.

  • POST /orders/by-value/quote
  • curl 'https://api.lune.co/v1/orders/by-value/quote' \
      -H 'Authorization: Bearer <API_KEY>' \
      -H 'Content-Type: application/json' \
      -X POST \
      -d '{
        "value": "770.30"
      }'
      
  • Response
  • {
      "currency": "USD",
      "requested_value": "0.54",
      "estimated_offset_cost": "0.49",
      "estimated_total_cost": "0.54",
      "estimated_commission": "0.05",
      "estimated_quantity": "0.019137",
      "bundles": [
        {
          "bundle_id": "q9aKx7b6nNXMk3Yv3pD1mlW5Od2eLZE8",
          "bundle_name": "Conserving forests in Asia",
          "quantity": "0.018181",
          "unit_price": "13.57",
          "gross_unit_price": "15.08",
          "offset_cost": "0.25",
          "insufficient_available_quantity": null
        },
        {
          "bundle_id": "xWaKJL3okjD46VpJ4yGXnQNZRe1vzP0w",
          "bundle_name": "Ocean Carbon Removal",
          "quantity": "0.000956",
          "unit_price": "250",
          "gross_unit_price": "277.78",
          "offset_cost": "0.24",
          "insufficient_available_quantity": null
        }
      ]
    }