Jump to content

aperson

Members
  • Content count

    20
  • Joined

  • Last visited

  1. 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?
  2. 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?
  3. Hi, I used https://ciapi.cityindex.com/TradingAPI/market/search?SearchByMarketName=TRUE (GET) as the only query and I'm on a demo account.
  4. 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?
  5. 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!
  6. 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
  7. 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?
  8. 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?
×