-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hello,
I have an option that i had already bought and in my account. I am trying to place a TAKE PROFIT / STOP LOSS order but it is giving following error
{"message":"Parameter error, invalid side, value: SELL","error_code":"OAUTH_OPENAPI_PARAM_ERR"}
Looks like it does not like the MASTER order of SELL side in the payload.
So i removed the MASTER order from the payload but it gave following error,
{"message":"Parameter error, invalid combo_type, value: [\"STOP_LOSS\",\"STOP_PROFIT\"]","error_code":"OAUTH_OPENAPI_PARAM_ERR"}
Payload:
{ "account_id": "9SJ4JSFGOOQO5MMCIV9AO4J4F8", "client_combo_order_id": "5e9c84ea-ac35-4942-b014-4c53761687c4", "new_orders": [ { "client_order_id": "0fb7da74-0d6c-4712-9697-8e1df62c35df", "combo_type": "MASTER", "option_strategy": "SINGLE", "instrument_type": "OPTION", "entrust_type": "QTY", "support_trading_session": "CORE", "symbol": "SOFI", "market": "US", "side": "SELL", "order_type": "LIMIT", "time_in_force": "GTC", "limit_price": "6", "quantity": "1", "legs": [ { "side": "SELL", "quantity": "1", "market": "US", "instrument_type": "OPTION", "symbol": "SOFI", "strike_price": "30", "option_expire_date": "2027-01-15", "option_type": "CALL" } ] }, { "client_order_id": "1df759fd-a198-4ab4-8b58-e8f275ac605c", "combo_type": "STOP_PROFIT", "option_strategy": "SINGLE", "instrument_type": "OPTION", "entrust_type": "QTY", "support_trading_session": "CORE", "symbol": "SOFI", "market": "US", "side": "SELL", "order_type": "LIMIT", "time_in_force": "GTC", "limit_price": "6", "quantity": "1", "legs": [ { "side": "SELL", "quantity": "1", "market": "US", "instrument_type": "OPTION", "symbol": "SOFI", "strike_price": "30", "option_expire_date": "2027-01-15", "option_type": "CALL" } ] }, { "client_order_id": "15eb99fb-3204-4f42-aab4-7f21c851fcb7", "combo_type": "STOP_LOSS", "option_strategy": "SINGLE", "instrument_type": "OPTION", "entrust_type": "QTY", "support_trading_session": "CORE", "symbol": "SOFI", "market": "US", "side": "SELL", "order_type": "STOP_LOSS", "time_in_force": "GTC", "stop_price": "1", "quantity": "1", "legs": [ { "side": "SELL", "quantity": "1", "market": "US", "instrument_type": "OPTION", "symbol": "SOFI", "strike_price": "30", "option_expire_date": "2027-01-15", "option_type": "CALL" } ] } ] }
Please give me an example of correct payload that i can send for TAKE PROFIT / STOP LOSS order.
Thanks,
Vinod
FYI: Same ticket is also opened for java sdk.