kensplanet 0 Report post Posted February 1 Is there any simple API call where I just provide the market name to know if that market is closed? Share this post Link to post
Physicsman 25 Report post Posted February 2 Hi Ken, If you are subscribed to the live prices stream there is a field within the stream called StatusSummary. It indicates the current state of the market. Values are: 0 = Normal 1 = Indicative 2 = PhoneOnly 3 = Suspended 4 = Closed The only other alternative is to make a REST GetMarketInformation call that provides the market trading and break times. This will alow you to work out when a market is open or closed. Kind Regards, PM Share this post Link to post
kensplanet 0 Report post Posted February 4 Thank you. I'll try the REST GetMarketInformation call approach. Share this post Link to post
SupereeDuperee 6 Report post Posted Tuesday at 10:24 PM On 2/2/2021 at 9:21 AM, Physicsman said: Hi Ken, If you are subscribed to the live prices stream there is a field within the stream called StatusSummary. It indicates the current state of the market. Values are: 0 = Normal 1 = Indicative 2 = PhoneOnly 3 = Suspended 4 = Closed The only other alternative is to make a REST GetMarketInformation call that provides the market trading and break times. This will alow you to work out when a market is open or closed. Kind Regards, PM I submitted a GET for GBP/USD, response is = { "MarketInformation": { "MarketId": 401166448, "Name": "GBP/USD", "ExchangeId": 400000032, "ExchangeName": "FX (IFX) Retail Exchange", "MarginFactor": 2.0, "MinMarginFactor": null, "MaxMarginFactor": null, "ClientMarginFactor": 2.0, "MarginFactorUnits": 26, "MinDistance": 0.00001, "MinDistanceUnits": 27, "WebMinSize": 1000.0, "MaxSize": 50000000.0, "MarketSizesCurrencyCode": "USD", "MaxLongSize": 5000001.0, "MaxShortSize": 5000001.0, "Market24H": true, "PriceDecimalPlaces": 5, "DefaultQuoteLength": 5, "TradeOnWeb": true, "LimitUp": false, "LimitDown": false, "LongPositionOnly": false, "CloseOnly": false, "MarketEod": [], "PriceTolerance": 2.0, "ConvertPriceToPipsMultiplier": 10000, "MarketSettingsTypeId": 2, "MarketSettingsType": "CFD", "MobileShortName": "GBP/USD", "CentralClearingType": "No", "CentralClearingTypeDescription": "None", "MarketCurrencyId": 11, "PhoneMinSize": 5000.0, "DailyFinancingAppliedAtUtc": "/Date(1614117600000)/", "NextMarketEodTimeUtc": "/Date(1614117600000)/", "TradingStartTimeUtc": null, "TradingEndTimeUtc": null, "MarketPricingTimes": [ { "DayOfWeek": 5, "StartTimeUtc": null, "EndTimeUtc": { "UtcDateTime": "/Date(1614117600000)/", "OffsetMinutes": -300 } }, { "DayOfWeek": 0, "StartTimeUtc": { "UtcDateTime": "/Date(1614117600000)/", "OffsetMinutes": -300 }, "EndTimeUtc": null } ], "MarketBreakTimes": [], "MarketSpreads": [ { "SpreadTimeUtc": null, "Spread": 0.0001, "SpreadUnits": 27 } ], "GuaranteedOrderPremium": 10.0, "GuaranteedOrderPremiumUnits": 1, "GuaranteedOrderMinDistance": 50.0, "GuaranteedOrderMinDistanceUnits": 27, "PriceToleranceUnits": 0.0001, "MarketTimeZoneOffsetMinutes": -300, "QuantityConversionFactor": 1.0, "PointFactorDivisor": 100, "BetPer": 1.0, "MarketUnderlyingTypeId": 4, "MarketUnderlyingType": "FX", "AllowGuaranteedOrders": false, "OrdersAwareMargining": false, "OrdersAwareMarginingMinimum": null, "CommissionChargeMinimum": null, "CommissionRate": null, "CommissionRateUnits": null, "ExpiryUtc": null, "FutureRolloverUTC": null, "AllowRollover": false, "ExpiryBasisId": 1, "ExpiryBasisText": "", "StepMargin": { "EligibleForStepMargin": true, "StepMarginConfigured": true, "InheritedFromParentAccountOperator": true, "Bands": [ { "LowerBound": 0.0, "MarginFactor": 5.0 }, { "LowerBound": 7200000.0, "MarginFactor": 5.0 }, { "LowerBound": 14000000.0, "MarginFactor": 5.0 }, { "LowerBound": 21000000.0, "MarginFactor": 5.0 }, { "LowerBound": 54000000.0, "MarginFactor": 20.0 } ] }, "OptionTypeId": null, "OptionType": null, "StrikePrice": null, "MarketTypeId": 2, "MarketType": "Ordinary Market", "Weighting": 628, "FxFinancing": { "CaptureDateTime": "/Date(1614204000000)/", "PreviousCaptureDateTime": "/Date(1614117600000)/", "LongPoints": 0.15, "ShortPoints": -0.03, "LongCharge": -1.23, "PreviousLongCharge": -0.41, "ShortCharge": -0.99, "PreviousShortCharge": -0.33, "Quantity": 10000.0, "ChargeCurrencyId": 11, "DaysToRoll": 3, "PreviousDaysToRoll": 1 }, "UnderlyingRicCode": "GBPUSD", "NewsUnderlyingOverrideType": "NamedItem", "NewsUnderlyingOverrideCode": "GBP/", "TrailingStopConversionFactor": 0.0001, "IsKnockout": false, "Knockout": null } } Which value gives me the Weekly Market Close and Open day/times? Thank you. @Physicsman Share this post Link to post
Physicsman 25 Report post Posted Wednesday at 03:43 PM Hi Superee, It is the MarketPrcingTimes fields. Since these are Forex 24H trading markets, we've been using a shortcut internally and that is probably what is causing you confusion. DayofWeek 0 is Sunday and DayofWeek 5 is Friday. Since we know that FX markets open on Sunday and close on Friday, we just take the current week's Sunday and Friday dates. The actual Date returned in the field is just today's date and close time of 22:00 hours. We're ignoring the date and appending the 22:00 hours close/open times to the Sunday Start and Friday End dates to get each weeks open/close. Kind Regards, PM 1 SupereeDuperee reacted to this Share this post Link to post