1. Run the starter app with sample data
You need Node.js 24 and npm. You do not need an account.Terminal
2. Switch to live data
- Create an API key in API key settings. See Get access for the account you need.
- Copy
.env.exampleto.env.local. - In
.env.local, set the mode and your key:.env.local - Restart
npm run dev.
CENTAUR_API_KEY or CENTAUR_DATA_MODE exported in your shell overrides .env.local.
3. Make it yours
lib/centaur.ts has no Next.js or React imports, so you can copy it into another TypeScript backend.
Call the API directly
Set the key in your terminal first:Terminal
Read and filter the feed
Terminal
assetIds for the general feed. Look up asset and trader IDs once during setup with Find IDs, not before every read.
Page back with meta.nextCursor (Pagination). For new activity, poll the feed or receive webhooks.
Handle errors
- Read the status and the error
code: Errors and limits says what each one means and when to retry. Add--includeto curl to see the status and headers. - In the TypeScript recipes, catch
CentaurApiErrorto readstatus,code,requestId, andretryAfter. The client does not retry on its own. - Keep upstream error details on your server and show visitors a safe message.