Skip to content

Commit 5f2e23d

Browse files
committed
+ holidays page
1 parent 671f8a4 commit 5f2e23d

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

source/includes/holidays.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Holidays
2+
3+
## Retrieve a list of bank holidays
4+
5+
Retrieve a list of bank holidays
6+
optionaly for a given *currency*,
7+
optionally filtered by inclusive *from* and *to* dates.
8+
9+
> Example request:
10+
11+
```bash
12+
curl -X GET https://api-test.cleartreasury.co.uk/api/holidays?fromdate={fromDate}&todate={toDate}&currency={CCY} \
13+
-H 'Authorization: Bearer <your auth token>'
14+
```
15+
16+
> Example response:
17+
18+
```json
19+
[
20+
{
21+
"Currency": "EUR",
22+
"DateHoliday": "20250418",
23+
"Note": "Good Friday"
24+
},
25+
{
26+
"Currency": "EUR",
27+
"DateHoliday": "20250501",
28+
"Note": "Labour Day"
29+
},
30+
{
31+
"Currency": "EUR",
32+
"DateHoliday": "20250421",
33+
"Note": "Easter Monday"
34+
}
35+
]
36+
```
37+
38+
### Request
39+
40+
`GET /holidays?from_date={fromDate}&to_date={toDate}&Currency={CCY}`
41+
42+
| Name | Description | Required | Type |
43+
| ---------- | -------------------------------------------------------------------- | -------- | ------ |
44+
| currency | The currency required | No | string |
45+
| fromDate | Inclusive from date. In `yyyyMMdd` format | No | string |
46+
| toDate | Inclusive to date. In `yyyyMMdd` format | No | string |
47+
48+
### Response
49+
50+
| Name | Description | Type |
51+
| ----------- | --------------------------------------------------------------------- | ------- |
52+
| Currency | The Currency of the bank holiday | string |
53+
| DateHoliday | A date for this Bank holiday. In `yyyyMMdd` format | date |
54+
| Note | The title of this holiday, *eg. Christmas* | string |
55+
56+
57+
58+
## Retrieve the earliest tradable date
59+
60+
61+
Retrieve the earliest trade date for a specific pair of currencies,
62+
optionally starting from an inclusive `from_date`.
63+
64+
> Example request:
65+
66+
```bash
67+
curl -X GET https://api-test.cleartreasury.co.uk/api/holidays/earliestdate?ccy_sold={ccySold}&ccy_bought={ccyBought}&from_date={fromDate} \
68+
-H 'Authorization: Bearer <your auth token>'
69+
```
70+
71+
> Example response:
72+
73+
```json
74+
{
75+
"DateAvailable": "20250201",
76+
"CurrencySold": "USD",
77+
"CurrencyBought": "EUR",
78+
"CutOffTime": "130000"
79+
}
80+
```
81+
82+
### Request
83+
84+
`GET /holidays/earliestdate?ccy_sold={ccySold}&ccy_bought={ccyBought}&from_date={fromDate}`
85+
86+
| Name | Description | Required | Type |
87+
| ------------ | ----------------------------------------------------------------- | -------- | ------ |
88+
| ccy_sold | The currency being sold | Yes | string |
89+
| ccy_bought | The currency being bought | Yes | string |
90+
| from_date | Inclusive starting date for the search. In `yyyyMMdd` format | No | string |
91+
92+
### Response
93+
94+
| Name | Description | Type |
95+
| ------------- | ----------------------------------------------------------------- | ------- |
96+
| DateAvailable | The earliest available trade date. In `yyyyMMdd` format | date |
97+
| CurrencySold | The currency being sold | string |
98+
| CurrencyBought| The currency being bought | string |
99+
| CutOffTime | The cutoff time for the trade. In `HHmmss` format | string |

source/index.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ includes:
1515
- trades
1616
- countries-and-currencies
1717
- payment-methods
18+
- holidays
1819
- _errors
1920

2021
search: true

0 commit comments

Comments
 (0)