Skip to main content
POST
/
quantlib
/
numerical
/
interpolation
/
evaluate
Interpolate Value
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/numerical/interpolation/evaluate \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "x_data": [
    0,
    1,
    2,
    3
  ],
  "y_data": [
    0,
    0.5,
    0.9,
    1.2
  ],
  "xi": 1.5,
  "method": "cubic_spline"
}
'
{
  "success": true,
  "data": {
    "xi": 1.5,
    "interpolated_value": 0.7125,
    "method": "cubic_spline"
  }
}

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

X coordinates of known data points (must be strictly increasing)

Example:
[0, 1, 2, 3]
y_data
number[]
required

Y coordinates of known data points

Example:
[0, 0.5, 0.9, 1.2]
xi
number
required

Point at which to interpolate

Example:

1.5

method
enum<string>
default:linear

Interpolation method

Available options:
linear,
cubic,
lagrange,
pchip,
monotone_convex,
cubic_spline
Example:

"cubic_spline"

Response

Successful Response

success
boolean
Example:

true

data
object