Skip to content

Not letting me open orders in Sandbox mode #9

Description

@MrPotatoHead-Dev

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions