Skip to content

Is OCO order supported? #251

@MrGood410

Description

@MrGood410

I'm trying to submit the LIMIT OCO order without any success.

I'm using the following code and only get half of the order through, without the OCO part.

 if position.amount > 0:
       LimitPrice = position.base_price + 150.0
       StopPrice = position.base_price - 150.0
   else:
       LimitPrice = position.base_price - 150.0
       StopPrice = position.base_price + 150.0
   await bfx.wss.inputs.submit_order(
       type="LIMIT", symbol=position.symbol, 
       amount=-position.amount, price=LimitPrice,
       lev=position.leverage, price_oco_stop=StopPrice)

Any idea? Is there a Python example using the OCO order?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions