get_purchase_costs
Calculate itemized government-imposed used-vehicle closing costs for Canada and the US, with per-line source URLs and confidence scores.
Instructions
Itemized government-imposed used-vehicle closing costs, unified across Canada and the US via country=CA|US, with per-line sourceUrl + confidence. CA (all 10 provinces + 3 territories): provincial/territorial sales tax (PST/RST/QST/HST or GST-only) + transfer/registration/plate fees + inspection. US (all 50 states + DC): sales/use/excise tax, title, first-year registration, inspection, and dealer doc fee. Costs $0.02 per call. Pays USDC on Base via x402. Compute-first, settle-after: Vindex computes the full answer BEFORE charging, so you are never billed for an error or a below-threshold answer. Requires EVM_PRIVATE_KEY with USDC on Base Mainnet when the API is in live mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | Yes | Agreed sale price in the country's currency (> 0), e.g. 25000 | |
| state | No | US ONLY (required when country=US): 2-letter state code, one of the 50 states or DC | |
| country | Yes | Country selector: CA (Canadian per-jurisdiction rules) or US (per-state rules) | |
| province | No | CANADA ONLY (required when country=CA): 2-letter province/territory code | |
| trade_in | No | US ONLY — trade-in value in USD (≥ 0, < price). Deducted from the tax base only for a dealer sale in a state granting a FULL trade-in credit | |
| sale_type | Yes | 'private' (private-party sale) or 'dealer' | |
| local_rate | No | US ONLY — exact county/city surtax percentage (0–15). When omitted, the sales-tax line carries a range up to the state's maximum local rate | |
| family_gift | No | CANADA ONLY, private sales only — applies the jurisdiction's family/related-individual gift exemption ($0 tax) where one exists | |
| buyer_has_plates | No | CANADA ONLY — selects plate-dependent fee lines where the jurisdiction distinguishes them (e.g. Ontario: true → permit only $32; false → permit + new plate $59) |