{"openapi":"3.1.0","info":{"title":"Foil Ledger API","version":"1.1.0","description":"Condition-aware Pokémon TCG market prices (TCGplayer-based, refreshed daily) plus realized sales from a working card shop. Pay per call with USDC on Base via x402; also available as paid MCP tools at /mcp.","contact":{"url":"https://github.com/lazylucariospokemart/foil-ledger-api"},"license":{"name":"MIT"}},"servers":[{"url":"https://foil-ledger-api.lazylucariospokemart28.workers.dev"}],"x-x402":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC","payTo":"0x3cA43880345E8C16Fd3A6F7aD48e2Db9595e4629","manifest":"https://foil-ledger-api.lazylucariospokemart28.workers.dev/.well-known/x402","mcp":"https://foil-ledger-api.lazylucariospokemart28.workers.dev/mcp","referralPct":10},"paths":{"/v1/cards":{"get":{"summary":"All tracked cards with current market price and 7-day change","operationId":"v1_cards","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required (x402). Retry with a PAYMENT-SIGNATURE header; see https://docs.x402.org"}},"x-x402":{"paid":true,"price":"$0.005","asset":"USDC","network":"eip155:8453","scheme":"exact","payTo":"0x3cA43880345E8C16Fd3A6F7aD48e2Db9595e4629"}}},"/v1/card/{id}":{"get":{"summary":"One card by id (ids from /v1/cards, /v1/search or the free /v1/sample)","operationId":"v1_card_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required (x402). Retry with a PAYMENT-SIGNATURE header; see https://docs.x402.org"}},"x-x402":{"paid":true,"price":"$0.002","asset":"USDC","network":"eip155:8453","scheme":"exact","payTo":"0x3cA43880345E8C16Fd3A6F7aD48e2Db9595e4629"}}},"/v1/search":{"get":{"summary":"Search by card name / set","operationId":"v1_search","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Card name or set text"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required (x402). Retry with a PAYMENT-SIGNATURE header; see https://docs.x402.org"}},"x-x402":{"paid":true,"price":"$0.005","asset":"USDC","network":"eip155:8453","scheme":"exact","payTo":"0x3cA43880345E8C16Fd3A6F7aD48e2Db9595e4629"}}},"/v1/movers":{"get":{"summary":"Biggest 7-day movers, up and down","operationId":"v1_movers","parameters":[{"name":"n","in":"query","required":false,"schema":{"type":"string"},"description":"How many each way (max 50)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required (x402). Retry with a PAYMENT-SIGNATURE header; see https://docs.x402.org"}},"x-x402":{"paid":true,"price":"$0.01","asset":"USDC","network":"eip155:8453","scheme":"exact","payTo":"0x3cA43880345E8C16Fd3A6F7aD48e2Db9595e4629"}}},"/v1/sold":{"get":{"summary":"Realized sales: what this shop actually got per card, with the market price at the time","operationId":"v1_sold","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by name/set/number"},{"name":"n","in":"query","required":false,"schema":{"type":"string"},"description":"Max results (max 500)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required (x402). Retry with a PAYMENT-SIGNATURE header; see https://docs.x402.org"}},"x-x402":{"paid":true,"price":"$0.005","asset":"USDC","network":"eip155:8453","scheme":"exact","payTo":"0x3cA43880345E8C16Fd3A6F7aD48e2Db9595e4629"}}},"/v1/comp":{"get":{"summary":"Comp one card: live market price for matching cards next to this shop's realized sales","operationId":"v1_comp","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Card name, set or number text"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required (x402). Retry with a PAYMENT-SIGNATURE header; see https://docs.x402.org"}},"x-x402":{"paid":true,"price":"$0.01","asset":"USDC","network":"eip155:8453","scheme":"exact","payTo":"0x3cA43880345E8C16Fd3A6F7aD48e2Db9595e4629"}}},"/":{"get":{"summary":"Landing: endpoints, prices, MCP, referral terms","operationId":"root","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-x402":{"paid":false}}},"/v1/sample":{"get":{"summary":"Three real cards and one real sale so you can see the response shapes","operationId":"v1_sample","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-x402":{"paid":false}}},"/v1/health":{"get":{"summary":"Freshness + card count","operationId":"v1_health","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-x402":{"paid":false}}},"/v1/stats":{"get":{"summary":"Calls and USDC earned today / last 7 days (no addresses)","operationId":"v1_stats","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-x402":{"paid":false}}},"/v1/referrals/{address}":{"get":{"summary":"Referral earnings for a wallet","operationId":"v1_referrals_address","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-x402":{"paid":false}}}}}