Skip to content

Commit

Permalink
make it possible to query both IDCC(a) and IDCC(b)
Browse files Browse the repository at this point in the history
  • Loading branch information
fboerman committed Jun 23, 2024
1 parent 5c3b1b4 commit 77fd557
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,22 @@ supply a pull request yourself.

## Usage
### Current clients
The package comes with 2 current clients:
The package comes with the current pandas clients:
- [`JaoAPIClient`](#JaoAPIClient): api client for the webservice API defined [here](https://www.jao.eu/page-api/market-data)
- [`JaoPublicationToolClient`](#JaoPublicationToolClient): client for the CORE publication tool defined [here](https://publicationtool.jao.eu/core/)
- [`JaoPublicationToolPandasClient`](#JaoPublicationToolPandasClient): Same as previous one but then it returns pandas dataframes instead of raw retrieved data

The publication tool clients have valid data from business day 2022-06-09 onwards.
- [`JaoPublicationToolClient`](#JaoPublicationToolClient): client for the CORE Day Ahead publication tool defined [here](https://publicationtool.jao.eu/core/)
- [`JaoPublicationToolPandasIntraDay`](#JaoPublicationToolPandasIntraDay): client for CORE Intradaypublication tool for Intraday defined [here](https://publicationtool.jao.eu/coreID/)
The publication tool clients have valid data from their respective go lives:
- CORE Day Ahead: business day 2022-06-09 onwards
- CORE Intraday(a): business day 2024-05-29 onwards
- CORE Intraday(b): business day 2024-06-14 onwards

CORE Intraday a and b are combined in the same intraday client. In the initialization of the client you can choose which one you want like so:
```python
from jao import JaoPublicationToolPandasIntraDay

client = JaoPublicationToolPandasIntraDay(version='a') # IDCC(a)
client = JaoPublicationToolPandasIntraDay(version='b') # IDCC(b)
```

### Deprecated clients
The package also includes legacy clients for flowbased CWE data in the CWE subpackage. These return data up until business day 2022-06-08
Expand Down
11 changes: 9 additions & 2 deletions jao/jao.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .util import to_snake_case

__title__ = "jao-py"
__version__ = "0.4.6"
__version__ = "0.4.7"
__author__ = "Frank Boerman"
__license__ = "MIT"

Expand Down Expand Up @@ -229,7 +229,14 @@ def query_scheduled_exchange(self, d_from: pd.Timestamp, d_to: pd.Timestamp) ->


class JaoPublicationToolPandasIntraDay(JaoPublicationToolPandasClient):
BASEURL = "https://publicationtool.jao.eu/coreID/api/data/ID2_"
def __init__(self, version):
super().__init__()
if version == 'a':
self.BASEURL = "https://publicationtool.jao.eu/coreID/api/data/IDCCA_"
elif version == 'b':
self.BASEURL = "https://publicationtool.jao.eu/coreID/api/data/IDCCB_"
else:
raise NotImplementedError

def query_lta(self, d_from: pd.Timestamp, d_to: pd.Timestamp):
raise NotImplementedError
Expand Down

0 comments on commit 77fd557

Please sign in to comment.