Jump to content

Physicsman

Administrators
  • Content count

    814
  • Joined

  • Last visited

  • Days Won

    20

Physicsman last won the day on April 22

Physicsman had the most liked content!

2 Followers

About Physicsman

  • Rank
    Staff

Profile Information

  • Gender
    Male
  • Location
    London, Great Britain

Recent Profile Visitors

1,480 profile views
  1. Williams %R

    Hi Tom, Chart indicators are not carried on the API. They must be calculated manually using the appropriate input data from the API in the indicator formula. Kind Regards, PM
  2. API Limits

    Hi Mike, Apologies for the late reply. For some reason the forum automated software did not notify me about this post (or I somehow missed it), and did not spot this post until now. There is no wieght to the endpoints, each single request counts as 1 out of the 500. It's puzzling that your account is throttled when ther eis no/little activity from it. Presumably you are not doing either of the 2 things listed below? Should it still occur frequently, please take a note of the date/time and activity when throttling occurs. You can contact client services about it with your account details and then can pass that onto the appropriate team to investigage further. Two common cases that can trigger the throttling threshold are: requesting market information requesting price history Market Information Requests When requesting market information, the ListMarketInformation method can accept a list of market IDs. This enables you to retrieve multiple markets in one request, as opposed to making multiple repeated ListMarketInformation calls with one market ID in each request. Price History Requests Client UI applications should not calculate higher time frame prices from lower time frame data. For example, requesting 60x 1-minute price data and then calculating a 1-hour data point. Instead, the client UI should request the 1-hour price history data from the server directly.
  3. /session api error

    Hi Tom, Please use the Live API URL: https://ciapi.cityindex.com/tradingapi. The pre-production URL is no longer available for external use. Kind Regards, PM
  4. Hi Buzz, Apologies for the late reply - you seem to have figured it out. Just in case, it is 7.0.3, which at the time the quoted line was written was the latest version. Clearly this has since been superseded. Kind Regards, PM
  5. API Limits

    Hello, It is tracked by the login session in use. Each user can have 5 concurrent sessions. Across those sessions, within a 5 second window, we allow 500 requests. Kind Regards, PM
  6. API Limits

    Hi, I'll check with the dev team and reply when I have an answer. Cordially, PM
  7. Session Id error return code

    Hi Kevin, Should the Session token expire then it is a 401 error code returned. Kind Regards, PM
  8. Reson Code 75

    Hi Dave, Very happy to hear you managed to sort out the problem. Kind Regards, PM
  9. Hi Kevin, The AuditId is there to help the user in case of any dispute as it exactly tracks what market price the user had received at the time they placed the trade or entry order. I omitted it in my example for expediency, but users should continue to include it in their calls. Kind Regards, PM
  10. Reson Code 75

    Hi Dave, Are you using a demo/test account or a real money Live account? If, and only if you are using a demo/test account, please send me a private message with your account login crednetials. I can then use your account to do some testing directly with API calls and see what happens. Many thanks, PM
  11. Reson Code 75

    Hi Dave, Probably most efficient to show you the API body of a call that successfully places a trade at market with stop losses and take profit limits. You can then re-use this POST body editing for the current BId/Ask prices, the stop/limit levels and Trading Account ID etc. Since we know this POST body works, if it does NOT work for you we can start narrowing down to see where the problem is. { "MarketId": 401484414, "Direction": "sell", "Quantity": 1000, "BidPrice": 110.279, "OfferPrice": 110.29, "AuditId": "EF70508008", "TradingAccountId": 401637645, "PositionMethodId": 1, "IfDone": [ { "Stop": { "OrderId": null, "Direction": "buy", "Applicability": "gtc", "ExpiryDateTimeUTC": null, "Guaranteed": false, "Quantity": 1000, "TriggerPrice": 121.308, "IfDone": [], "OcoOrder": null, "TriggerLevelCalculationTypeId": null, "TriggerLevelCalculationValue": null }, "Limit": { "OrderId": null, "Direction": "buy", "Applicability": "gtc", "ExpiryDateTimeUTC": null, "Quantity": 1000, "TriggerPrice": 99.249, "IfDone": [], "OcoOrder": null, "TriggerLevelCalculationTypeId": null, "TriggerLevelCalculationValue": null } } ], "PriceTolerance": 1000 } Kind Regards, PM
  12. Reson Code 75

    Hi Dave, The code 75 you are seeing is the InstructionStatusReason code, and 75 means "Instruction processing has resulted in a Red Card. Please check details." If you look further into the body of your response you will see there are StatusReason 49 codes as well. It is these that are the OrderStatusReason code, and 49 means "Trigger level does not conform to minimum distance requirements specified for the market." Is the entry price of your order to close to the current Buy/Sell price? Kind Regards, PM
  13. Hi Mike, Are you asking why I mentioned in the Bid and Ask prices in my reply? I'm not quite clear on your question. I mentioned it because since I could see the values in your original order request, this was how I could determine that your entry order was being placed inside the Bid/Ask spread, which caused your order request to fail. Kind Regards, PM
  14. Hello Mike, That error message means: Trigger level does not conform to minimum distance requirements specified for the market. You can see the full list of code explanations at: https://docs.labs.gaincapital.com/#APICodesList.htm?TocPath=Getting%20Started%7CLookup%20Values%7C_____1 Looking at your call parameters, the Bid is 1.16582, and the Offer is 1.17782, whereas the order trigger price you are attempting to place is at 1.17182, which is within the market spread. Entry orders have to be outside the market spread, and many markets have a minimum distance away from the current Bid/Offer price that the Entry order must comply with. Kind Regards, PM
  15. Hello! Thank you for sending your demo account credentials. I have managed to successfully place a trade with attached stop loss order. It looks as though there were a series of issues with the call, which lead us on this chain of error messages. The most recent, and hopefully final problem is that the wrong market ID was used in your call. The MarketID for EUR/USD to use in your calls is 401484347, instead of what you actually used. For future reference, you can follow the directions in https://docs.labs.gaincapital.com/#How Do I/Find Market ID.htm?TocPath=How%20Do%20I...%3F%7C_____1 to search/find the Market IDs you need in your trading. The post body that finally worked is: { "MarketId":401484347, "Direction":"buy", "Quantity":1000, "BidPrice": 1.1762, "OfferPrice": 1.1764, "TradingAccountId":<redacted>, "PositionMethodId":1, "IfDone":[{"Stop":{"OrderId":null,"Direction":"Sell","Applicability":"gtc","ExpiryDateTimeUTC":null,"Quantity":1000,"TriggerPrice":1.1710,"IfDone":[],"OcoOrder":null}, "Limit":null}] } Kind Regards, PM
×