Skip to main content
POST
/
quantlib
/
solver
/
finance
/
g-spread
Calculate G-Spread
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/solver/finance/g-spread \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "bond_yield": 0.055,
  "govt_yield": 0.035
}
'
{
  "success": true,
  "data": {
    "g_spread": 0.02
  }
}

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
bond_yield
number
required

Yield to maturity of the bond as a decimal

Example:

0.055

govt_yield
number
required

Yield of the comparable government bond as a decimal

Example:

0.035

Response

Successful Response

success
boolean
Example:

true

data
object