class_docstr: Singleton class wrapping to control the connections to Oanda.
  
  Params:
  
    - ``token`` (default:``None``): API access token
  
    - ``account`` (default: ``None``): account id
  
    - ``practice`` (default: ``False``): use the test environment
  
    - ``account_tmout`` (default: ``10.0``): refresh period for account
      value/cash refresh
class_docstr_tok: ["Singleton","class","wrapping","to","control","the","connections","to","Oanda",".","Params",":","-","``","token","``","(","default",":","``","None","``",")",":","API","access","token","-","``","account","``","(","default",":","``","None","``",")",":","account","id","-","``","practice","``","(","default",":","``","False","``",")",":","use","the","test","environment","-","``","account_tmout","``","(","default",":","``","10.0","``",")",":","refresh","period","for","account","value\/cash","refresh"]
code: def _process_transaction(self, oid, trans):
      try:
          oref = self._ordersrev.pop(oid)
      except KeyError:
          return
  
      ttype = trans["type"]
  
      if ttype in self._X_ORDER_FILLED:
          size = trans["units"]
          if trans["side"] == "sell":
              size = -size
          price = trans["price"]
          self.broker._fill(oref, size, price, ttype=ttype)
  
      elif ttype in self._X_ORDER_CREATE:
          self.broker._accept(oref)
          self._ordersrev[oid] = oref
  
      elif ttype in "ORDER_CANCEL":
          reason = trans["reason"]
          if reason == "ORDER_FILLED":
              pass  # individual execs have done the job
          elif reason == "TIME_IN_FORCE_EXPIRED":
              self.broker._expire(oref)
          elif reason == "CLIENT_REQUEST":
              self.broker._cancel(oref)
          else:  # default action ... if nothing else
              self.broker._reject(oref)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import collections
  from datetime import datetime, timedelta
  import time
  import json
  import threading
  import oandapy
  import requests
  import backtrader
  from backtrader.metabase import MetaParams
  from backtrader.utils.py3 import queue, with_metaclass
  from backtrader.utils import AutoDict
label_desc: Use image node_id 27 for calling the OandaStore obj's underlying member method code with example usage: obj._process_transaction(oid, trans) without return types