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 _t_order_create(self):
      while True:
          msg = self.q_ordercreate.get()
          if msg is None:
              break
  
          oref, okwargs = msg
          try:
              o = self.oapi.create_order(self.p.account, **okwargs)
          except Exception as e:
              self.put_notification(e)
              self.broker._reject(oref)
              return
  
          # Ids are delivered in different fields and all must be fetched to
          # match them (as executions) to the order generated here
          oids = list()
          for oidfield in self._OIDSINGLE:
              if oidfield in o and "id" in o[oidfield]:
                  oids.append(o[oidfield]["id"])
  
          for oidfield in self._OIDMULTIPLE:
              if oidfield in o:
                  for suboidfield in o[oidfield]:
                      oids.append(suboidfield["id"])
  
          if not oids:
              self.broker._reject(oref)
              return
  
          self._orders[oref] = oids[0]
          self.broker._submit(oref)
          if okwargs["type"] == "market":
              self.broker._accept(oref)  # taken immediately
  
          for oid in oids:
              self._ordersrev[
                  oid
              ] = oref  # maps ids to backtrader order
  
              # An transaction may have happened and was stored
              tpending = self._transpend[oid]
              tpending.append(None)  # eom marker
              while True:
                  trans = tpending.popleft()
                  if trans is None:
                      break
                  self._process_transaction(oid, trans)
  
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 23 for calling the OandaStore obj's underlying member method code with example usage: obj._t_order_create() without return types