transparency_epias/gas/gasTraClients.py
def contract_amount(self, startDate, endDate, date=None):

        '''
        This function returns 5 lists including;
            -Gas day informatin as first item.
            -Matched quantitiy amount as second item.
            -Period information as third item.
            -Period Type information  as fourth item.
            -Trade volume amount as fifth item.

        Parameters:

        startDate: Start date in YYYY-MM-DD format.
        endDate: End date in YYYY-MM-DD format.
        date (Optional): Specific date in YYYY-MM-DD format.

        '''

        val.date_check(startDate, endDate)
        
        if date != None:
            val.date_format_check(date)
        else:
            pass

        query = "stp/bluecode-operation?"+"startDate="+f'{startDate}'+"&endDate="+f'{endDate}'+"&period="+f'{date}'

        json_result = self.get_request_result(query)

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

        key_name = key_list[0]

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

        day_list = []
        matched_list = []
        period_list = []
        periodType_list = []
        trade_list = []

        for item in response_list:
            day_list.append(item['gasDay'])
            matched_list.append(item['matchingQuantity'])
            period_list.append(item['period'])
            periodType_list.append(item['periodType'])
            trade_list.append(item['tradeValue'])

        return day_list, matched_list, period_list, periodType_list, trade_list

        This function returns 5 lists including;
            -Gas day informatin as first item.
            -Matched quantitiy amount as second item.
            -Period information as third item.
            -Period Type information  as fourth item.
            -Trade volume amount as fifth item.

        Parameters:

        startDate: Start date in YYYY-MM-DD format.
        endDate: End date in YYYY-MM-DD format.
        date (Optional): Specific date in YYYY-MM-DD format.

        
This function returns 5 lists including;
Gas day informatin as first item.
Matched quantitiy amount as second item.
Period information as third item.
Period Type information  as fourth item.
Trade volume amount as fifth item.



Start date in YYYY-MM-DD format.
endDate: End date in YYYY-MM-DD format.
date (Optional): Specific date in YYYY-MM-DD format.
This function returns 5 lists including ; Gas day informatin as first item . Matched quantitiy amount as second item . Period information as third item . Period Type information as fourth item . Trade volume amount as fifth item . Start date in YYYY - MM - DD format . endDate : End date in YYYY - MM - DD format . date ( Optional ) : Specific date in YYYY - MM - DD format .
def contract_amount(self, startDate, endDate, date=None):
        val.date_check(startDate, endDate)
        if date != None:
            val.date_format_check(date)
        else:
            pass
        query = "stp/bluecode-operation?"+"startDate="+f'{startDate}'+"&endDate="+f'{endDate}'+"&period="+f'{date}'
        json_result = self.get_request_result(query)
        key_list = list(json_result['body'].keys())
        key_name = key_list[0]
        response_list = json_result['body'][f'{key_name}']
        day_list = []
        matched_list = []
        period_list = []
        periodType_list = []
        trade_list = []
        for item in response_list:
            day_list.append(item['gasDay'])
            matched_list.append(item['matchingQuantity'])
            period_list.append(item['period'])
            periodType_list.append(item['periodType'])
            trade_list.append(item['tradeValue'])
        return day_list, matched_list, period_list, periodType_list, trade_list
def contract_amount ( self , startDate , endDate , date = None ) : val . date_check ( startDate , endDate ) if date != None : val . date_format_check ( date ) else : pass query = "stp/bluecode-operation?" + "startDate=" + f'{startDate}' + "&endDate=" + f'{endDate}' + "&period=" + f'{date}' json_result = self . get_request_result ( query ) key_list = list ( json_result [ 'body' ] . keys ( ) ) key_name = key_list [ 0 ] response_list = json_result [ 'body' ] [ f'{key_name}' ] day_list = [ ] matched_list = [ ] period_list = [ ] periodType_list = [ ] trade_list = [ ] for item in response_list : day_list . append ( item [ 'gasDay' ] ) matched_list . append ( item [ 'matchingQuantity' ] ) period_list . append ( item [ 'period' ] ) periodType_list . append ( item [ 'periodType' ] ) trade_list . append ( item [ 'tradeValue' ] ) return day_list , matched_list , period_list , periodType_list , trade_list
This function returns 5 lists including;
Gas day informatin as first item.
This function returns 5 lists including ; Gas day informatin as first item .
'''
        This function returns 5 lists including;
            -Gas day informatin as first item.
            -Matched quantitiy amount as second item.
            -Period information as third item.
            -Period Type information  as fourth item.
            -Trade volume amount as fifth item.

        Parameters:

        startDate: Start date in YYYY-MM-DD format.
        endDate: End date in YYYY-MM-DD format.
        date (Optional): Specific date in YYYY-MM-DD format.

        '''
self
startDate
endDate
date