Services


Methods

get_all_isos method

A helper method to get a list of all the ISOs in the database. Useful to confirm naming convention or if looping across ISOs. This method has no parameters and returns a list of the following ISOs:

services = client.services

class Services(object):
    def __init__(self, client):
        self.client = client
        self.ancillary = Ancillary(self)
        self.lmp = LMP(self)

    def get(self, route, params=None):
        return self.client.get(f"services/{route}", params=params)

    def get_all_isos(self):
        return self.get("isos")

Sub-models


lmp

Market object

An object for the various LMP market types, which are:

Sub-objects

get_all_nodes method

A method to get all the nodes in a selected ISO. Useful for determining node attributes. For list of ISOs, use this method.

Parameters

Returns

get_prices method

A method to pull historical pricing data for a list of nodes. To figure out the node id for a node, refer to the [get_all_nodes](<https://tyba.notion.site/Prices-797c388f6ceb46ad90ba10d19dac6e8f>) table for that iso.

Parameters

Returns

services = client.services
lmp = services.lmp

class LMP(object):
    def __init__(self, prices):
        self.prices = prices

    def get(self, route, params=None):
        return self.prices.get(f"lmp/{route}", params=params)

    def get_all_nodes(self, *, iso):
        return self.get("nodes", {"iso": iso})

    def get_prices(self, *, node_ids, market, start_year, end_year):
        return self.get("prices", {"node_ids": json.dumps(node_ids),
                                   "market": market,
                                   "start_year": start_year,
                                   "end_year": end_year})

ancillary

AncillaryService object

An object for the various Ancillary Services, which are:

Sub-objects

get_pricing_regions method

A method to get all the pricing regions in a selected iso and service. While system-wide Ancillary Services procurement is most common, a handful of ISOs have sub-regions for all or specific services. For list of ISOs, use this method. For a list of services, tab-complete using the [AncillaryService](<https://tyba.notion.site/Prices-797c388f6ceb46ad90ba10d19dac6e8f>) object or refer to the above.

Parameters

Returns

get_prices method

A method to pull historical pricing data for a specific ISO and pricing region. To figure out the relevant pricing region, refer to the [get_pricing_regions](<https://tyba.notion.site/Prices-797c388f6ceb46ad90ba10d19dac6e8f>) table for that iso & service.

Parameters