Why can't the bitmex contract type be passed when it is defined?

Author: The bride too., Created: 2018-09-27 17:04:51, Updated:

exchanges[0].SetContractType(leixing_bitmex);

where leixing_bitmex is an external parameter, defined as str XBTUSD

However, after defining the contract type, it returns true, but always returns the depth response Your browser sent an invalid request.

If we use exchanges directly [0].SetContractType ((XBTUSD); everything is fine, can't the contract type be passed with external parameters?

Prayers


More

The Little DreamPython language or JS, if it's Python, note global variables scope, whether there are local variables that can be renamed, etc. In the exchanges[0].SetContractType ((leixing_bitmex); before setting the contract, Log the leixing_bitmex variable to determine if it is XBTUSD.