Invalid order type

Added by Arthur almost 4 years ago

I get the following error from test system

{"message":"Invalid order type.","order_id":0,"result_code":"INVALID_ORDER_TYPE","order_state":"DELETED","action_state":"INS_FAIL"}

when placing the order

String obj = "{\"identifier\":\"930911\", \"market_id\":18,  \"volume\":1,  \"side\":\"BUY\" ,\"order_type\": \"STOP_TRAILING\",\"activation_condition\": \"STOP_ACTPRICE_PERC\",\"trigger_value\": 5,\"trigger_condition\": \"<=\" ,\"target_value\": 0}";

however, when placing the following order it works, with different order_type or with different market.

String obj = "{\"identifier\":\"101\", \"market_id\":11,  \"volume\":1,  \"side\":\"BUY\" ,\"order_type\": \"STOP_TRAILING\",\"activation_condition\": \"STOP_ACTPRICE_PERC\",\"trigger_value\": 5,\"trigger_condition\": \"<=\" ,\"target_value\": 0}";


String obj = "{\"identifier\":\"930911\", \"market_id\":18,  \"volume\":1, \"price\": 1.00, \"currency\": \"USD\", \"side\":\"BUY\"}";

could you clarify what is wrong with the first order json.


Replies (3)

RE: Invalid order type - Added by Björn almost 4 years ago

Is the order type supported for your specific tradable?
The information is available in the response from "GET /next/2/tradables/info/{tradables}".

RE: Invalid order type - Added by Arthur almost 4 years ago

Thanks for the clarification,
I found this tradable supports only LIMIT orders, {
"type": "LIMIT",
"name": "Normal order"

When I post a limit order it asks for price parameter, could you suggest how to sell/buy LIMIT orders at market price using nordnet APIs?
We would like to place order(sure to be executed) that matches the best market price at the moment.


RE: Invalid order type - Added by Sevedwell 7 months ago

Invalid order type, You the reason why order type is invalid? If you not know you have to read my lines which i share for your work, Where best essays is important and whole reasons which make your data invalid is mention here. I want to recommend you to bring some changes which make your working order perfect.