Jump to content

jpl

Members
  • Content count

    6
  • Joined

  • Last visited

  1. Hello, I am developing a Python app that will send orders to Forex.com and I received a demo account that I'm currently using to test and develop the app. When the app is completed and I want to trade using my live account, how do I get the AppKey for my live account? (the account is on Forex.com, in case this API is used on different broker platforms..)
  2. Market Order

    That's great thank you for explaining. Regarding the PriceTolerance value, is that value the amount of pips or the amount dollars or something else?
  3. Market Order

    Ok thank you, so the Market order does not use the bid/offer prices for the order ticket but the the way the API is architected the BidPrice and OfferPrice values still need to be passed. And if I set two arbitrary values I noticed I could get StatusReason 158 if they exceed the price tolerance. The app Im building is a server-side (Python) app which will only be responsible for order routing which is why I do not intend to implement Lightstreamer here. The buy and sell signals are abstracted into another client side Node.js app which manages the price stream and will connect to Lightstreamer. But one function that I need to achieve in this sever-side app is a fail-safe that can execute a market trade (e.g. to urgently close a position at market) regardless of the price stream that is fed into the client side app. Since I cannot send an explicit market order without still adding BidPrice and OfferPrice within the price tolerance then: TLDR: Which GCAPI endpoint can I call from my server-side app to get recent (not necessarily second fresh) prices for a market? E.g. Im thinking I can just use http://docs.labs.gaincapital.com/index.html#HTTP Services/GetLatestPriceTicks.htm%3FTocPath%3DCIAPI%20Reference|HTTP%20Services|Price%20History|_____5 or http://docs.labs.gaincapital.com/index.html#HTTP Services/GetLatestPriceBars.htm%3FTocPath%3DCIAPI%20Reference|HTTP%20Services|Price%20History|_____1 Which of these or which other GCAPI endpoint could give the most recent prices when called?
  4. Market Order

    Ok thats great but when POSTing to https://ciapi.cityindex.com/TradingAPI/order/newtradeorder there is BidPrice and OfferPrice in the request body, which seems to be mandatory because if I remove them BidPrice and OfferPrice fields I get "Status": 4, "StatusReason": 45. How can I place a market order without filling in the price fields? Can you please describe by modifying the request body below for how to properly place a market order without any mandatory price fields, I do not understand how I can place a market order "where there is no mandatory order price field". {"IfDone":[],"Direction":"buy","ExpiryDateTimeUTCDate":null,"LastChangedDateTimeUTCDate":null, "OcoOrder":null,"Type":null,"ExpiryDateTimeUTC":null,"Applicability":null,"TriggerPrice" :null,"BidPrice":1.226,"AuditId":"xxxx","AutoRollover":false,"MarketId":XYZ,"OfferPrice" :1.226,"OrderId":0,"Currency":null,"Quantity":1000,"QuoteId":null,"LastChangedDateTimeUTC":null,"PositionMethodId" :1,"TradingAccountId":"XYZ","MarketName":null,"Status":null,"isTrade":true} Thank you
  5. Market Order

    So does this API only support LIMIT orders and not MARKET orders? Because the order price is irrelevant for market orders but since it seems to be a required field only limit orders are supported?
  6. Thank you Ricky, just what I was looking for. Would be awesome if you could add under examples e.g. Place a trade (also including login/authentication)
×