Skip to content

how to set a stop loss order with python api ? #159

@swiinger

Description

@swiinger

Hello,

I've looked at the python example which is nice but I can't figure out how to create a stop loss order
Do I need to use the Order class and how to use the parameters ?
I have tried this but I can't give all needed parameters for the stop loss like rule or expiration

spot_price_trigger_order = Order(
        type='limit',
        side = 'sell',
        price= "10",
        amount= "50",
        account= "normal",
        time_in_force= "gtc",
        currency_pair="CSPR_USDT"
    )
created = spot_api.create_spot_price_triggered_order(spot_price_trigger_order)

and I have an error
HTTP response body: {"label":"INVALID_PARAM_VALUE","message":"invalid argument: put.account"}

Thanks a lot

Chris

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