Skip to main content
POST
/
quantlib
/
economics
/
equilibrium
/
exchange-economy
Exchange Economy Analysis
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/economics/equilibrium/exchange-economy \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "endowments": [
    [
      10,
      5
    ],
    [
      5,
      10
    ]
  ],
  "alphas": [
    0.6,
    0.4
  ],
  "prices": [
    1,
    1
  ]
}
'
{
  "success": true,
  "data": {
    "aggregate_endowment": [
      15,
      15
    ],
    "excess_demand": [
      3,
      -3
    ],
    "walras_law_check": 0,
    "prices_used": [
      1,
      1
    ]
  }
}

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
endowments
number[][]
required

Initial endowments for each consumer [[e1_good1, e1_good2], [e2_good1, e2_good2]]

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

Cobb-Douglas preference parameters for each consumer [alpha1, alpha2]

Required array length: 2 elements
Required range: 0 <= x <= 1
Example:
[0.6, 0.4]
prices
number[] | null

Prices to evaluate excess demand at [p1, p2]. If null, uses [1.0, 1.0]

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

Response

Successful Response

success
boolean
Example:

true

data
object