Uknown payload type 2142

Created at 18 Mar 2023, 23:08
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
OL

olehmalkov

Joined 12.03.2023

Uknown payload type 2142
18 Mar 2023, 23:08


Hi,
We are trying to place an order via API using node.js and get the following error:
Unknown payload type – 2142.
At the same time we are sure that there are no problems with authorization and it’s completed successfully, as we receive the actual account balance.

The code we are using is below:

const myOrder = await myAccount.placeOrder({
    symbol: "EURUSD",
    direction: MidaOrderDirection.SELL,
    volume: 1
});

Has anyone experienced the same issue and can share any ideas how to fix it?

Thank you


@olehmalkov
Replies

PanagiotisChar
20 Mar 2023, 09:56

Hi there,

It seems you are using Mida. Try asking in their Telegram chat 

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 


@PanagiotisChar

vasile.peste
20 May 2023, 22:54

RE:

olehmalkov said:

Hi,
We are trying to place an order via API using node.js and get the following error:
Unknown payload type – 2142.
At the same time we are sure that there are no problems with authorization and it’s completed successfully, as we receive the actual account balance.

The code we are using is below:

const myOrder = await myAccount.placeOrder({
    symbol: "EURUSD",
    direction: MidaOrderDirection.SELL,
    volume: 1
});

Has anyone experienced the same issue and can share any ideas how to fix it?

Thank you

Hello, this errors occurs when you don't give Trading permissions to your trading accounts


@vasile.peste