def __init__(self, environment="practice", access_token=None):

        if environment == 'practice':
            self.api_url = 'https://stream-fxpractice.oanda.com/v1/prices'
        elif environment == 'live':
            self.api_url = 'https://stream-fxtrade.oanda.com/v1/prices'

        self.access_token = access_token
        self.client = requests.Session()
        self.client.stream = True
        self.connected = False

        #personal token authentication
        if self.access_token:
            self.client.headers['Authorization'] = 'Bearer ' + self.access_token
Instantiates an instance of OandaPy's streaming API wrapper.
dataset/ETHPy150Open jamesmawm/Mastering-Python-for-Finance-source-codes/B03898_08_codes/oandapy.py/Streamer.__init__