
aperson
Members-
Content count
20 -
Joined
-
Last visited
About aperson
-
Rank
Member
-
Cannot Close position - getting Server Error 500 with no specific details
aperson replied to aperson's topic in General Questions and Discussion
Ok I'll try to list my most accurate current market price for the bid and ask fields. What is the purpose of including the bid and ask? Is it for optional logging or if my bid and ask prices are not accurate, then would the trade not execute? If it is for precision trading, then if the streaming api is off by a little bit and that affects my bid and ask prices to the call, would my trade not process sometimes? -
Cannot Close position - getting Server Error 500 with no specific details
aperson replied to aperson's topic in General Questions and Discussion
Ok, so clients would get the most accurate current market price for trades by using the streaming API. Are bid and offer prices in the trade call matched with the api backend to check whether the client's current market prices are close enough to the backend's current market prices? If it is, then execute the trade, and if not, would the trade be rejected? I'm wondering if this is for precise trading or just an optional log for the client or Forex.com to track stuff if we want. Can I put 0 for bid and offer prices if I don't wanna use it? -
Missing USD/JPY and other pairs from market search
aperson replied to aperson's topic in General Questions and Discussion
Hi, I used https://ciapi.cityindex.com/TradingAPI/market/search?SearchByMarketName=TRUE (GET) as the only query and I'm on a demo account. -
Cannot Close position - getting Server Error 500 with no specific details
aperson replied to aperson's topic in General Questions and Discussion
Yes I'm posting to https://ciapi.cityindex.com/TradingAPI/order/newtradeorder Do we need to include the bid, offer, and the AuditId? I was reading some posts about this. Do we need the streaming API to make any trades? The streaming API seems complicated, and I'm not aiming to do very short term trades, so trading off historical data would be ideal. Are these 3 parameters required to be accurate to the current market price to make any trades or is this just an indicator/log to Forex.com about what we saw at the time for the client's optional use and it could be way off, and if we don't care about it then we just put whatever we want in there? -
Cannot Close position - getting Server Error 500 with no specific details
aperson posted a topic in General Questions and Discussion
So I've tried a payload like this to close an open Long position: (btw, my other api calls work) body ={ "Direction":'sell', "TradingAccountId":mytradeaccountID,"MarketName":"GBP/JPY", "MarketId":401484385,"Quantity":1000, "Close":[id_as_an_integer],"isTrade":true} } but I get a server error 500 with no specific details. Help! -
Missing USD/JPY and other pairs from market search
aperson posted a topic in General Questions and Discussion
So I tried market/search?SearchByMarketName=TRUE and while it returns many currency pairs and its corresponding ID, the list does not have some USD pairs like USD/JPY and USD/CHF. Am I doing this route correctly? I think my list has 50 currency pairs. Thanks -
Any way to see P/L for individual open positions?
aperson posted a topic in General Questions and Discussion
I was looking in the docs under list open positions, but didn't see anything related to that. Also, none of the individually queried open positions show any P/L. Do we have to calculate our own by subtracting the open price from the current price for each open position? -
Ok thanks. I dont see any of those if/done urls in the orders docs so wondering where this applies. Does the API automatically give an error msg when a US client makes a call that is one of these not allowed calls or is the client responsible for not calling those endpoints? Does this also mean that US clients cannot use the API to put any stop loss or limits on any open trades? Edit* I called customer service just now and explained my question there and the rep said that she asked the trade desk and that US clients can trade if/done stop and limit orders. Is the documentation out of date?