title: TypeError: Object of type set is not JSON serializable
body: <p>When I try running this line in python, using the Bitmex Rest API</p>
  
  <pre><code>qty2 = self.client.Position.Position_get(json.dumps({'symbol': 'XBTUSD'}),json.dumps({'currentQty'})).result()
  </code></pre>
  
  <p>I get this error</p>
  
  <pre><code>File "c:/Users/User2/sample_market_maker/SAMPLE/botv2.py", line 113, in place_orders
  qty2 = self.client.Position.Position_get(json.dumps({'symbol': 'XBTUSD'}),json.dumps({'currentQty'})).result()
  File "c:\users\user2\appdata\local\programs\python\python37-32\Lib\json\__init__.py", line 231, in dumps
  return _default_encoder.encode(obj)
  File "c:\users\user2\appdata\local\programs\python\python37-32\Lib\json\encoder.py", line 199, in encode
  chunks = self.iterencode(o, _one_shot=True)
  File "c:\users\user2\appdata\local\programs\python\python37-32\Lib\json\encoder.py", line 257, in iterencode
  return _iterencode(o, 0)
  File "c:\users\user2\appdata\local\programs\python\python37-32\Lib\json\encoder.py", line 179, in default
  raise TypeError(f'Object of type {o.__class__.__name__} '
  
  TypeError: Object of type set is not JSON serializable
  </code></pre>
  
  <p>I have seen <a href="https://stackoverflow.com/questions/8230315/how-to-json-serialize-sets">How to JSON serialize sets?</a>. It shows a similar problem with an example but I am not sure how to implement it in my code.</p>