Jump to content

Vincent

Members
  • Content count

    41
  • Joined

  • Last visited

  • Days Won

    6

Reputation Activity

  1. Thanks
    Vincent got a reaction from mayerspitz in NewTradeOrderRequestDTO Properties   
    Hi,
     
    There are some properties in NewTradeOrderRequestDTO I am not sure about its purpose.
     
    http://docs.labs.cityindex.com/#Data%20Types/NewTradeOrderRequestDTO.htm
     
    Those properties are:
     
    "QuoteId"
    "PositionMethodId"
     
    Thanks.
  2. Like
    Vincent got a reaction from inatadePlalse in Calculate Margin   
    Hi,
     
    Please refer to the screenshots in the attachment.
     
    The result I got from my calculation (89.4715) is different from the result I got from the Margin Calculator (58.50).
     
    Here is my cacluation
    17894.3 (Buy price) * 0.005 (Margin Factor) * 1 (Quantity) = 89.4715
     
    Am I missing something here?
     
    Thanks.
     


  3. Like
    Vincent got a reaction from inatadePlalse in Step Margin's MarginFactor   
    Hi,
     
    When clicked on market information icon, a market information data set is return to the browser.
     
    I am interested in "MarginFactor" and "Step Margin's MarginFactors" properties.
     
    I like to know when I should use "MarginFactor" ("MarginFactor": 160 as shown in the data at bottom) to calculate the margin.
     
    And when I should use "Step Margin's MarginFactors" which is depending on the trade quantity size? 
            ...
            "Bands": [
              {
                "LowerBound": 0,
                "MarginFactor": 70
              },
              {
                "LowerBound": 750,
                "MarginFactor": 150
              },
              ...
     
    Thanks.
     
     
     
    =============================================
    Data Set:
     
    {
      "MarketInformation": [
        {
          "MarketId": 400616150,
          "Name": "GBP/USD DFT",
          "ExchangeId": 56,
          "ExchangeName": "FX Dummy Exchange",
          "MarginFactor": 160,
          "MinMarginFactor": null,
          "MaxMarginFactor": null,
          "MarginFactorUnits": 27,
          "MinDistance": 1,
          "MinDistanceUnits": 27,
          "WebMinSize": 0.06560819,
          "MaxSize": 3280.4095,
          "MarketSizesCurrencyCode": "GBP",
          "MaxLongSize": 328.04095,
          "MaxShortSize": 328.04095,
          "Market24H": true,
          "PriceDecimalPlaces": 5,
          "DefaultQuoteLength": 30,
          "TradeOnWeb": true,
          "LimitUp": false,
          "LimitDown": false,
          "LongPositionOnly": false,
          "CloseOnly": false,
          "MarketEod": [],
          "PriceTolerance": 2,
          "ConvertPriceToPipsMultiplier": 10000,
          "MarketSettingsTypeId": 1,
          "MarketSettingsType": "Spread",
          "MobileShortName": "GBP/USD",
          "CentralClearingType": "No",
          "CentralClearingTypeDescription": "None",
          "MarketCurrencyId": 11,
          "PhoneMinSize": 0.5,
          "DailyFinancingAppliedAtUtc": "/Date(1430427600000)/",
          "NextMarketEodTimeUtc": "/Date(1430427600000)/",
          "TradingStartTimeUtc": null,
          "TradingEndTimeUtc": null,
          "MarketPricingTimes": [
            {
              "DayOfWeek": 1,
              "StartTimeUtc": {
                "UtcDateTime": "/Date(1430427600000)/",
                "OffsetMinutes": 600
              },
              "EndTimeUtc": null
            },
            {
              "DayOfWeek": 5,
              "StartTimeUtc": null,
              "EndTimeUtc": {
                "UtcDateTime": "/Date(1430511300000)/",
                "OffsetMinutes": -240
              }
            }
          ],
          "MarketBreakTimes": [],
          "MarketSpreads": [
            {
              "SpreadTimeUtc": "/Date(1430463600000)/",
              "Spread": 0.00015,
              "SpreadUnits": 27
            },
            {
              "SpreadTimeUtc": "/Date(1430501400000)/",
              "Spread": 0.0001,
              "SpreadUnits": 27
            }
          ],
          "GuaranteedOrderPremium": 4,
          "GuaranteedOrderPremiumUnits": 1,
          "GuaranteedOrderMinDistance": 50,
          "GuaranteedOrderMinDistanceUnits": 27,
          "PriceToleranceUnits": 0.0001,
          "MarketTimeZoneOffsetMinutes": -240,
          "QuantityConversionFactor": 1,
          "PointFactorDivisor": 100,
          "BetPer": 0.0001,
          "MarketUnderlyingTypeId": 4,
          "MarketUnderlyingType": "FX",
          "AllowGuaranteedOrders": true,
          "OrdersAwareMargining": false,
          "OrdersAwareMarginingMinimum": 50,
          "CommissionChargeMinimum": null,
          "CommissionRate": null,
          "CommissionRateUnits": null,
          "ExpiryUtc": "/Date(1640995200000)/",
          "FutureRolloverUTC": null,
          "AllowRollover": false,
          "ExpiryBasisId": 2,
          "ExpiryBasisText": "Closing price on last day of dealing",
          "StepMargin": {
            "EligibleForStepMargin": true,
            "StepMarginConfigured": true,
            "InheritedFromParentAccountOperator": true,
            "Bands": [
              {
                "LowerBound": 0,
                "MarginFactor": 70
              },
              {
                "LowerBound": 750,
                "MarginFactor": 150
              },
              {
                "LowerBound": 1400,
                "MarginFactor": 220
              },
              {
                "LowerBound": 2300,
                "MarginFactor": 300
              },
              {
                "LowerBound": 3000,
                "MarginFactor": 450
              }
            ]
          },
          "OptionTypeId": null,
          "OptionType": null,
          "StrikePrice": null,
          "MarketTypeId": 2,
          "MarketType": "Ordinary Market",
          "Weighting": 300,
          "FxFinancing": {
            "CaptureDateTime": "/Date(1430514000000)/",
            "LongPoints": 0.3,
            "ShortPoints": -0.52,
            "LongCharge": -0.2,
            "ShortCharge": -0.34,
            "Quantity": 1,
            "ChargeCurrencyId": 6,
            "DaysToRoll": 1
          },
          "UnderlyingRicCode": "43",
          "NewsUnderlyingOverrideType": "NamedItem",
          "NewsUnderlyingOverrideCode": "GBP/"
        }
      ]
    }

  4. Like
    Vincent got a reaction from inatadePlalse in session token expired   
    Hi,
     
    In this page:
    http://docs.labs.cityindex.com/#API%20Intro.htm%3FTocPath%3DGetting%2520Started|_____1
     
    It mentions that "...This session token is guaranteed to be valid for at least 20 minutes." in "Authentication" topic.
     
    I know how to detect session expiry during web service call (HTTP Services).
     
    But I am not sure what happen and how do to handle it when session expired during price streaming (Streaming Data).
     
    Thanks.
  5. Like
    Vincent got a reaction from inatadePlalse in What is GTS back-end   
    Hi,
     
    The term "GTS" back-end is mentioned in API doc couple of times.
     
    http://docs.labs.cityindex.com/#Streaming%20Data/TradingAccountMargin.htm%3FTocPath%3DCIAPI%2520Reference|Streaming%2520Data|_____8
     
    http://docs.labs.cityindex.com/#HTTP%20Services/SearchWithTags.htm%3FTocPath%3DCIAPI%2520Reference|HTTP%2520Services|Market|_____6
     
    What is it?
     
    Thanks.
  6. Like
    Vincent got a reaction from inatadePlalse in pip movement   
    Hi,
     
    Please refer to this DTO: ApiMarketInformationDTO
    http://docs.labs.cityindex.com/#Data%20Types/ApiMarketInformationDTO.htm
     
    What is BetPer? Is it pip movement?
     
    For example:
     
    UK 100 The Price Stream shows that the price over a period has moved from 5678.5 to 5678.7 showing an increase of +0.2 If a user is long (betting up) @ £1/point - what does the point movement here represent? Tenths (£1 every 0.1 price movement) or units (£1 every 1.0 price movement?  
    If not, could you tell me where can I locate such information.
     
    Thanks.
  7. Like
    Vincent got a reaction from inatadePlalse in Minimum Initial Margin and Maximum Initial Margin   
    Hi,
     
    Where can I obtain the information relate to Minimum Initial Margin and Maximum Initial Margin in ApiMarketInformationDTO?
    http://docs.labs.cityindex.com/#Data%20Types/ApiMarketInformationDTO.htm
     
    Thanks.
  8. Like
    Vincent got a reaction from inatadePlalse in Live Account and Demo Account   
    Hi,
     
    Is there a way to find our if an user account is a live account or a demo account through API?
     
    http://docs.labs.cityindex.com/#HTTP%20Services/LogOn.htm%3FTocPath%3DCIAPI%2520Reference|HTTP%2520Services|Authentication|_____3
     
    Thanks.
  9. Like
    Vincent got a reaction from inatadePlalse in PriceDTO StatusSummary   
    Hi,
     
    In PriceDTO, there is a StatusSummary property.
    http://docs.labs.cityindex.com/#Data%20Types/PriceDTO.htm
     
    It has five status:
    0 = Normal 1 = Indicative 2 = PhoneOnly 3 = Suspended 4 = Closed
     
    I am guessing that
    in status "Normal", User is allow to open trade or order.
    in status "PhoneOnly", User is not allow to open trade or order.
    in status "Closed", User is allow to open order and not allow to open trade.
     
    Please correct me if I am wrong.
     
    I am not sure what happen when it is "Indicative" or "Suspended".
     
    And in API Doc (http://docs.labs.cityindex.com/#Misc.htm%3FTocPath%3DGetting%2520Started|_____12), it mentions that we need to convert the decimal to a bitwise hexadecimal number. Do we still need to do that?
     
    Thanks.
  10. Like
    Vincent got a reaction from inatadePlalse in SimulateTrade   
    Hi,
     
    I am not sure why we need this function : place a "SimulateTrade"
     
    http://docs.labs.cityindex.com/#HTTP%20Services/SimulateTrade.htm%3FTocPath%3DCIAPI%2520Reference|HTTP%2520Services|Trades%2520and%2520Orders|_____11
     
    When will we need to use it?
     
    Thanks.
  11. Like
    Vincent got a reaction from inatadePlalse in Open a position with a stop   
    Hi,
     
    I am able to place a trade without setting a stop or limit.
     
    But when I add a stop to the request, error start to appear. I am not sure what is the correct way of setting up a stop.
     
    My request and the response I received are down below:
     
    Request:
    {
      "MarketId": 400616114,
      "Currency": "GBP",
      "AutoRollover": false,
      "Direction": "buy",
      "Quantity": 1,
      "QuoteId": null,
      "PositionMethodId": null,
      "BidPrice": 17842,
      "OfferPrice": 17846,
      "AuditId": "sbINXProd_NON_FX25652",
      "TradingAccountId": 400448826,
      "IfDone": [
        {
          "Stop": {
            "Guaranteed": false,
            "TriggerPrice": 17500,
            "ExpiryDateTimeUTC": null,
            "Applicability": null,
            "ParentOrderId": null,
            "OrderId": 0,
            "AutoRollover": false,
            "MarketId": 0,
            "Direction": null,
            "Quantity": 0,
            "Price": null,
            "TradingAccountId": 0,
            "CurrencyId": 0,
            "StatusId": 0,
            "TypeId": 0,
            "IfDone": null,
            "OcoOrder": null
          },
          "Limit": null
        }
      ],
      "Close": null
    }
     
     
    Response:
    {"HttpStatus":400,"ErrorMessage":"The direction of the request is invalid.","ErrorCode":60107}
     
    Thanks.
     
×