text: import urllib.request
  import json
  import pprint
  
  obj = { 'Password': '123456',
          'Symbol': '9433',
          'Exchange': 1,
          'SecurityType': 1,
          'FrontOrderType': 20,
          'Side': '1',
          'CashMargin': 3,
          'MarginTradeType': 2,
          'DelivType': 2,
          'AccountType': 2,
          'Qty': 100,
          'ClosePositionOrder': 1,
          'Price': 2762.5,
          'ExpireDay': 20200924 }
  json_data = json.dumps(obj).encode('utf-8')
  
  url = 'http://localhost:18080/kabusapi/sendorder'
  req = urllib.request.Request(url, json_data, method='POST')
  req.add_header('Content-Type', 'application/json')
  req.add_header('X-API-KEY', 'ed94b0d34f9441c3931621e55230e402')
  
  try:
      with urllib.request.urlopen(req) as res:
          print(res.status, res.reason)
          for header in res.getheaders():
              print(header)
          print()
          content = json.loads(res.read())
          pprint.pprint(content)
  except urllib.error.HTTPError as e:
      print(e)
      content = json.loads(e.read())
      pprint.pprint(content)
  except Exception as e:
      print(e)
  