{"openapi":"3.1.0","info":{"title":"OpenAPI Hub API","version":"2026-09-12","description":"Registry-derived contract for 6 currently executable, read-only provider routes. Upstream availability and latency are not an SLA."},"servers":[{"url":"https://openapihub.dev"}],"paths":{"/run/squid/v2/sdk-info":{"get":{"operationId":"squid_get_v2_sdk_info","summary":"Widget boot payload: every supported chain (id, name, type, native currency, RPC/explorer data) and the full token inventory with per-token USD prices.","tags":["squid"],"security":[{"HubKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"squid","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/squid/v2/route":{"post":{"operationId":"squid_post_v2_route","summary":"Read-only route quote/plan for a same-chain swap or a cross-chain bridge: expected and minimum output, exchange rate, USD values, fee and gas breakdown, ETA and per-stop provider metadata.","tags":["squid"],"security":[{"HubKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"squid","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromChain":{"type":"string","description":"Source chain id or chain name the widget accepts (e.g. 8453, 42161)","example":"8453"},"fromToken":{"type":"string","description":"Source token contract address on the source chain","example":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"},"fromAmount":{"type":"string","description":"Source amount in the token's smallest unit (4 USDC = 4000000)","example":"4000000"},"toChain":{"type":"string","description":"Destination chain id or chain name","example":"42161"},"toToken":{"type":"string","description":"Destination token contract address on the destination chain","example":"0xaf88d065e77c8cc2239327c5edb3a432268e5831"},"fromAddress":{"type":"string","description":"Sender address. A zero address (0x0000…0000) works; the quote does not need a real sender","example":"0x0000000000000000000000000000000000000000"},"toAddress":{"type":"string","description":"Recipient address; empty string when no recipient is chosen","example":""}},"additionalProperties":true,"required":["fromChain","fromToken","fromAmount","toChain","toToken","fromAddress"]}}}}}},"/run/squid/api/announcement":{"get":{"operationId":"squid_get_api_announcement","summary":"Announcement banner shown on the site: message, link, type and enabled flag.","tags":["squid"],"security":[{"HubKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"squid","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/squid/api/country":{"get":{"operationId":"squid_get_api_country","summary":"Visitor country lookup; returns the country name and ISO code of the calling egress IP.","tags":["squid"],"security":[{"HubKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"squid","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/squid/api/fiat-to-crypto/config":{"get":{"operationId":"squid_get_api_fiat_to_crypto_config","summary":"Fiat on-ramp catalog behind the Buy tab: on-ramp provider, supported fiat currencies, supported crypto assets and supported countries.","tags":["squid"],"security":[{"HubKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"squid","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/squid/api/fiat-to-crypto/payment-types":{"get":{"operationId":"squid_get_api_fiat_to_crypto_payment_types","summary":"Payment methods available for a fiat/crypto/country combination, with per-provider min/max limits.","tags":["squid"],"security":[{"HubKey":[]}],"parameters":[{"name":"fiat","in":"query","required":true,"schema":{"type":"string"},"description":"ISO fiat currency code used by the Buy tab","example":"EUR"},{"name":"crypto","in":"query","required":true,"schema":{"type":"string"},"description":"On-ramp catalog asset id (from /api/fiat-to-crypto/config)","example":"usdc_base"},{"name":"country","in":"query","required":true,"schema":{"type":"string"},"description":"ISO country code","example":"NL"}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{}}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"squid","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}}},"components":{"securitySchemes":{"HubKey":{"type":"apiKey","in":"header","name":"X-Hub-Key","description":"Load from API_HUB_KEY; never place a key in a URL."}},"schemas":{"ExecutionEnvelope":{"type":"object","required":["source","path","status","data","cached","latency_ms"],"properties":{"source":{"type":"string"},"path":{"type":"string"},"params":{"type":"object","additionalProperties":true},"status":{"type":"integer"},"data":{},"cached":{"type":"boolean"},"ttl":{"type":"number"},"age_s":{"type":"number"},"latency_ms":{"type":"number"},"error":{"type":"string"}},"additionalProperties":true},"HubError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"hint":{"type":"string"},"reason":{"type":"string","enum":["rate","client_concurrency","shared_concurrency","client_state_capacity"]},"retry_after_s":{"type":"integer","minimum":1},"source":{"type":"string"},"path":{"type":"string"},"method":{"type":"string"},"status":{"type":"integer"},"data":{},"cached":{"type":"boolean"},"latency_ms":{"type":"number"}},"additionalProperties":true}}},"tags":[{"name":"squid","description":"Squid cross-chain swaps and bridges: supported chains and tokens with USD prices, and route quotes with expected output, fees, gas and ETA."}]}