{"x402Version":2,"service":{"name":"UK Finance Data API","description":"Bank of England rates, exchange rates, inflation, mortgage calculator","version":"1.0.0","homepage":"https://github.com/chetparker/x402-finance-api"},"payment":{"payTo":"0xFFc458dB291b4ABcE020fE3de4f91F2770E537b1","network":"eip155:8453","scheme":"exact","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"},"endpoints":[{"method":"POST","path":"/interest-rates","price":"0.001","description":"Bank of England base rate","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"months":12}},"output":{"type":"json","example":{"current_rate":4.75,"currency":"GBP","source":"Bank of England","period_months":12,"data_points":8,"history":[{"date":"2024-08-01","rate":5.0},{"date":"2024-11-07","rate":4.75}]}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"months":{"type":"integer","minimum":1,"maximum":120,"description":"Months of base-rate history to return (1-120)."}},"required":["months"]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"current_rate":{"type":"number"},"currency":{"type":"string"},"source":{"type":"string"},"period_months":{"type":"integer"},"data_points":{"type":"integer"},"history":{"type":"array","description":"Rate change history with date and rate."}}}},"required":["type"]}},"required":["input"]}}}},{"method":"POST","path":"/exchange-rates","price":"0.001","description":"Currency exchange rates","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"base":"GBP","targets":["USD","EUR","JPY"]}},"output":{"type":"json","example":{"base":"GBP","date":"2025-04-30","rates":{"USD":1.27,"EUR":1.17,"JPY":191.5},"source":"European Central Bank"}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"base":{"type":"string","description":"Base currency ISO 4217 code, e.g. 'GBP'."},"targets":{"type":"array","items":{"type":"string"},"description":"Target currency ISO 4217 codes. Defaults to common majors when omitted."}},"required":["base"]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"base":{"type":"string"},"date":{"type":"string"},"rates":{"type":"object","description":"Map of target currency code to rate."},"source":{"type":"string"}}}},"required":["type"]}},"required":["input"]}}}},{"method":"POST","path":"/inflation","price":"0.001","description":"UK CPI inflation data","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"months":24}},"output":{"type":"json","example":{"current_cpi":3.2,"measure":"CPI Annual Rate (%)","source":"Bank of England / ONS","period_months":24,"data_points":24,"history":[{"date":"2024-03-01","cpi_annual_pct":3.2},{"date":"2024-02-01","cpi_annual_pct":3.4}]}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"months":{"type":"integer","minimum":1,"maximum":120,"description":"Months of CPI history to return (1-120)."}},"required":["months"]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"current_cpi":{"type":"number"},"measure":{"type":"string"},"source":{"type":"string"},"period_months":{"type":"integer"},"data_points":{"type":"integer"},"history":{"type":"array","description":"CPI annual percentage by month."}}}},"required":["type"]}},"required":["input"]}}}},{"method":"POST","path":"/mortgage-calculator","price":"0.001","description":"Mortgage payment calculator","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"property_price":350000,"deposit":35000,"interest_rate":4.5,"term_years":25,"is_interest_only":false}},"output":{"type":"json","example":{"property_price":350000,"deposit":35000,"loan_amount":315000,"ltv_percent":90.0,"interest_rate":4.5,"term_years":25,"type":"Repayment","monthly_payment":1751.62,"total_paid":525486,"total_interest":210486,"annual_cost":21019.44}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"property_price":{"type":"number","exclusiveMinimum":0,"description":"Property price in GBP."},"deposit":{"type":"number","minimum":0,"description":"Deposit in GBP."},"interest_rate":{"type":"number","exclusiveMinimum":0,"description":"Annual interest rate (percent)."},"term_years":{"type":"integer","minimum":1,"maximum":40,"description":"Mortgage term in years."},"is_interest_only":{"type":"boolean","description":"Interest-only vs. repayment mortgage."}},"required":["property_price","deposit","interest_rate","term_years"]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"property_price":{"type":"number"},"deposit":{"type":"number"},"loan_amount":{"type":"number"},"ltv_percent":{"type":"number"},"interest_rate":{"type":"number"},"term_years":{"type":"integer"},"type":{"type":"string"},"monthly_payment":{"type":"number"},"total_paid":{"type":"number"},"total_interest":{"type":"number"},"annual_cost":{"type":"number"}}}},"required":["type"]}},"required":["input"]}}}}]}