# Onchain & Trading Intelligence Rate Limiter

> Onchain & Trading Intelligence Rate Limiter is a paid API for AI agents from x402-services-production.up.railway.app, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-23).

Manages token-bucket rate limiting for pay-per-call onchain and trading intelligence API access

## Facts

- Endpoint: POST https://x402-services-production.up.railway.app/api/ratelimit?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-trading-intelligence-rate-limiter-8260adc0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gdcrdKmeLh-dYQG8g-ScW

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability onchain-trading-intelligence-rate-limiter-8260adc0 -d '<json body>'
```

Example prompt: Check my rate limit bucket named 'trading-agent-main' with a capacity of 100 tokens and a refill rate of 2 tokens per second, and consume 1 token using my secret token before making an onchain price query.

## When to prefer this

Use this endpoint when you need programmatic, stateful rate limiting for agents making repeated calls to the onchain and trading intelligence suite — especially useful when coordinating multiple concurrent agents sharing a call quota, or when enforcing per-agent limits before expensive pay-per-call operations.

## Known failure modes

- Invalid or missing secret token returns authentication error
- Bucket capacity exceeded returns rate limit rejection with retry-after info
- Missing required fields (token, bucket, capacity, refillPerSec) returns validation error
- Invalid numeric values for capacity or refillPerSec return schema error
- Non-existent bucket may be auto-created or return not-found depending on implementation

## How this service works

Rate-limit token bucket: shared self-throttle. Returns allowed + remaining. Send { bucket, token, capacity, refillPerSec, cost? }.

## Output

Returns the current state of the token bucket after the consume operation, including whether the call was allowed, remaining token count, and bucket metadata such as capacity and refill rate.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "bucket",
  "capacity",
  "refillPerSec",
  "token"
 ],
 "properties": {
  "cost": {
   "type": "number",
   "description": "Tokens to consume, default 1"
  },
  "token": {
   "type": "string",
   "description": "Your secret token"
  },
  "bucket": {
   "type": "string",
   "description": "Bucket name"
  },
  "capacity": {
   "type": "number",
   "description": "Max tokens"
  },
  "refillPerSec": {
   "type": "number",
   "description": "Tokens added per second"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-trading-intelligence-rate-limiter-8260adc0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services-production.up.railway.app](https://www.zero.xyz/host/x402-services-production.up.railway.app/llms.txt)
