You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
conn=PhemexConnection(credentials)
# set up order helper classesorder_placer=conn.get_order_placer()
order_factory=order_placer.get_order_factory()
# create a limit orderlimit=order_factory.create_limit_order(Side.SELL, 1, 10000.0, Contract('BTCUSD'))
# create a market order for BTCUSD, "cross" (no leverage), sell / shortorder=order_factory.create_market_order(Side.SELL, 1, Contract('BTCUSD'))
# build up a conditional that places the given market short sell order# when last trade price touches 8800conditional=ConditionalOrder(Condition.IF_TOUCHED, Trigger.LAST_PRICE, 10000.0, order)
# place the orderslimit_hnd=order_placer.submit(limit)
cond_hnd=order_placer.submit(conditional)
# cancel themlimit_hnd.cancel()
cond_hnd.cancel()