Skip to main content
The BlackSwan credit dashboard brings together trust score, current APR, and loan history into a single view. This tutorial walks you through fetching that data from the BlackSwan SDK and rendering it in a React component.

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 a CreditDashboard 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 of 142 represents 0.142%, calculated as 142 / 1000. Always divide by 1000 when displaying APR to your users.