Trade not executed

Created at 20 Jul 2023, 14:40
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!
CT

ctid5696420

Joined 17.02.2023

Trade not executed
20 Jul 2023, 14:40


Hi,

When using the Open API to execute a trade, I encountered an error stating "NOT_ENOUGH_MONEY," despite having sufficient funds in the account for the trade. Below is the response I received:

{
 "ctidTraderAccountId": "26898969",
 "executionType": "ORDER_REJECTED",
 "position": {
   "positionId": "116877973",
   "tradeData": {
     "symbolId": "16",
     "volume": "0",
     "tradeSide": "BUY",
     "label": "53567802",
     "guaranteedStopLoss": false,
     "comment": "CBOT-25844689-1100 ActualRisk % = 1.59186"
   },
   "positionStatus": "POSITION_STATUS_CLOSED",
   "swap": "0",
   "price": 0,
   "commission": "0",
   "marginRate": 0,
   "mirroringCommission": "0",
   "guaranteedStopLoss": false,
   "usedMargin": "0",
   "moneyDigits": 2,
   "trailingStopLoss": false
 },
 "order": {
   "orderId": "218384796",
   "tradeData": {
     "symbolId": "16",
     "volume": "100000",
     "tradeSide": "BUY",
     "openTimestamp": "1689858667321",
     "label": "53567802",
     "guaranteedStopLoss": false,
     "comment": "CBOT-25844689-1100 ActualRisk % = 1.59186"
   },
   "orderType": "MARKET",
   "orderStatus": "ORDER_STATUS_REJECTED",
   "executedVolume": "0",
   "utcLastUpdateTimestamp": "1689858667321",
   "closingOrder": false,
   "timeInForce": "IMMEDIATE_OR_CANCEL",
   "positionId": "116877973",
   "relativeStopLoss": "500",
   "relativeTakeProfit": "600",
   "trailingStopLoss": false
 },
 "deal": {
   "dealId": "188851350",
   "orderId": "218384796",
   "positionId": "116877973",
   "volume": "100000",
   "filledVolume": "0",
   "symbolId": "16",
   "createTimestamp": "1689858667321",
   "executionTimestamp": "1689858667321",
   "utcLastUpdateTimestamp": "1689858667321",
   "tradeSide": "BUY",
   "dealStatus": "INTERNALLY_REJECTED",
   "marginRate": 1.28602,
   "commission": "0",
   "baseToUsdConversionRate": 1.28602,
   "moneyDigits": 2
 },
 "errorCode": "NOT_ENOUGH_MONEY",
 "isServerEvent": false
}


@ctid5696420
Replies

PanagiotisChar
21 Jul 2023, 05:39

Hi there,

What is your symbol leverage and what is your balance? It's almost 100% sure that the message is right so you need to figure out what you are doing wrong.

Aieden Technologies

Need help? Join us on Telegram


 


@PanagiotisChar