Quickstart Guide
Get up and running with Fincept API in under 5 minutes. This guide walks you through registration, authentication, and making your first API call.
Step 1: Register for an API Key
Choose between a permanent registered account or temporary guest access for testing.
Option A: Registered User (Recommended)
Create a permanent account with full access and credit management:
curl -X POST https://api.fincept.in/user/register \
-H "Content-Type: application/json" \
-d '{
"username": "johndoe",
"email": "john@example.com",
"password": "SecurePassword123!"
}'
Response:
{
"success" : true ,
"message" : "Registration successful. Please verify your email with the OTP sent."
}
Verify your email with the OTP received:
curl -X POST https://api.fincept.in/user/verify-otp \
-H "Content-Type: application/json" \
-d '{
"email": "john@example.com",
"otp": "123456"
}'
Response:
{
"success" : true ,
"data" : {
"api_key" : "fk_user_abc123xyz789..." ,
"message" : "Account verified successfully"
}
}
Save your API key - you’ll need it for all API requests!
Option B: Guest User (Testing Only)
Get a temporary 24-hour API key for testing:
curl -X POST https://api.fincept.in/guest/create \
-H "Content-Type: application/json" \
-d '{
"device_id": "my-test-device"
}'
Response:
{
"success" : true ,
"data" : {
"api_key" : "fk_guest_temp123..." ,
"credit_balance" : 50 ,
"expires_at" : "2024-01-16T10:30:00Z"
}
}
Guest keys have limited credits (50) and expire after 24 hours. Register for a permanent account to get 350 free credits that never expire!
Step 2: Check Your Credit Balance
Verify your account is active and check available credits:
curl https://api.fincept.in/user/profile \
-H "X-API-Key: fk_user_your_key_here"
Response:
{
"success" : true ,
"data" : {
"id" : 42 ,
"username" : "johndoe" ,
"email" : "john@example.com" ,
"account_type" : "free" ,
"credit_balance" : 350 ,
"is_verified" : true
}
}
Step 3: Make Your First API Call
Let’s price a European call option using the Black-Scholes model.
Example: Price an Option
curl -X POST https://api.fincept.in/quantlib/pricing/black-scholes \
-H "X-API-Key: fk_user_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"spot": 100,
"strike": 105,
"rate": 0.05,
"volatility": 0.2,
"time_to_maturity": 0.25,
"option_type": "call"
}'
Response:
{
"success" : true ,
"data" : {
"price" : 2.4561 ,
"delta" : 0.5432 ,
"gamma" : 0.0284 ,
"vega" : 0.1561 ,
"theta" : -0.0121 ,
"rho" : 0.0892
}
}
Congratulations! You just priced an option and calculated all Greeks in one API call.
Step 4: Explore More Capabilities
Calculate Bond Price
Price a bond with given yield:
curl -X POST https://api.fincept.in/quantlib/pricing/bond-price \
-H "X-API-Key: fk_user_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"face_value": 1000,
"coupon_rate": 0.05,
"yield": 0.04,
"years_to_maturity": 5,
"frequency": 2
}'
Build a Yield Curve
Construct a yield curve from market rates:
curl -X POST https://api.fincept.in/quantlib/curves/yield-curve \
-H "X-API-Key: fk_user_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"dates": ["2024-01-15", "2024-07-15", "2025-01-15", "2026-01-15"],
"rates": [0.02, 0.025, 0.03, 0.035],
"method": "linear"
}'
Calculate Portfolio VaR
Compute Value at Risk for a portfolio:
curl -X POST https://api.fincept.in/quantlib/risk/var \
-H "X-API-Key: fk_user_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"returns": [-0.02, 0.01, -0.015, 0.03, -0.01, 0.02],
"confidence_level": 0.95,
"method": "historical"
}'
Common Patterns
Working with Dates
All dates use ISO 8601 format (YYYY-MM-DD):
{
"settlement_date" : "2024-01-15" ,
"maturity_date" : "2025-01-15"
}
Error Handling
The API returns detailed error messages:
{
"success" : false ,
"message" : "Insufficient credits" ,
"detail" : "Required: 2 credits, Available: 0.5 credits. Please purchase a new plan to continue."
}
Common HTTP status codes:
200 - Success
400 - Bad request (invalid parameters)
401 - Unauthorized (invalid/missing API key)
402 - Insufficient credits
403 - Forbidden (tier access required)
500 - Server error
Check Available Endpoints
Browse all endpoints for a specific tier:
Free Tier (Core & Scheduling):
Basic Tier (Statistics, Numerical, Solver, Economics):
Requires Basic tier or higher subscription
Standard Tier (Analysis, Curves, Pricing, Instruments, Stochastic, Volatility):
Requires Standard tier or higher subscription
Pro Tier (Models, Portfolio, Risk, Regulatory, ML, Physics):
Requires Pro tier subscription
Credit Costs
All QuantLib endpoints cost credits based on tier:
Tier Cost per Request Free 0 credits Basic 1 credit Standard 2 credits Pro 5 credits
See the Pricing page for detailed credit information.
Quick Reference
All requests (except registration/login) require the API key header:
-H "X-API-Key: fk_user_your_key_here"
Base URL
Content Type
All POST requests require JSON content type:
-H "Content-Type: application/json"
Next Steps
Authentication Guide Learn about API key management, security, and MFA
Pricing Details Understand credit costs and subscription tiers
QuantLib Overview Explore all 18 modules and 497+ endpoints
API Reference Browse complete endpoint documentation
Code Examples
Python
import requests
API_KEY = "fk_user_your_key_here"
BASE_URL = "https://api.fincept.in"
headers = {
"X-API-Key" : API_KEY ,
"Content-Type" : "application/json"
}
# Price an option
response = requests.post(
f " { BASE_URL } /quantlib/pricing/black-scholes" ,
headers = headers,
json = {
"spot" : 100 ,
"strike" : 105 ,
"rate" : 0.05 ,
"volatility" : 0.2 ,
"time_to_maturity" : 0.25 ,
"option_type" : "call"
}
)
data = response.json()
print ( f "Option Price: { data[ 'data' ][ 'price' ] } " )
print ( f "Delta: { data[ 'data' ][ 'delta' ] } " )
JavaScript
const API_KEY = "fk_user_your_key_here" ;
const BASE_URL = "https://api.fincept.in" ;
async function priceOption () {
const response = await fetch ( ` ${ BASE_URL } /quantlib/pricing/black-scholes` , {
method: "POST" ,
headers: {
"X-API-Key" : API_KEY ,
"Content-Type" : "application/json"
},
body: JSON . stringify ({
spot: 100 ,
strike: 105 ,
rate: 0.05 ,
volatility: 0.2 ,
time_to_maturity: 0.25 ,
option_type: "call"
})
});
const data = await response . json ();
console . log ( "Option Price:" , data . data . price );
console . log ( "Delta:" , data . data . delta );
}
priceOption ();
Getting Help
Need assistance? We’re here to help:
Documentation : Browse our comprehensive guides and API reference
Email Support : support@fincept.in
GitHub Issues : Report bugs or request features
Discord Community : Join discussions with other developers
Ready to build something amazing? Start exploring our API Reference or check out the QuantLib Overview for detailed module documentation.