transparency_epias/markets/dayaheadClient.py
def block_amount_matched(self, startDate, endDate, is_statistic):
        '''
        This function returns 4 different lists according to is_statistic parameter, which includes;
            -Statistical results for the range of specified dates.
            -Datetime values for the range of specified dates as firts item.
            -Matched Block Sell values for the range of specified dates as second item.
            -Matched Block Buy values for the range of specified dates as third item.

        Parameters:

        startDate: Start date in YYYY-MM-DD format.
        endDate: End date in YYYY-MM-DD format.
        is_statistic: An integer or string value shoul be 1 or TRUE.

        Warning! For the "NOT MATCHED" block amounts look for block_amount.

        '''

        val.date_check(startDate, endDate)

        query = "market/amount-of-block?startDate="+f'{startDate}'+"&endDate="+f'{endDate}'

        json_result = self.get_request_result(query)

        key_list = list(json_result['body'].keys())

        key_name = key_list[0]
        second_key_name = key_list[1]

        if is_statistic == 1 or is_statistic == 'TRUE' :
            response_list = json_result['body'][f'{second_key_name}']

            return response_list

        else:
            response_list = json_result['body'][f'{key_name}']

            date_list = []
            macthed_purch_amount_list = []
            matched_sale_amount_list = []

            for item in response_list:
                date_list.append(item['date'])
                macthed_purch_amount_list.append(item['amountOfPurchasingTowardsMatchBlock'])
                matched_sale_amount_list.append(item['amountOfSalesTowardsMatchBlock'])

            return date_list, matched_sale_amount_list, macthed_purch_amount_list

        This function returns 4 different lists according to is_statistic parameter, which includes;
            -Statistical results for the range of specified dates.
            -Datetime values for the range of specified dates as firts item.
            -Matched Block Sell values for the range of specified dates as second item.
            -Matched Block Buy values for the range of specified dates as third item.

        Parameters:

        startDate: Start date in YYYY-MM-DD format.
        endDate: End date in YYYY-MM-DD format.
        is_statistic: An integer or string value shoul be 1 or TRUE.

        Warning! For the "NOT MATCHED" block amounts look for block_amount.

        
This function returns 4 different lists according to is_statistic parameter, which includes;
Statistical results for the range of specified dates.
Datetime values for the range of specified dates as firts item.
Matched Block Sell values for the range of specified dates as second item.
Matched Block Buy values for the range of specified dates as third item.



Start date in YYYY-MM-DD format.
endDate: End date in YYYY-MM-DD format.
is_statistic: An integer or string value shoul be 1 or TRUE.

Warning. For the "NOT MATCHED" block amounts look for block_amount.
This function returns 4 different lists according to is_statistic parameter which includes ; Statistical results for the range of specified dates . Datetime values for the range of specified dates as firts item . Matched Block Sell values for the range of specified dates as second item . Matched Block Buy values for the range of specified dates as third item . Start date in YYYY - MM - DD format . endDate : End date in YYYY - MM - DD format . is_statistic : An integer or string value shoul be 1 or TRUE . Warning . For the " NOT MATCHED " block amounts look for block_amount .
def block_amount_matched(self, startDate, endDate, is_statistic):
        val.date_check(startDate, endDate)
        query = "market/amount-of-block?startDate="+f'{startDate}'+"&endDate="+f'{endDate}'
        json_result = self.get_request_result(query)
        key_list = list(json_result['body'].keys())
        key_name = key_list[0]
        second_key_name = key_list[1]
        if is_statistic == 1 or is_statistic == 'TRUE' :
            response_list = json_result['body'][f'{second_key_name}']
            return response_list
        else:
            response_list = json_result['body'][f'{key_name}']
            date_list = []
            macthed_purch_amount_list = []
            matched_sale_amount_list = []
            for item in response_list:
                date_list.append(item['date'])
                macthed_purch_amount_list.append(item['amountOfPurchasingTowardsMatchBlock'])
                matched_sale_amount_list.append(item['amountOfSalesTowardsMatchBlock'])
            return date_list, matched_sale_amount_list, macthed_purch_amount_list
def block_amount_matched ( self , startDate , endDate , is_statistic ) : val . date_check ( startDate , endDate ) query = "market/amount-of-block?startDate=" + f'{startDate}' + "&endDate=" + f'{endDate}' json_result = self . get_request_result ( query ) key_list = list ( json_result [ 'body' ] . keys ( ) ) key_name = key_list [ 0 ] second_key_name = key_list [ 1 ] if is_statistic == 1 or is_statistic == 'TRUE' : response_list = json_result [ 'body' ] [ f'{second_key_name}' ] return response_list else : response_list = json_result [ 'body' ] [ f'{key_name}' ] date_list = [ ] macthed_purch_amount_list = [ ] matched_sale_amount_list = [ ] for item in response_list : date_list . append ( item [ 'date' ] ) macthed_purch_amount_list . append ( item [ 'amountOfPurchasingTowardsMatchBlock' ] ) matched_sale_amount_list . append ( item [ 'amountOfSalesTowardsMatchBlock' ] ) return date_list , matched_sale_amount_list , macthed_purch_amount_list
This function returns 4 different lists according to is_statistic parameter, which includes;
Statistical results for the range of specified dates.
This function returns 4 different lists according to is_statistic parameter which includes ; Statistical results for the range of specified dates .
'''
        This function returns 4 different lists according to is_statistic parameter, which includes;
            -Statistical results for the range of specified dates.
            -Datetime values for the range of specified dates as firts item.
            -Matched Block Sell values for the range of specified dates as second item.
            -Matched Block Buy values for the range of specified dates as third item.

        Parameters:

        startDate: Start date in YYYY-MM-DD format.
        endDate: End date in YYYY-MM-DD format.
        is_statistic: An integer or string value shoul be 1 or TRUE.

        Warning! For the "NOT MATCHED" block amounts look for block_amount.

        '''
self
startDate
endDate
is_statistic