Skip to main content
POST
/
quantlib
/
numerical
/
interpolation
/
spline-curve
Evaluate Cubic Spline at Multiple Points
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/numerical/interpolation/spline-curve \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "x_data": [
    0,
    1,
    2,
    3,
    4
  ],
  "y_data": [
    0,
    1,
    0.5,
    0.75,
    1.5
  ],
  "xi": [
    0.5,
    1.5,
    2.5,
    3.5
  ],
  "bc_type": "natural"
}
'
{
  "success": true,
  "data": {
    "points": [
      {
        "xi": 0.5,
        "value": 0.531
      },
      {
        "xi": 1.5,
        "value": 0.828
      },
      {
        "xi": 2.5,
        "value": 0.594
      },
      {
        "xi": 3.5,
        "value": 1.078
      }
    ],
    "bc_type": "natural"
  }
}

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 data points

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

Y coordinates of data points

Example:
[0, 1, 0.5, 0.75, 1.5]
xi
number[]
required

Points at which to evaluate the spline

Example:
[0.5, 1.5, 2.5, 3.5]
bc_type
enum<string>
default:natural

Boundary condition type

Available options:
natural,
clamped,
periodic
Example:

"natural"

Response

Successful Response

success
boolean
Example:

true

data
object