# LunarCrush

> Pull crypto and social market intelligence - coins, time-series, topics, posts, categories and stocks - with the LunarCrush API.

Lets an agent pull crypto and social market intelligence from LunarCrush (API v4): coin lists with Galaxy Score and AltRank, per-coin detail and time-series, social topics with their news and top posts, categories, and a social-ranked stocks list.

## What it can do

| Method | What it does |
| --- | --- |
| `lunarcrush_coins_list` | List coins with market + social metrics, sorted/filtered. |
| `lunarcrush_coin_get` | One coin's price, market data and social metrics. |
| `lunarcrush_coin_time_series` | Historical price + social metrics for a coin. |
| `lunarcrush_topics_list` | List trending social topics. |
| `lunarcrush_topic_get` | A topic's social summary (volume, sentiment, contributors). |
| `lunarcrush_topic_news` | Latest news for a topic. |
| `lunarcrush_topic_posts` | Top social posts for a topic. |
| `lunarcrush_categories_list` | List social categories. |
| `lunarcrush_stocks_list` | List stocks with market + social metrics. |
| `lunarcrush_request` | Generic passthrough to any v4 endpoint for full coverage. |

## How to get your key

The API authenticates with an `Authorization: Bearer <key>` header.

1. Sign in at [LunarCrush](https://lunarcrush.com/).
2. Open **Settings -> API** ([lunarcrush.com/developers/api](https://lunarcrush.com/developers/api)).
3. Generate or copy your API key (an active subscription is required for most endpoints).
4. Paste it into FlyMyAI.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `LUNARCRUSH_API_KEY` | LunarCrush -> Settings -> API |

## Troubleshooting

- **`401 Unauthorized`** - the key is wrong or your subscription lapsed. Re-copy the key or renew.
- **`402` / `403`** - the endpoint or rate is not in your plan. Upgrade your LunarCrush subscription.
- **`429 Too Many Requests`** - you hit the request limit. Slow down or upgrade.
- **Unknown coin / topic** - use the right identifier: coins take a symbol or numeric id (`BTC`, `ETH`); topics take a slug (`bitcoin`, `ethereum`).

## Links

- [LunarCrush API settings / key](https://lunarcrush.com/developers/api)
- [LunarCrush API documentation](https://lunarcrush.com/developers/api/endpoints)
