-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi!
I assume I might be doing something wrong but
When I try to place TakeProfitOrder for the trade:
int tradeId = 115;
static private async Task CreateTakeProfitOrder(OandaApiClient apiClient, string accountId, int tradeId, decimal price)
{
var request = new TakeProfitOrderRequest
{
Price = price,
TimeInForce = TimeInForce.GTC,
TradeID = tradeId
};
try
{
var response = await apiClient.CreateOrder(accountId, request);
return response;
}
catch (RequestFailedException ex)
{
Console.WriteLine($"{ex.ResponseContent}");
return null;
}
}
It keeps throwing the following exception
{"errorMessage":"Invalid value specified for 'order.tradeID'","errorCode":"oanda::rest::core::InvalidParameterException"}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels