original_docstring: Returns dict of response from OANDA's open API
          :param endpoint: (required) OANDA API endpoint (e.g. v1/instruments)
          :type endpoint: string
          :param method: (optional) Method of accessing data, either GET or POST. (default GET)
          :type method: string
          :param params: (optional) Dict of parameters (if any) accepted the by OANDA API endpoint you are trying to access (default None)
          :type params: dict or None
          
docstring: Returns dict of response from OANDA's open API
docstring_tokens: Returns dict of response from OANDA ' s open API
code: def request(self, endpoint, method='GET', params=None):
          """Returns dict of response from OANDA's open API
          :param endpoint: (required) OANDA API endpoint (e.g. v1/instruments)
          :type endpoint: string
          :param method: (optional) Method of accessing data, either GET or POST. (default GET)
          :type method: string
          :param params: (optional) Dict of parameters (if any) accepted the by OANDA API endpoint you are trying to access (default None)
          :type params: dict or None
          """
  
          url = '%s/%s' % ( self.api_url, endpoint)
  
          method = method.lower()
          params = params or {}
  
          func = getattr(self.client, method)
  
          request_args = {}
          if method == 'get':
              request_args['params'] = params
          else:
              request_args['data'] = params
  
          try:
              response = func(url, **request_args)
          except requests.RequestException as e:
              print (str(e))
          content = response.content.decode('utf-8')
  
          content = json.loads(content)
  
          # error message
          if response.status_code >= 400:
              raise OandaError(content)
  
          return content
code_tokens: def request ( self , endpoint , method = 'GET' , params = None ) : url = '%s/%s' % ( self . api_url , endpoint ) method = method . lower ( ) params = params or { } func = getattr ( self . client , method ) request_args = { } if method == 'get' : request_args [ 'params' ] = params else : request_args [ 'data' ] = params try : response = func ( url , ** request_args ) except requests . RequestException as e : print ( str ( e ) ) content = response . content . decode ( 'utf-8' ) content = json . loads ( content ) if response . status_code >= 400 : raise OandaError ( content ) return content
short_docstring: Returns dict of response from OANDA's open API
short_docstring_tokens: Returns dict of response from OANDA ' s open API
comment: """Returns dict of response from OANDA's open API
          :param endpoint: (required) OANDA API endpoint (e.g. v1/instruments)
          :type endpoint: string
          :param method: (optional) Method of accessing data, either GET or POST. (default GET)
          :type method: string
          :param params: (optional) Dict of parameters (if any) accepted the by OANDA API endpoint you are trying to access (default None)
          :type params: dict or None
          """$SEP$# error message