FairScale

Credit Score Endpoint

Full credit assessment with institutional-grade underwriting opinion, risk flags, and lending terms

Credit Score Endpoint

GET /v1/credit

Returns a comprehensive credit assessment for any Solana wallet. Includes a 0–100 credit score, five credit pillars, a full underwriting opinion, recommended lending terms, risk flags, affordability analysis, and an on-chain attestation.

Both human wallets and agent wallets are supported.

Endpoint URL

https://agent-api.fairscale.xyz/v1/credit?wallet=WALLET_ADDRESS

Parameters

ParameterTypeRequiredDescription
walletstringYesSolana wallet address
amountnumberNoRequested loan amount in USD (default: 1000)
nocache0 or 1NoBypass 15-minute cache (default: 0)

Headers

HeaderValueRequired
X-Api-KeyYour FairScale API keyYes
x-social-identity(optional) social proofNo

Pricing: Credit assessment costs $0.50 USDC via x402 (per-request), or is deducted from your plan. See Authentication.

Example Request

curl "https://agent-api.fairscale.xyz/v1/credit?wallet=WALLET_ADDRESS&amount=5000" \
  -H "X-Api-Key: zpka_your_key_here"

Response Structure

{
  "wallet": "WALLET_ADDRESS",
  "fairscore": 72,
  "fairscore_tier": "gold",
  "credit_score": 68,
  "risk_band": "near_prime",
  "confidence": { ... },
  "underwriting": { ... },
  "credit_pillars": { ... },
  "affordability": { ... },
  "trust_pillars": { ... },
  "credit_data": { ... },
  "flags": { ... },
  "attestation": { ... },
  "meta": { ... }
}

Top-Level Fields

FieldTypeDescription
walletstringThe assessed wallet address
fairscorenumberTrust score (0–100)
fairscore_tierstringplatinum, gold, silver, bronze, unverified
credit_scorenumberCredit score (0–100)
risk_bandstringprime, near_prime, subprime, deep_subprime, decline

Risk Bands

BandScoreMeaning
prime75–100Eligible for unsecured or minimal-collateral credit
near_prime60–74Recommended with moderate collateral
subprime45–59Conditional — full collateralisation, short terms
deep_subprime25–44High-risk — over-collateralised lending only
decline0–24Insufficient creditworthiness

Confidence

Measures how much on-chain data was available, not wallet quality. A high-confidence low score is reliable. A low-confidence high score may be inflated.

{
  "confidence": {
    "score": 72,
    "level": "high",
    "summary": "This assessment is based on 156 transactions over 412 days. Data confidence: High.",
    "limitations": []
  }
}
FieldTypeDescription
scorenumberConfidence score (0–100)
levelstringhigh (70+), medium (40–69), low (0–39)
summarystringHuman-readable summary
limitationsstring[]Data gaps affecting reliability

Underwriting

The core of the credit response. Contains the full analyst opinion, lending terms, and risk flags.

Opinion

A multi-paragraph narrative covering entity profile, collateral, obligations, revenue, repayment capacity, and a final recommendation with pillar breakdown.

{
  "underwriting": {
    "opinion": "This wallet holds $42,150 in on-chain assets — established (1.1 years, 156 transactions). SAID-verified agent identity, active across Kamino and Marginfi. Asset coverage 8.4x. Strong revenue: $3,200/month. Clean lending: 12 borrows, 100% repayment. Assessment: 68/100 (Near Prime). Recommended with moderate collateral.",
    "lending_terms": { ... },
    "risk_flags": [ ... ],
    "data_confidence": { ... }
  }
}

Lending Terms

Recommended terms derived from credit score, affordability, identity, and risk signals. These are suggestions, not decisions.

{
  "lending_terms": {
    "recommendation": "Recommended with moderate collateral. SAID-verified identity.",
    "suggested_apr_range": { "low": 7, "high": 14 },
    "collateral_ratio": 1.0,
    "collateral_note": "100% collateral recommended",
    "max_credit_line": 4215,
    "max_term_days": 60,
    "identity_level": "said",
    "identity_enhanced": true
  }
}
FieldTypeDescription
recommendationstringNarrative recommendation
suggested_apr_rangeobject{ low, high } — annual percentage rate range
collateral_rationumberRecommended collateral ratio (0 = unsecured eligible, 2.0 = 200%)
collateral_notestringHuman-readable guidance
max_credit_linenumberMaximum recommended credit line in USD
max_term_daysnumberMaximum recommended loan term in days (7–90)
identity_levelstringkyc, strong, said, matrica, partial, none
identity_enhancedbooleanWhether identity verification improved terms

Risk Flags

Sorted by severity: criticalwarningpositive.

{
  "risk_flags": [
    {
      "type": "positive",
      "signal": "Strong asset coverage",
      "detail": "8.4x coverage provides a substantial collateral buffer."
    },
    {
      "type": "positive",
      "signal": "Clean credit history",
      "detail": "12 borrows executed with 100% repayment rate."
    },
    {
      "type": "warning",
      "signal": "Limited transaction data",
      "detail": "Only 8 transactions available. Reduced confidence."
    }
  ]
}
TypeMeaning
criticalActive default risk, near-liquidation, high leverage
warningWeak income, new wallet, limited data, low-trust funding
positiveStrong coverage, clean history, verified identity

Credit Pillars

Five pillars composing the credit score (0–100 each).

{
  "credit_pillars": {
    "financial_position": { "score": 74 },
    "credit_history":     { "score": 65 },
    "income_capacity":    { "score": 72 },
    "behavioural":        { "score": 58 },
    "identity_trust":     { "score": 71 }
  }
}
PillarMeasures
financial_positionAsset holdings, stablecoin allocation, balance stability
credit_historyDeFi borrow/repay track record, liquidations, protocol engagement
income_capacityRevenue flow, debt service ratio, income diversification
identity_trustIdentity verification, social accounts, network quality
behaviouralHolding behaviour, operational consistency

Attestation

HMAC-SHA256 signed proof that FairScale produced this score. Store alongside the loan record.

{
  "attestation": {
    "type": "signed_response",
    "payload_hash": "a1b2c3d4e5f6...",
    "payload_fields": "wallet|credit_score|risk_band|scored_at",
    "note": "Store this hash alongside the loan record. FairScale can verify it on request."
  }
}

Meta

{
  "meta": {
    "provider": "FairScale",
    "version": "v3",
    "layer": "premium_credit",
    "amount_assessed": 5000,
    "latency_ms": 1842,
    "cached": false,
    "scored_at": "2026-04-07T12:00:00Z"
  }
}

SDK Usage

import { FairScale } from "@fairscale/sdk";

const client = new FairScale({ apiKey: process.env.FAIRSCALE_API_KEY });

const credit = await client.credit("WALLET_ADDRESS", { amount: 5000 });

console.log(credit.credit_score);                            // 68
console.log(credit.risk_band);                               // "near_prime"
console.log(credit.underwriting.lending_terms.max_credit_line); // 4215
console.log(credit.underwriting.risk_flags);