{"uid":"cap_6woMVZxVhoaCmFlWe-buR","slug":"onchain-trading-intelligence-idempotency-key-management-5c0c9b5b","name":"Onchain & Trading Intelligence — Idempotency Key Management","description":"Idempotency key: returns firstTime:true only once per key within ttl (dedupe retries/double-sends). Send { key, token, ttlSec? }.","url":"https://x402-services-production.up.railway.app/api/idempotency","method":"POST","headers":{},"bodySchema":{"type":"object","required":["key","token"],"properties":{"key":{"type":"string","description":"Idempotency key"},"token":{"type":"string","description":"Your secret token"},"ttlSec":{"type":"number","description":"TTL seconds, default 86400"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DvKiplNnumm3oXJwaPfQj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Registers or validates an idempotency key with a TTL to ensure pay-per-call trading intelligence requests are not double-billed or duplicated.","exampleAgentPrompt":"Register an idempotency key 'trade-req-20240615-001' with my secret token and set it to expire in 3600 seconds so my trading agent doesn't double-pay for a duplicate call.","exampleUseCases":[{"title":"Prevent duplicate USDC charges on retry","prompt":"My trading bot just timed out before getting a response — register an idempotency key 'solana-snipe-req-8842' with my token and a 7200-second TTL so I can safely retry without paying twice."},{"title":"Short-lived key for ephemeral price check","prompt":"Create an idempotency key 'price-check-eth-usdc-001' with a 300-second TTL using my secret token — I want to make sure my on-chain price query only gets billed once even if the network hiccups."},{"title":"Daily deduplication token for agent fleet","prompt":"Register idempotency key 'agent-fleet-daily-run-2024-06-15' with my token and a 86400-second TTL so none of my 10 parallel trading agents double-submit the same on-chain intelligence request today."}],"resultDescription":"Returns a confirmation that the idempotency key has been registered along with its expiry time. If the key already exists, indicates a duplicate request so the caller can suppress the re-submission and avoid paying again.","failureModes":["Missing required 'key' or 'token' field returns a 400 validation error","Invalid or unauthorized token returns a 401/403 response","Key already exists returns a conflict or duplicate-detected response","TTL value out of acceptable range may return a validation error","Service unavailability on Railway returns a 502/503"],"whenToPreferThis":"Use this endpoint before any pay-per-call trading intelligence tool call when you need to guarantee exactly-once billing semantics — particularly when network retries, agent restarts, or parallelism could cause the same logical request to be submitted more than once. Essential for high-frequency trading agents, fleet deployments, or any workflow where a duplicate $0.003 charge per call would compound at scale.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:01:38.068Z","isFirstParty":false}