Prerequisites
Install the BlackSwan JavaScript SDK:Overview
This tutorial shows how to build a credit dashboard displaying trust score, APR, and loan history.Using React
The example below creates aCreditDashboard component that fetches data in parallel using getCreditDashboard and getCreditHistory, then displays the results. APR values from the SDK are in basis points, so divide by 1000 to get a percentage.
Understanding APR Values
The SDK returns APR as an integer in basis points. For example, a raw value of142 represents 0.142%, calculated as 142 / 1000. Always divide by 1000 when displaying APR to your users.