Cinemizer 0 Report post Posted May 24, 2020 Hi, Is it possible to place in one Post Request more than one order ? According this description: http://docs.labs.gaincapital.com/#How Do I/Trades Orders.htm%3FTocPath%3DHow%20Do%20I...%3F|_____4 is possible to place one order and the server answers with OrderId, but how is it possible to place more orders in one Post Request ? THX ! Share this post Link to post
Physicsman 26 Report post Posted May 26, 2020 Hi Cinemizer, Do you mean placing more than one entry order at a time? You can only place 1 entry order at a time, but if you are placing "Once Cancels the Other" (OCO) or If/Done orders, then more than one order is placed at the same time. However, those additional orders are conditional. Kind Regards, PM Share this post Link to post
Cinemizer 0 Report post Posted May 29, 2020 Hello, How can I calculate or get the information about, how much value has got one PIP in a market trade ? If I login by web surface to forex.com, before placing a trade I will be informed about it and also about required marge on the bottom of window. But the function POST https://ciapi.cityindex.com/TradingAPI/order/simulate/newtradeorder informs me only about margin, but not about PI value of minimum quantity. How can I get PIP value ? Share this post Link to post
Cinemizer 0 Report post Posted May 29, 2020 One more question: How can I get information by POST or GET about * my trading resource * net capital * cash of my account * of non realised P/L THX ! Share this post Link to post
Physicsman 26 Report post Posted June 1, 2020 Hi Cinemizer, In answer to your question about obtaining PIP value. This is calculated from field values obtained by making a GetMarketInformationCall. I believe you are a US client trading spot FX? The formula is then: Spot FX Market: (Quantity * (TrailingStopConversionFactor || 1) * fxConversion) / QuantityConversionFactor Kind Regards, PM Share this post Link to post
Physicsman 26 Report post Posted June 1, 2020 Hello Cinemizer, In answer to your question about obtaining account resource information. Usually, you obtain these values as live, updating numbers via the ClientAccountMargin stream. However, if you want a static snapshot of these values, you can use the GetClientAccountMargin HTTP Get call. Kind Regards, PM Share this post Link to post
Cinemizer 0 Report post Posted June 1, 2020 Hi, I am an UK trader, trading with CFD-s. Please tell me, how can I calculate PIP value of a market. THX ! Share this post Link to post
Physicsman 26 Report post Posted June 1, 2020 Hello CFDs use the same formula as spot FX so you can use the formula I provided already in my previous answer. Cordially, PM Share this post Link to post
Cinemizer 0 Report post Posted June 1, 2020 Thx, but which values are these? (Quantity * (TrailingStopConversionFactor || 1) * fxConversion) / QuantityConversionFactor In return answer: ApiMarketInformationDTO http://docs.labs.gaincapital.com/#Data Types/ApiMarketInformationDTO.htm I have found: "QuantityConversionFactor" but did not found return value as "fxConversion" and "TrailingStopConversionFactor". And waht does "|| 1" mean ? "OR" by 1 ? Please write me the right formula from return values of ApiMarketInformationDTO to calculate PIP value. By the way: In this example: http://docs.labs.gaincapital.com/#HTTP Services/GetMarketInformation.htm%3FTocPath%3DCIAPI%20Reference|HTTP%20Services|Market|_____2 GBP/USD ID will be written in the description text as: 401166448 but in the example below will be written: GET https://ciapi.cityindex.com/TradingAPI/market/401166447/information Theses are not the same market ID number. I guess, this is a failure. I do not know which ID is really the GBP/USD, but please correct the bad ID. Share this post Link to post
Physicsman 26 Report post Posted June 1, 2020 Hello, TrailingStopConversionFactor should also be returned with the MarketInformation call along with the QuantityConversionFactor (see screenshot). fxConversion is the actual conversion rate from the currency base pair you are trading to your account currency. So if you are trading GBP/USD, then USD is the pair base currency, therefore you will need to convert USD to GBP to obtain the PIP value in pounds, instead of a PIP value in USD. Example: quantity 1 CFD contract in GBP/USD is a PIP value of 1USD, which when converted back to account currency in pounds is PIP value = £0.80 approximately. Yes, (TSCF || 1) means use TSCF unless its value is null then use 1 instead. || means OR as you correctly guessed. The code examples are not meant to be used verbatim. The marketIDs differs between brands such as City Index or FOREX.com etc. The examples are just generic representations of how the code should look like approximately. When using the code, you should for example follow the instructions described in: http://docs.labs.gaincapital.com/#How Do I/Find Market ID.htm%3FTocPath%3DHow%20Do%20I...%3F|_____1 to find the correct market ID that you have access. Kind Regards, PM Share this post Link to post