Documentation Index
Fetch the complete documentation index at: https://coinstats.app/docs/llms.txt
Use this file to discover all available pages before exploring further.

state value.
What value this gives
- Add wallet and exchange connection to your product without building exchange credential forms yourself.
- Keep API keys out of browser code. The ConnectKit ID is public; the API key remains server-side.
- Receive a
portfolioId,connectionId, and your originalstatewhen the connection finishes. - Control which domains can open ConnectKit with allowed origins and redirect URLs.
Example values
Use values like these while testing the flow:| Field | Example value | Where it is used |
|---|---|---|
| Name | Example App Portfolio | Internal dashboard name |
| Company name | Example App | Displayed inside the hosted popup |
| Allowed origin | https://app.example.com | The browser origin allowed to open ConnectKit |
| Redirect URL | https://app.example.com/coinstats/callback | Where CoinStats sends the user after connection |
| ConnectKit ID | pcw_3d349bd92f0c99a219 | Public ID used by your frontend |
| State | user_12345 | Your user/session reference returned with the result |
Set up ConnectKit
Open ConnectKit settings
Go to the API dashboard, open ConnectKit, and click Add.
Add the trusted values
Fill in the fields that define where ConnectKit can run and how it appears to users:
- Company logo: Upload the logo shown in the hosted connection popup.
- Name: Add an internal name for this setup, such as
testorprod_app. - Company name: Add the app or brand name users will see, such as
Example App. - Allowed origins: Add every browser origin allowed to open ConnectKit.
- Redirect URLs: Add the exact callback URLs CoinStats can return to after connection, one per environment.
- Config: Choose the default mode, appearance, and accent color if you want defaults different from the SDK call.

NPM integration
Install the SDK:Script tag integration
For plain HTML pages, load the hosted browser bundle:Handle the result
When the user finishes, match the returnedstate with the user or session that started the flow. Store the returned portfolioId or connectionId on your side.
Example redirect:
Before going live
- Add every production origin that can open the popup.
- Use HTTPS redirect URLs in production.
- Generate and keep the API key in the CoinStats API dashboard.
- Store the returned portfolio or connection ID with your user.
- Keep API keys server-side. The frontend only needs the ConnectKit ID.
