Business Day Calendars API
All dates YYYY-MM-DD. calendars= takes XNYS, FED, TARGET2, UK-ENG (comma list = joint calendar). GET /v1/is-business-day?date=, /v1/add-business-days?date=&days= (negative ok), /v1/settlement-date?trade_date=&t=1, /v1/business-days-between?start=&end=, /v1/adjust?date=&convention=modified_following, /v1/holidays?calendar=&year=. Rules computed deterministically and checked against NYSE, Federal Reserve and GOV.UK published calendars.
How to pay
Every /v1 endpoint answers an unpaid request with HTTP 402 and a PAYMENT-REQUIRED header (x402 v2, scheme exact, network eip155:8453, USDC, payTo 0x076e653F4f458201B866B6B46A50F5796C345fb7, facilitator https://facilitator.payai.network, fallback https://facilitator.xpay.sh). Any x402 client (for example @x402/fetch) pays and retries automatically. No API key or account.
Machine-readable: /openapi.json · /.well-known/x402
GET /v1/is-business-day — $0.001 USDC
Whether a date is a business day on one or more settlement calendars (NYSE, Fedwire/FedACH, TARGET2, UK), which holiday closes it, NYSE early closes, and the previous/next business day. Deterministic, no AI.
| Param | Required | Description |
|---|---|---|
date | yes | Date YYYY-MM-DD Example: 2026-11-27 |
calendars | no | Comma list of calendars; a day is a business day only if open in all. XNYS (NYSE), FED (Fedwire/FedACH), TARGET2 (EUR), UK-ENG. Aliases: NYSE, US, ACH, EUR, UK. Default FED. Example: XNYS,FED |
Example request: https://business-days.quietworklabs.workers.dev/v1/is-business-day?date=2026-11-27&calendars=XNYS%2CFED
Example response
{
"date": "2026-11-27",
"calendars": [
{
"id": "XNYS",
"name": "NYSE"
}
],
"isBusinessDay": true,
"dayOfWeek": "Friday",
"closedBy": [],
"earlyClose": [
{
"calendar": "XNYS",
"name": "Day after Thanksgiving",
"closeTime": "13:00 America/New_York"
}
],
"previousBusinessDay": "2026-11-25",
"nextBusinessDay": "2026-11-30"
}GET /v1/add-business-days — $0.001 USDC
Adds (or with negative days subtracts) N business days to a date on a joint calendar (NYSE, Fedwire/FedACH, TARGET2, UK) and lists the holidays skipped. Deterministic, no AI.
| Param | Required | Description |
|---|---|---|
date | yes | Start date YYYY-MM-DD Example: 2026-12-23 |
days | yes | Business days to add, -2000..2000 Example: 2 |
calendars | no | Comma list of calendars; a day is a business day only if open in all. XNYS (NYSE), FED (Fedwire/FedACH), TARGET2 (EUR), UK-ENG. Aliases: NYSE, US, ACH, EUR, UK. Default FED. Example: XNYS,FED |
Example request: https://business-days.quietworklabs.workers.dev/v1/add-business-days?date=2026-12-23&days=2&calendars=XNYS%2CFED
Example response
{
"date": "2026-12-23",
"days": 2,
"calendars": [
{
"id": "XNYS",
"name": "NYSE"
},
{
"id": "FED",
"name": "Federal Reserve (Fedwire/FedACH)"
}
],
"result": "2026-12-28",
"resultDayOfWeek": "Monday",
"skippedHolidays": [
{
"date": "2026-12-25",
"reason": "XNYS: Christmas Day; FED: Christmas Day"
}
]
}GET /v1/settlement-date — $0.001 USDC
Settlement date T+N for a trade date on a joint calendar. Default XNYS,FED with t=1 (US equities since 28 May 2024). If the trade date is not a business day it is first rolled to the next one. Deterministic, no AI.
| Param | Required | Description |
|---|---|---|
trade_date | yes | Trade date YYYY-MM-DD Example: 2026-12-24 |
t | no | Settlement lag in business days (0-10). Default 1 Example: 1 |
calendars | no | Calendars; default XNYS,FED Example: XNYS,FED |
Example request: https://business-days.quietworklabs.workers.dev/v1/settlement-date?trade_date=2026-12-24&t=1&calendars=XNYS%2CFED
Example response
{
"trade_date": "2026-12-24",
"t": 1,
"calendars": [
{
"id": "XNYS"
},
{
"id": "FED"
}
],
"effectiveTradeDate": "2026-12-24",
"settlementDate": "2026-12-28",
"skippedHolidays": [
{
"date": "2026-12-25",
"reason": "XNYS: Christmas Day; FED: Christmas Day"
}
]
}GET /v1/business-days-between — $0.001 USDC
Counts business days between two dates on a joint calendar: days after start up to and including end (inclusive=true also counts start). Negative if end is before start. Lists weekday holidays in range. Max 10 years. Deterministic, no AI.
| Param | Required | Description |
|---|---|---|
start | yes | Start date YYYY-MM-DD Example: 2026-01-01 |
end | yes | End date YYYY-MM-DD Example: 2026-12-31 |
inclusive | no | true to count the start date too Example: false |
calendars | no | Comma list of calendars; a day is a business day only if open in all. XNYS (NYSE), FED (Fedwire/FedACH), TARGET2 (EUR), UK-ENG. Aliases: NYSE, US, ACH, EUR, UK. Default FED. Example: XNYS,FED |
Example request: https://business-days.quietworklabs.workers.dev/v1/business-days-between?start=2026-01-01&end=2026-12-31&inclusive=false&calendars=XNYS%2CFED
Example response
{
"start": "2026-01-01",
"end": "2026-12-31",
"inclusive": false,
"calendars": [
{
"id": "FED",
"name": "Federal Reserve (Fedwire/FedACH)"
}
],
"businessDays": 251,
"holidaysInRange": [
"2026-01-19",
"2026-02-16"
]
}GET /v1/adjust — $0.001 USDC
Rolls a date that falls on a weekend or holiday using a business-day convention: following, modified_following, preceding, modified_preceding. Typical for payment, coupon and invoice due dates. Deterministic, no AI.
| Param | Required | Description |
|---|---|---|
date | yes | Date YYYY-MM-DD Example: 2027-12-25 |
convention | no | following | modified_following | preceding | modified_preceding. Default modified_following Example: modified_following |
calendars | no | Comma list of calendars; a day is a business day only if open in all. XNYS (NYSE), FED (Fedwire/FedACH), TARGET2 (EUR), UK-ENG. Aliases: NYSE, US, ACH, EUR, UK. Default FED. Example: TARGET2 |
Example request: https://business-days.quietworklabs.workers.dev/v1/adjust?date=2027-12-25&convention=modified_following&calendars=TARGET2
Example response
{
"date": "2027-12-25",
"convention": "modified_following",
"calendars": [
{
"id": "TARGET2",
"name": "TARGET2 / T2 (EUR)"
}
],
"adjusted": "2027-12-27",
"changed": true
}GET /v1/holidays — $0.001 USDC
Lists closing days for one calendar and year (2000-2099): NYSE full closures and 1 pm early closes, Federal Reserve (Fedwire/FedACH) holidays with Saturday/Sunday observance rules, TARGET2 closing days, UK England & Wales bank holidays with substitute days. Weekend-only holidays with no weekday closure are omitted. Deterministic, no AI.
| Param | Required | Description |
|---|---|---|
calendar | yes | XNYS, FED, TARGET2 or UK-ENG Example: XNYS |
year | yes | Year 2000-2099 Example: 2027 |
Example request: https://business-days.quietworklabs.workers.dev/v1/holidays?calendar=XNYS&year=2027
Example response
{
"calendar": "XNYS",
"year": 2027,
"holidays": [
{
"date": "2027-01-01",
"name": "New Year's Day",
"type": "closed"
},
{
"date": "2027-11-26",
"name": "Day after Thanksgiving",
"type": "early_close",
"closeTime": "13:00 America/New_York"
}
],
"source": "https://www.nyse.com/markets/hours-calendars"
}