v1.0 — Complete reference for the kwcost API
https://api.kwcost.com
x-api-key: <your-key> on all requests.
POST /auth/signup — register with email + password (public)POST /auth/confirm — verify your email (public)POST /auth/login — get your access token (public)POST /account/api-key with your Bearer token to generate a keyx-api-key: <your-key> on all rate, TOU, and calculator requests| Limit | Value |
|---|---|
| Burst | 20 requests |
| Sustained rate | 10 requests / second |
| Daily quota | 5,000 requests / day |
Exceeding the rate limit returns 429 Too Many Requests. Daily quotas reset at midnight UTC. Public pages (/, /docs, /coverage, /signup) are not rate-limited.
Creates a new user account and sends a verification code to the provided email address. Public — no key needed.
| Field | Type | Description |
|---|---|---|
emailrequired | string | Valid email address |
passwordrequired | string | Min 8 chars, uppercase, lowercase, number, special char |
Confirms the account using the 6-digit code sent to your email. Public — no key needed.
| Field | Type | Description |
|---|---|---|
emailrequired | string | Email used during signup |
coderequired | string | 6-digit verification code from email |
Authenticates with email and password, returns JWT tokens. Use the access_token as a Bearer token when managing your account (e.g. generating API keys). Public — no key needed.
| Field | Type | Description |
|---|---|---|
emailrequired | string | Registered email |
passwordrequired | string | Account password |
Returns the API key associated with your account. Requires a Cognito Bearer token from POST /auth/login.
| Header | Value |
|---|---|
Authorizationrequired | Bearer <access_token> |
Creates (or rotates) an API key for your account. Any previously issued key is replaced. Requires a Cognito Bearer token from POST /auth/login.
| Header | Value |
|---|---|
Authorizationrequired | Bearer <access_token> |
Returns all available jurisdictions with their rate schedule names grouped by category.
Returns complete rate data for a specific jurisdiction including all categories and schedules.
| Parameter | Type | Description |
|---|---|---|
jurisdictionrequired | string | Jurisdiction code: DEC, DEP, DEI, DEF, DEO, DEK |
Returns rate schedules for a jurisdiction filtered by category (residential or business).
| Parameter | Type | Description |
|---|---|---|
jurisdictionrequired | string | Jurisdiction code |
categoryrequired | string | residential or business |
Returns the full details for a specific rate schedule including all charges, tiers, and the effective rate summary.
| Parameter | Type | Description |
|---|---|---|
jurisdictionrequired | string | Jurisdiction code |
categoryrequired | string | residential or business |
schedulerequired | string | Schedule code: RS, SGS, LGS, OPT-V, etc. |
Lists all riders for a jurisdiction. Mandatory riders (Fuel Cost, Energy Efficiency, CPRE, DSM, BPM, etc.) are applied automatically by the calculator. Optional riders vary by jurisdiction — see the coverage tab for a full listing. Filter by category or schedule to see which riders apply to your rate.
DEC mandatory rider codes: FC (Fuel), EE (Energy Efficiency), EDPR (DSM/EE Program Rider), BPM (BPM Prospective), BPMTU (BPM True-Up), CPRE (Competitive Procurement), EDIT4 (Tax Reform), CAR (Cost Adjustment Rider), RDM (Revenue Decoupling), ESM (Earnings Sharing), PIM (Performance Incentive), NPTC (Nuclear Production Tax Credit).
Optional riders by jurisdiction: DEF: BA-1, CEC-1, FCF-1, TS-1 — DEO: AER, NSP, NSU, ORH, SC, SE, SFL-ADPL, TD, TD-CPP — DEK: NSU, SC, SE. DEC optional riders: RSC, NM, NMB.
| Parameter | Type | Description |
|---|---|---|
jurisdictionrequired | string | Jurisdiction code |
| Parameter | Type | Description |
|---|---|---|
categoryoptional | string | Filter: residential or business |
scheduleoptional | string | Filter by eligible schedule code |
Returns state sales tax, per-kWh excise taxes, gross receipts tax, regulatory fees, and other applicable tax rates for the specified state.
| Parameter | Type | Description |
|---|---|---|
staterequired | string | Two-letter state code: NC, SC, IN, FL, OH, KY |
Returns all available time-of-use schedule definitions with their seasons and holidays.
Returns the TOU period in effect right now for the given schedule, including the current rate.
| Parameter | Type | Description |
|---|---|---|
schedulerequired | string | TOU schedule name, e.g. DEC_RESIDENTIAL_TOU, DEP_BUSINESS_TOU |
Look up the TOU period for any specific date/time combination. Useful for historical or future planning.
| Parameter | Type | Description |
|---|---|---|
schedulerequired | string | TOU schedule name |
datetimerequired | string | ISO 8601 datetime, e.g. 2026-07-15T14:30:00 |
Returns a full 24-hour TOU breakdown for a specific date. Shows which period applies for each hour — useful for planning when to run equipment or shift load.
| Parameter | Type | Description |
|---|---|---|
schedulerequired | string | TOU schedule name |
daterequired | string | Date in YYYY-MM-DD format |
Returns an hourly price forecast combining TOU periods with the actual energy rate from a rate schedule. Each slot contains a start, end, and value ($/kWh) — directly compatible with EVCC custom tariff plugins and similar time-varying rate consumers.
| Parameter | Type | Description |
|---|---|---|
schedulerequired | string | TOU schedule name (e.g. DEC_RESIDENTIAL_TOU) |
jurisdictionrequired | string | Jurisdiction code (e.g. DEC) |
categoryrequired | string | residential or business |
rate_schedulerequired | string | Rate schedule code (e.g. RETC) |
hours | integer | Hours to forecast, 1–168 (default 48) |
Tip: The Home Assistant integration (v1.1.0+) creates a Tariff Forecast sensor that auto-refreshes this data every hour and exposes it in a forecast attribute ready for EVCC.
Estimates total electricity cost for a billing period. Supports flat-rate, tiered, TOU, and demand-billed schedules. Automatically applies mandatory riders (fuel, EE, CPRE, etc.) unless excluded. Optional riders (RSC, NM, NMB) can be added for solar/generation customers.
| Field | Type | Description |
|---|---|---|
jurisdictionrequired | string | Jurisdiction code: DEC, DEP, etc. |
categoryrequired | string | residential or business |
schedulerequired | string | Rate schedule code |
total_kwhoptional | number | Total kWh consumed (flat-rate schedules). Default: 0 |
usage_breakdownoptional | object | Per-period kWh for TOU: on_peak_kwh, off_peak_kwh, super_off_peak_kwh, shoulder_kwh |
demand_kwoptional | number | Peak demand in kW (demand-billed schedules). Default: 0 |
on_peak_demand_kwoptional | number | On-peak demand in kW. Default: 0 |
include_ridersoptional | boolean | Include mandatory riders (fuel, EE, CPRE, etc.). Default: true |
exclude_ridersoptional | string[] | Mandatory rider codes to exclude, e.g. ["EE"]. See GET /rates/{jur}/riders for codes |
optional_ridersoptional | string[] | Optional rider codes to add: ["RSC"], ["NM"], ["NMB"] |
exported_kwhoptional | number | kWh exported to grid (for solar credit calculation). Default: 0 |
nameplate_capacity_kwoptional | number | System nameplate capacity in kW (for RSC/NMB per-kW charges). Default: 0 |
Simplified cost estimate — just provide jurisdiction, schedule, and kWh. Returns the estimated total without a full line-item breakdown.
| Field | Type | Description |
|---|---|---|
jurisdictionrequired | string | Jurisdiction code |
schedulerequired | string | Rate schedule code |
kwhrequired | number | Total kWh consumed |
All errors follow a consistent format. Common HTTP status codes:
| Status | Meaning |
|---|---|
400 | Bad request — invalid parameters or body |
401 | Unauthorized — missing or invalid Bearer token |
403 | Forbidden — missing or invalid API key |
404 | Not found — invalid jurisdiction, category, or schedule |
409 | Conflict — account already exists (signup) |
422 | Validation error — request body failed schema validation |
429 | Too many requests — rate limit exceeded |
| Code | Description |
|---|---|
RS | Residential Service |
RSTC | Residential Service — Time of Use Critical Peak |
RSTOU | Residential Service — Time of Use |
RE | Residential Service — All Electric |
RETC | Residential Service — All Electric, Time of Use Critical Peak |
RT | Residential Service — Water & Space Heating |
RT-EV | Residential Service — Electric Vehicle |
ES | Residential Service — Economy |
| Code | Description |
|---|---|
SGS | Small General Service |
SGSTC | Small General Service — Time of Use Critical Peak |
LGS | Large General Service |
I | Industrial Service |
OPT-V | Optional Power Service — Voluntary |
TS | Traffic Signal Service |
PG | Parallel Generation |
PP | Purchased Power |
PP-LQF | Purchased Power — Large Qualifying Facility |
OL | Outdoor Lighting |
NL | Night Lighting |
PL | Public Lighting |
MP | Municipal Street Lighting — Private |
BC | Border Customer |
HLF | High Load Factor |
| Code | Description |
|---|---|
RES | Residential Service |
R-TOU | Residential — Time of Use |
R-TOUD | Residential — Time of Use with Demand |
R-TOU-CPP | Residential — Time of Use Critical Peak Pricing |
R-TOU-EV | Residential — Time of Use Electric Vehicle |
R-STOU | Residential — Smart Time of Use |
| Code | Description |
|---|---|
SGS | Small General Service |
SGS-TOUE | Small General Service — TOU Energy |
SGS-TOU-CPP | Small General Service — TOU Critical Peak Pricing |
SGS-TOU-CLR | Small General Service — TOU Clean Energy Rate |
MGS | Medium General Service |
MGS-TOU | Medium General Service — Time of Use |
LGS | Large General Service |
LGS-TOU | Large General Service — Time of Use |
LGS-RTP | Large General Service — Real Time Pricing |
LGS-RTP-TOU | Large General Service — RTP Time of Use |
LGS-CUR-TOU | Large General Service — Curtailable TOU |
LGS-HLF | Large General Service — High Load Factor |
GS | General Service |
GS-TES | General Service — Thermal Energy Storage |
SI | Seasonal Industrial |
CSG | Community Solar Guest |
CSE | Clean Schedule Energy |
CH-TOUE | Church — TOU Energy |
EVSE | Electric Vehicle Supply Equipment |
HP | Hourly Pricing |
PP | Purchased Power |
PPBE | Purchased Power — Biomass Energy |
PPL-7 | Purchased Power — Long-term (7+ years) |
TFS | Time of Use Flex Savings |
TSS | Time Scheduled Service |
ALS | Area Lighting Service |
APH-TES | All-Purpose Heat — Thermal Storage |
SLS | Street Lighting Service |
SFLS | Security & Flood Lighting Service |
SLR | Street Lighting Rental |
| Code | Description |
|---|---|
RS-1 | Residential Service |
RST-1 | Residential Service — Time of Use |
RSL-1 | Residential Service — Low Usage |
RSL-2 | Residential Service — Low Usage (multi-family) |
| Code | Description |
|---|---|
GS-1 | General Service — Non-Demand |
GSD-1 | General Service — Demand |
GSLM-1 | General Service — Large Demand |
GSLM-2 | General Service — Large Demand (secondary) |
CS-2 | Curtailable Service |
CS-3 | Curtailable Service (interruptible) |
CST-2 | Curtailable Service — Time of Use |
CST-3 | Curtailable Service — Time of Use (interruptible) |
IS-2 | Interruptible Service |
IST-2 | Interruptible Service — Time of Use |
LS-1 | Lighting Service |
SS-1 | Street Lighting Service |
SS-2 | Street Lighting Service (customer-owned) |
SS-3 | Street Lighting Service (LED) |
| Code | Description |
|---|---|
RS | Residential Service |
RS-TOU | Residential Service — Time of Use |
RS-HE | Residential Service — High Efficiency |
| Code | Description |
|---|---|
CS | Commercial Service |
CS-TOU | Commercial Service — Time of Use |
CS-HE | Commercial Service — High Efficiency |
HLF | High Load Factor |
HLF-LLF-TOU | High Load Factor — Low Load Factor TOU |
LLF-HE | Low Load Factor — High Efficiency |
MS | Miscellaneous Service |
WP | Water Pumping |
EVFC | Electric Vehicle Fast Charging |
EVSE | Electric Vehicle Supply Equipment |
SL | Street Lighting |
MHLS | Municipal Highway Lighting Service |
MOLS | Municipal Outdoor Lighting Service |
UOLS | Utility Outdoor Lighting Service |
USFL | Utility Security & Flood Lighting |
Ohio is a deregulated state — these are distribution-only rates. Generation is purchased separately from a retail supplier.
| Code | Description |
|---|---|
RS | Residential Service |
RS3P | Residential Service — Three-Phase |
RSLI | Residential Service — Low Income |
| Code | Description |
|---|---|
DS | Distribution Service |
DP | Distribution Power |
DM | Distribution — Master Metered |
GS-FL | General Service — Flood Lighting |
GSP | General Service — Primary |
EH | Electric Heating |
TS | Traffic Signal Service |
SL | Street Lighting |
TL | Traffic Lighting |
OL | Outdoor Lighting |
LED | LED Lighting |
UOLS | Utility Outdoor Lighting Service |
| Code | Description |
|---|---|
RS | Residential Service |
| Code | Description |
|---|---|
DS | Distribution Service |
DP | Distribution Power |
DT | Distribution — Transmission |
SP | Standard Power |
TT | Transmission — Time of Use |
GS-FL | General Service — Flood Lighting |
EH | Electric Heating |
SL | Street Lighting |
TL | Traffic Lighting |
LED | LED Lighting |
UOLS | Utility Outdoor Lighting Service |
Duke Energy Carolinas residential time-of-use schedule with seasonal rates and holiday handling.
Duke Energy Carolinas business time-of-use schedule with on-peak, shoulder, and off-peak periods.
Duke Energy Progress residential time-of-use schedule for TOU and Smart TOU rate plans.
Duke Energy Progress business time-of-use schedule for SGS-TOUE, MGS-TOU, and LGS-TOU rate plans.
Estimate state and local electricity taxes across all Duke Energy service territories. Includes 50+ municipalities.
| State | State Tax | Local Tax |
|---|---|---|
| NC | 7% sales tax + $0.00019/kWh regulatory fee | Franchise tax up to 3.09% — 24 municipalities |
| SC | 6% sales tax | Local option 1–2% |
| IN | 7% sales tax | — |
| FL | 2.5% gross receipts tax | Public service tax up to 10% |
| OH | $0.00465/kWh excise tax | — |
| KY | 6% sales tax | Franchise tax ~3% |
YOUR_KEY with your actual key from Account.
Look up the current residential rate for Duke Energy Carolinas.
Find out if it is currently on-peak or off-peak for a DEC residential TOU schedule.
Estimate a monthly bill for 1,000 kWh on the DEC residential RS schedule, including all mandatory riders.
Get an hourly price forecast for the next 24 hours, suitable for EVCC smart charging or load shifting.