I keep getting this error:
Exception has occurred: TypeError unsupported operand type(s) for -: 'int' and 'NoneType' File "C:\Users\xxxx\demos\TradingBot\test_orders.py", line 39, in <module> phemex.create_limit_buy_order("BTCUSDT", 100, 20794.2, params=params) TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'
This is what my order looks like:
params = { "timeInForce": "PostOnly", } phemex.create_limit_buy_order("BTCUSDT", 100, 20794.2, params=params)
This is how im connected to the API:
phemex = ccxt.phemex( { "enableRateLimit": True, "apiKey": config.API_KEY, "secret": config.API_SECRET, } ) phemex.set_sandbox_mode(True)
Any help would be greatly appreciated. I tried a bunch of different variations of price and size however none seemed to work. I ded get other errors like " not enough balance" etc. Just seems to be this main error thats not allowing me to place an order
I keep getting this error:
Exception has occurred: TypeError unsupported operand type(s) for -: 'int' and 'NoneType' File "C:\Users\xxxx\demos\TradingBot\test_orders.py", line 39, in <module> phemex.create_limit_buy_order("BTCUSDT", 100, 20794.2, params=params) TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'This is what my order looks like:
params = { "timeInForce": "PostOnly", } phemex.create_limit_buy_order("BTCUSDT", 100, 20794.2, params=params)This is how im connected to the API:
phemex = ccxt.phemex( { "enableRateLimit": True, "apiKey": config.API_KEY, "secret": config.API_SECRET, } ) phemex.set_sandbox_mode(True)Any help would be greatly appreciated. I tried a bunch of different variations of price and size however none seemed to work. I ded get other errors like " not enough balance" etc. Just seems to be this main error thats not allowing me to place an order