Closed enzoferey closed 7 months ago
Hello, please provide a minimalistic code example and step-by-step instructions demonstrating how to reproduce the issue. Please do not include any tokens or secrets into it. If you decide to include secrets in it please share the code example via support chat instead.
There is really nothing special to the call, that's why we didn't include it. We are just calling:
const response = await metaApiConnection.createMarketBuyOrder(
tradeSymbol,
positionSize,
undefined,
undefined,
{
clientId,
slippage: slippagePoints,
},
);
tradeSymbol
is a string representing the symbol to buypositionSize
is a valid size number for the position to openclientId
is a string matching the standards defined on your docsslippagePoints
is a number representing the amount of allowed slippage pointsFinally, in order to create the metaApiConnection
, we are using:
import MetaApi from "metaapi.cloud-sdk/node";
// Get MetaTrader account
const metaApi = new MetaApi.default(METAAPI_TOKEN);
const account = await metaApi.metatraderAccountApi.getAccount(METAAPI_ACCOUNT_ID);
// Wait until accont is deployed and connected to broker
await account.deploy();
await account.waitConnected();
// Get connection instance
const metaApiConnection = account.getStreamingConnection();
// Wait until connection is established
await metaApiStreamingConnectionInstance.connect();
// Synchronize local copy of the account state with the broker state
await metaApiStreamingConnectionInstance.waitSynchronized();
return metaApiConnection;
Just standard steps from your examples.
Hey @metaapi, any updates?
I think it is better to contact support via online chat regarding the above because this issue is not related to SDK. Please mention the link to this ticket when you contact support so that they can assist you faster.
@metaapi we did contact support via online chat but we never got an answer, that's why we opened the issue here. It has been over 2 months and we still don't know if it's an SDK issue or an issue with MetaApi not passing properly the parameters to the underlying broker or a combination of wrong parameters + symbol characteristics. With all respect, it has been over 2 months at this point and it seems you don't really care giving support to your paying customers. How can we proceed?
On top of that, you have made the SDK closed source without further notice, so now running MetaApi is a complete blackbox and we cannot pin point ourselves if there is any issue on the logic.
Hi! 😁
We are seeing a series of
ERR_OFF_QUOTES
error responses when placing trades. Since we only make market orders, as far as we have read, this error can only happen because of the slippage limit being exceeded. Is that correct?Then, even though we are getting this error response back, trades are still being placed with slippage beyond our limits set when making the call via the
options.slippage
. We have checked the specifications of the symbols we trade and they are not set toSYMBOL_TRADE_EXECUTION_MARKET
execution mode, so we are a bit lost on this one. Shouldn't the trades not be opened in this case?Thank you for your help 🙏🏻