Skip to main content
POST
/
quantlib
/
economics
/
equilibrium
/
cobb-douglas
Cobb-Douglas Consumer Demand
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/economics/equilibrium/cobb-douglas \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "alpha": 0.6,
  "income": 1000,
  "prices": [
    10,
    5
  ]
}
'
{
  "success": true,
  "data": {
    "demand": [
      60,
      80
    ],
    "utility": 68.96,
    "expenditure": 1000,
    "indirect_utility": 68.96
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
alpha
number
required

Preference parameter for good 1 (must be between 0 and 1). Represents the share of income spent on good 1.

Required range: 0 <= x <= 1
Example:

0.6

income
number
required

Consumer's total income or budget

Required range: x >= 0
Example:

1000

prices
number[]
required

Prices of the two goods [p1, p2]

Required array length: 2 elements
Required range: x >= 0
Example:
[10, 5]

Response

Successful Response

success
boolean
Example:

true

data
object