Jump to content

All Activity

This stream auto-updates     

  1. Last week
  2. Span not working

    Hi, thank you for getting back to me. I have identified the source of the error, which was in the gcapi python package I was using to connect to the API itself. I'll be able to work around this manually, apologies for the disturbance. Thank you, alxRiash
  3. Span not working

    Hi alxRiash, Just did a sample call on the API and retrieving 5 minute bars seem fine. Could you provide the actual request being sent as your snippet has the get_ohlc wrapper around what would hit our API. Thanks.
  4. I am trying to load in 5-minute ohlc data, however, when setting the span to be 5, the results are still at 1-minute level. Not sure if I've misunderstood the documentation? Code: market_id = api.get_market_info("AUD/USD", get=None)['Markets'][0]['MarketId'] response =api.get_ohlc(market_id=market_id, num_ticks=None, interval="MINUTE", span=5, from_ts=dt2ts(datetime.now() - timedelta(days=1)), to_ts=dt2ts(now)) response Result: BarDate Open High Low Close 0 2022-06-27 19:23:00 0.69254 0.69256 0.69248 0.69249 1 2022-06-27 19:24:00 0.69250 0.69255 0.69247 0.69250 2 2022-06-27 19:25:00 0.69249 0.69249 0.69229 0.69234 3 2022-06-27 19:26:00 0.69234 0.69247 0.69233 0.69245 4 2022-06-27 19:27:00 0.69244 0.69255 0.69239 0.69253
  5. Earlier
  6. Hi Matrix, Did you supply both Username and Session in the HTTP headers for all post authentication requests? If so, we may need more details to diagnose the issue (for example, the full request but with username removed). Thanks.
  7. Hi, I have tried this on my test account and I get 401 (Session not valid). This, after just logging in successfully? Any ideas?
  8. Thank you. That worked a charm
  9. Hi tez, Some UK accounts have undergone overhaul recently which is likely the reason why you are encountering errors. The API documents are being updated and will be available shortly. In the interim, I would suggest the following: - For your calls to fetch markets, you need to supply an additional ClientAcountId querystring parameter - For the ClientAccountId value, please implement <API prefix>/v2/userAccount/ClientAndTradingAccount - same HTTP headers as the previous call. In the response object, you will see the relevant ClientAccountids for your CFD and Spread accounts Please feel free to drop further questions. Thanks.
  10. Anyone know if this was a breaking change as my account comes back as CFD for my login (no idea how to switch it to say Spread), and perhaps this is the reason my calls to fetch markets now fail with 500 error? Didn't get any email about changes to api or note any postings on here. Obviously since this forum is no longer actively maintained can we assume that going forward this api is dead?
  11. List Market Information

    Yes thats correct, but different IDs can be used for streaming price data. A bit confusing.
  12. List Market Information

    Hi Matrix, From reading your above posts, you were able to solve the problem by using the IDs for markets that your account has access to, is that correct? Kind Regards, PM
  13. List Market Information

    Just for completion. There are a number of marketIds for each market and depending upon your account different Ids seem to be returned. You need the correct Id (from ListMarketSearch). Interestingly even though an incorrect id (returned from SearchWithTags for example) allows you to stream prices the same id does not work with GetMarketInformation. Many thanks.
  14. List Market Information

    Ive just used one in the documentation although using the ID ive given I can stream price data without a problem. So you think I need to use this process you have given? When I use searchwithtags it works fine and brings back the ID given above?
  15. List Market Information

    I forgot to ask earlier, how did you find the MarketId? Did you follow the process as described in: https://docs.labs.gaincapital.com/#How Do I/Find Market ID.htm?TocPath=How%20Do%20I...%3F%7C_____1 If you are using a MarketId from one of the examples in the documentation, then the likely reason is that your account does not have access to that market. Try getting a MarketId using the process describe din the link so we know ti is one you can access with yoru account. I'll take a closer look at your POST details to see if I can spot anything,
  16. List Market Information

    https://ciapi.cityindex.com/TradingApi/market/information {"MarketIds":[401166448]} UserName DM797427 Session f3664738-bd24-4a28-a004-8751c3d10335 Content-Type application/json {"MarketInformation":[]} Copied from third party tool. Im using Java HttpClient inside the app.
  17. List Market Information

    Hi, A test account should also work. The call I sent above is also using a test account on the Live/Production environment. If you can cut and paste the full copy of the call you are sending I can check it and see if I spot anything there. Kind Regards, PM
  18. List Market Information

    Hi thanks, Ive jigged around with headers etc with no luck. All my parameters are correct. Ive used a third party tool to send a Post request with exactly the same result. My account is not live it is a test account. Will this make a difference. Thanks.
  19. List Market Information

    Hi Matrix, Without seeing the call you are sending I cannot say where the error lies. However, the service is working normally as expected. Below is a screenshot showing the call I am sending that is retuning the market information as exepcted. Hopefully, you can use this to guide you into formatting your call correctly. The Headers of the call are should contain the login Session Id and the account login username. Kind Regards, PM
  20. Hi, I am trying to list market information for a few market ids. I have included the correct ids in a json array inside a httpPost and I get a 200 response but the response MarketInformation property is always an empty json array. I have tried credentials inside query string and header. Other httpPosts work fine such as login. I can do a searchwithtags httpGet request fine. Is there a problem with this particular service? Thanks.
  21. I'm the worst hacker of all time. That was it PM, it works. Thanks for your time and for your heroic support in this forum. Steven Almeroth Cleveland
  22. Hi Stav, The timestamp has to be supplied in seconds, rather than milliseconds. I have tried a test call and it works when supplied in seconds. Kind Regards, PM
  23. Hi Govols, We do not provide volume data for markets and so they are not available via API, or from any other platform such as NinjaTrader if we are the data source. Kind Regards, PM
  24. There's really no way to get live trading volume with this API? Is there any other way to get live market data that includes volume for FOREX.com markets? Can I get it on NinjaTrader? Thank you
  25. Hello Stav, We're looking into this for you and will reply once I have results of the investigation. Kind Regards, PM
  26. I have a demo account that works fine for everything, for example: https://ciapi.cityindex.com/tradingapi/market/401153870/barhistory?span=1&PriceBars=3&priceType=MID&interval=DAY { PriceBars: [ { BarDate: "/Date(1649635200000)/", Open: 1946.57, High: 1969.66, Low: 1940.05, Close: 1953.71 }, { BarDate: "/Date(1649721600000)/", Open: 1952.97, High: 1978.71, Low: 1949.75, Close: 1966.66 }, { BarDate: "/Date(1649808000000)/", Open: 1966.88, High: 1981.59, Low: 1962.92, Close: 1977.87 } ], PartialPriceBar: { BarDate: "/Date(1649894400000)/", Open: 1977.27, High: 1980.4, Low: 1960.72, Close: 1972.3 } } But this call fails: https://ciapi.cityindex.com/tradingapi/market/401153870/barhistoryafter?span=1&maxResults=3&priceType=MID&interval=DAY&fromTimestampUTC=1647264903000 { ok: false, redirected: false, status: 500, statusText: "Internal Server Error", url: "https://ciapi.cityindex.com/tradingapi/market/401153870/barhistoryafter?span=1&maxResults=3&priceTyp..." } Why am I getting the error?
  27. Best way to know if Market is closed

    Hi Wintermonth, If the bug is fixed before the 20th of May, I can notify you here about it. Kind Regards, PM
  1. Load more activity