> For the complete documentation index, see [llms.txt](https://docs.agentipy.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agentipy.fun/tools/rugcheck.md).

# RugCheck

The `RugCheck` tool, part of AgentiPy, is used to fetch information about Solana tokens from the RugCheck.xyz API (`https://api.rugcheck.xyz/v1`). It provides various endpoints to get token reports (summary and detailed), domain information, leaderboards, new/trending tokens, and LP locker details. This data can help assess the potential risks and community standing of a token.

## Functionality

This tool is implemented in the `RugCheckManager` class.

### Key Features:

* Initializes with an optional API key for authenticated requests.
* Provides methods to fetch:
  * **Token Reports**: `fetch_token_report_summary(mint: str)` and `fetch_token_detailed_report(mint: str)` return `TokenCheck` objects with risk assessments and details.
  * **Domain Information**: `fetch_all_domains()`, `fetch_domains_csv()`, `lookup_domain(domain_id: str)`, `fetch_domain_records(domain_id: str)`.
  * **Leaderboards & Stats**: `fetch_leaderboard()`, `fetch_new_tokens()`, `fetch_most_viewed_tokens()`, `fetch_trending_tokens()`, `fetch_recently_verified_tokens()`. These return lists of tokens or statistics.
  * **LP Lockers**: `fetch_token_lp_lockers(token_id: str)` and `fetch_token_flux_lp_lockers(token_id: str)` return `TokenLockers` data.
  * **Token Votes**: `fetch_token_votes(mint: str)`.
* Uses `aiohttp` for asynchronous API requests.
* Handles API key authentication if provided.

The `TokenCheck` type likely includes fields such as risk scores, social information, market data, holder analysis, and contract details. `TokenLockers` would detail liquidity locks.

##

**Note:** This tool relies on the external RugCheck.xyz API. The availability of data, rate limits, and the need for an API key are determined by RugCheck.xyz. The information provided by RugCheck is for informational purposes and should not be considered financial advice.

## Source Code

You can find the source code for this tool on GitHub: <https://github.com/niceberginc/agentipy/blob/main/agentipy/tools/rugcheck.py>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agentipy.fun/tools/rugcheck.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
