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

# Find asset and trader IDs

> Look up the numeric IDs that widgets and API filters use.

Widgets and API filters select assets and traders by numeric ID. Look the ID up once, check that it is the asset or trader you mean, then hard-code it in your snippet or configuration.

You need an API key with the `directory.read` scope. Run lookups from your server or terminal, never from browser code.

## Look up an asset

```sh theme={null}
curl --fail-with-body --get 'https://api.centaur.io/v2/assets' \
  -H "x-api-key: $CENTAUR_API_KEY" \
  --data-urlencode 'search=bitcoin' \
  --data-urlencode 'limit=20'
```

The response lists up to 20 candidates. Pick the one whose name and symbol you expect and copy its `id`. A search can match several assets, so read the candidates instead of taking the first one.

## Look up a trader

```sh theme={null}
curl --fail-with-body --get 'https://api.centaur.io/v2/traders' \
  -H "x-api-key: $CENTAUR_API_KEY" \
  --data-urlencode 'search=TRADER_NAME' \
  --data-urlencode 'limit=20'
```

## Use the ID

| Where | Option |
| - | - |
| Feed widget | `selection: { assetIds: [ID] }` or `selection: { traderIds: [ID] }` |
| Positioning widget | `selection: { assetId: ID }` |
| REST feed | `?assetIds=ID` or `?traderIds=ID` |

Copy only the ID into browser code, never the API key. Sample IDs such as `900001` exist only in sample mode. Replace them with verified IDs before making live requests.

If no candidate matches, refine the search. Do not remove the filter: an unfiltered widget or request shows the general feed, not the asset you wanted.

The [examples repository](https://github.com/centaur-io/centaur-api-examples/tree/e56d8e26fb58892cf6b2762503c316fd2a94c7bf/recipes) has TypeScript versions of these lookups; choose the intended ID before using it in a request.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.