Skip to content
Blockchain Post

News on how crypto works

How to turn Rugcheck API results into buy rules for a bot

To turn rugcheck API results into buy rules, reject active authorities, danger risks and report failures, then score named risks by mint and log each decision.

The Blockchain Post Editors5 min read#92f231

How to turn Rugcheck API results into buy rules for a bot

Rugcheck API results become deterministic buy rules when your bot rejects active authorities, danger-level risks and report failures, then scores the remaining named risks against a threshold.

A report is requested for a token’s mint address. Treat its raw fields as the inputs to your own decision function, rather than letting one provider score make the decision. A token scam risk check gives broader context for interpreting a token’s warning signs; rugcheck adds a review of token risk to that picture.

What should you have ready?

Have a mint address from your token feed, an HTTP client with a timeout, a JSON parser and a decision log. Set your own weighted-score threshold and maximum acceptable Token-2022 transfer fee before processing tokens. Those are policy choices for your bot, not values to infer from a provider’s aggregate score.

How should you turn each report into a decision?

Write rules against named risks and raw fields. A single aggregate score hides the provider’s weighting, which can change; explicit rules let you test and audit the conditions that pass or reject a mint.

  1. Fetch by mint. Request the token report using the mint address, apply your HTTP timeout and store the raw response with a timestamp. The visible result is a timestamped record tied to one mint.
  2. Parse the decision fields. Read Mint authority, Freeze authority, risk names and levels, Liquidity pool data, Holder concentration, insider flags and any Token-2022 transfer fee. The visible result is a structured set of fields for the rule function.
  3. Apply hard rejects first. Reject if either authority is non-null, any risk is marked danger-level, or the transfer fee exceeds your configured limit. On Solana, revoked mint and freeze authorities read null in the mint account. The visible result is either a specific reject reason or a token that can proceed to scoring.
  4. Score the remaining checks. Assign weights to the LP locked or burned percentage, top-holder share, insider flags and liquidity size. Compare the total with your chosen threshold. A larger top-holder share can count against a mint; more locked or burned liquidity can count in its favour. The visible result is a score and a pass or reject outcome.
  5. Handle errors as rejects. Reject an unindexed token, 404, timeout or other failed report instead of treating missing data as clean. On a 429 response, reject the current attempt and back off before another request; do not retry rapidly against the same limit. The visible result is a reject reason that records the failure.
  6. Normalise names and log the decision. Match risks by stable identifiers where available, not display text that may change. Normalise names before matching, and alert on any unknown risk name so a newly worded risk cannot silently bypass policy. Log the mint, timestamp, pass or reject, score and deciding rule. The task is done when every mint has a logged outcome and reason.

Say a report has a non-null Freeze authority and otherwise scores above your threshold. The hard-reject rule fires first, so the state becomes reject with “Freeze authority active” in the log; the weighted score cannot override it. If a later mint has null authorities and no danger-level risks, it reaches scoring, where holder share and liquidity affect the result. This order makes each decision traceable to a field.

Named-field rules keep the bot’s policy visible as provider scoring changes. The deciding reason for each mint is the rule that fired, so you can review and revise policy without mistaking a changing aggregate score for a fixed safety guarantee.

Related questions

What are rugcheck API rate limits?

Handle 429 as a failed decision for the current attempt, then back off before requesting again. Apply a request timeout and avoid retry loops that keep sending requests while the service is limiting them. Record the status and retry time in operational logs.

Is there a rugcheck API Python example?

Use your Python HTTP client to request a report for the mint, set a timeout, parse the JSON and pass the relevant fields to a pure rule function. Have that function return a decision and reason; catch request and parsing errors at the boundary and map them to reject.

How can you apply these rules in practice?

How do you combine rugcheck and GoPlus Security checks in one bot?

Keep each provider’s findings as separate inputs, then define shared hard rejects and weighted signals in one policy function. Log which provider field triggered each rule. Treat a missing provider response as a reject when your policy requires both checks to make a decision.

How often should a bot rescan a token it already holds?

Choose a fixed interval based on how quickly you need to detect changed risks, and rescan after relevant token or liquidity changes when your data source exposes them. Keep each result timestamped so the log shows which report informed each decision.

Can a bot auto-sell when a token’s rugcheck risks change?

It can use a changed report to trigger a separate exit policy, but define that policy explicitly: identify which new risks trigger action, handle missing reports, and log the reason. Keep buy and sell decisions distinct so a buy threshold does not silently become an exit rule.

How do you backtest buy rules on past token launches?

Replay timestamped reports against the same rule function and threshold that the live bot uses. Preserve the fields as they were known at each decision time, then compare logged passes and rejects with later outcomes. This shows how the chosen rules behaved on that historical set without changing their live interpretation.