diff --git a/chart-data/json-schema/src/main/resources/HistoricCandleRequest.json b/chart-data/json-schema/src/main/resources/HistoricCandleRequest.json index d9c0d75..df5a00f 100644 --- a/chart-data/json-schema/src/main/resources/HistoricCandleRequest.json +++ b/chart-data/json-schema/src/main/resources/HistoricCandleRequest.json @@ -13,10 +13,12 @@ "type" : "string" }, "ReqID" : { - "type" : "string" + "type" : "string", + "required": true }, "Symbol" : { - "type" : "string" + "type" : "string", + "required": true }, "SecurityID": { "type": "string", @@ -27,15 +29,18 @@ "required": true }, "Interval" : { - "$ref" : "./Interval.json" + "$ref" : "./Interval.json", + "required": true }, "StartDate" : { "type" : "string", - "format" : "date-time" + "format" : "date-time", + "required": true }, "EndDate" : { "type" : "string", - "format" : "date-time" + "format" : "date-time", + "required": true }, "SendingTime" : { "type" : "string" diff --git a/ig-us-rfed/document/document-websocket/markdown/websocketAPI.md b/ig-us-rfed/document/document-websocket/markdown/websocketAPI.md index a30364f..3dac61c 100644 --- a/ig-us-rfed/document/document-websocket/markdown/websocketAPI.md +++ b/ig-us-rfed/document/document-websocket/markdown/websocketAPI.md @@ -1,51 +1,64 @@ # Web Socket API FIX/JSON + ## Introduction -This document specifies the Rules of Engagement for parties connecting to IG Group for the purpose of electronic trading/market data using the WebSocket APIs. +This document specifies the Rules of Engagement for parties connecting to IG Group for the purpose of electronic +trading/market data using the WebSocket APIs. This document also applies to the HistoricPrice Websocket API. -IG Group's WebSocket PreTrade, Trade and PostTrade APIs offer a subset of the Application Messages and fields specified by the FIX protocol. -These messages are based on the Application Messages specified by the FIX protocol version 5.0 SP2. They implemented using a FIX/JSON Encoding. +IG Group's WebSocket PreTrade, Trade and PostTrade APIs offer a subset of the Application Messages and fields specified +by the FIX protocol. +These messages are based on the Application Messages specified by the FIX protocol version 5.0 SP2. They implemented +using a FIX/JSON Encoding. Fields and Messages supported by the implementation are documented. Messages that are not supported are rejected. The HistoricPrice WebSocket API is not based on FIX Protocol Application Messages. -These WebSocket APIs also employ the Point-to-Point Session Protocol defined by the emerging [FIX Performance Session Layer](https://github.com/FIXTradingCommunity/fixp-specification) (FIXP). -The use of this protocol provides Session Negotiation including authentication, Session Establishment and Heartbeats. Please refer to the FIXP notes on the Point-to-Point protocol and WebSocket usage. +These WebSocket APIs also employ the Point-to-Point Session Protocol defined by the +emerging [FIX Performance Session Layer](https://github.com/FIXTradingCommunity/fixp-specification) (FIXP). +The use of this protocol provides Session Negotiation including authentication, Session Establishment and Heartbeats. +Please refer to the FIXP notes on the Point-to-Point protocol and WebSocket usage. The FIXP Flow Type supported by this implementation is "Unsequenced". The WebSocket subprotocol is text. -Messages must conform to the JSON schema generated by the [ig-orchestrations json schema](https://github.com/IG-Group/ig-orchestrations/tree/master/ig-us-rfed/json-schema). +Messages must conform to the JSON schema generated by +the [ig-orchestrations json schema](https://github.com/IG-Group/ig-orchestrations/tree/master/ig-us-rfed/json-schema). -[Java message bindings](https://github.com/IG-Group/ig-orchestrations/tree/master/ig-us-rfed/java-binding) and [HTML documents]() are also generated. +[Java message bindings](https://github.com/IG-Group/ig-orchestrations/tree/master/ig-us-rfed/java-binding) +and [HTML documents]() are also generated. -N.B. The FIX APIs are derived from a new FIX Trading Community project called [FIX Orchestra](https://www.fixtrading.org/standards/fix-orchestra/). Implementations of FIX Orchestra are called "orchestrations". This orchestration is published [here]. +N.B. The FIX APIs are derived from a new FIX Trading Community project +called [FIX Orchestra](https://www.fixtrading.org/standards/fix-orchestra/). Implementations of FIX Orchestra are +called "orchestrations". This orchestration is published [here]. Example code will be provided. ## Scope -This document addresses the Rules of Engagement that are mainly concerned with technical aspects of the integration. Specialisations and exceptions to the conventional FIX standards are defined here +This document addresses the Rules of Engagement that are mainly concerned with technical aspects of the integration. +Specialisations and exceptions to the conventional FIX standards are defined here The messages are closely related to IG's conventional FIX API that uses the FIXT 1.1 Session protocol. ## Intended Audience -This document is for those involved in integration, conformance testing and other aspects of implementing connectivity to IG Group. +This document is for those involved in integration, conformance testing and other aspects of implementing connectivity +to IG Group. ## Contacts and Support Information For queries about accounts, orders or positions please contact Trading Services. Contact Phone Numbers -* +1 312 981 0498 -|Department|Contact Email / Twitter| -|---|---| -|HelpDesk|| -|FIX Technical Support (Live environment only)|FIXSupport@ig.com| -|FIX Development and Support during on-boarding|FIXDevelopment@ig.com| +* +1 312 981 0498 + +| Department | Contact Email / Twitter | +|-------------------------------------------------|--------------------------------------------------------------------| +| HelpDesk | | +| FIX Technical Support (Live environment only) | FIXSupport@ig.com | +| FIX Development and Support during on-boarding | FIXDevelopment@ig.com | ## Related Documents @@ -56,26 +69,27 @@ http://fiximate.fixtrading.org/ [FIX Performanance Session Layer](https://github.com/FIXTradingCommunity/fixp-specification) - ## Authentication -OAuth 2 is used for the initial HTTP request and the OAUTH token must be used in the Credentials section of FIXP Initiate Session Negotiation message when the WebSocket session is created. + +OAuth 2 is used for the initial HTTP request and the OAUTH token must be used in the Credentials section of FIXP +Initiate Session Negotiation message when the WebSocket session is created. ## Standard Request Header -|Field Name|Required?|Comments| -|--- |---|---| -|MsgType |Y |Defines the message type| -|ApplVerID|N|Specifies the service pack release being applied at message level. Enumerated field with values assigned at time of service pack release| -|CstmApplVerID|N| Specifies a custom extension to a message being applied at the message level. Enumerated field| -|SendingTime |Y|Time request is sent| +| Field Name | Required? | Comments | +|---------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------| +| MsgType | Y | Defines the message type | +| ApplVerID | N | Specifies the service pack release being applied at message level. Enumerated field with values assigned at time of service pack release | +| CstmApplVerID | N | Specifies a custom extension to a message being applied at the message level. Enumerated field | +| SendingTime | Y | Time request is sent | ```json { - "MsgType": "NewOrderSingle", - "ApplVerID":"FIX50SP2", - "CstmApplVerID": "IGUS/Trade/V1", - "SendingTime": "2019-08-02T21:14:38.717", - ... + "MsgType": "NewOrderSingle", + "ApplVerID": "FIX50SP2", + "CstmApplVerID": "IGUS/Trade/V1", + "SendingTime": "2019-08-02T21:14:38.717", + ... } ``` @@ -90,17 +104,21 @@ The APIs are logically organised into: ## Document Conventions for FIX Protocol Messages -For the documents based on the FIX Protocol Messages the Application Messages are defined along with their Fields and Components and Repeating Groups. +For the documents based on the FIX Protocol Messages the Application Messages are defined along with their Fields and +Components and Repeating Groups. Components are groups of fields that may be common to more than one message. Components may contain Repeating Groups. -In the JSON representation of the messages Components are denormalised. They are not represented by distinct structures in the message and their fields are simply inline in the JSON message. +In the JSON representation of the messages Components are denormalised. They are not represented by distinct structures +in the message and their fields are simply inline in the JSON message. -Fields, Components and Repeating Groups that are common to more than one API are documented here. Otherwise they are documented in the respective API documents. +Fields, Components and Repeating Groups that are common to more than one API are documented here. Otherwise they are +documented in the respective API documents. The "Required?" column describes whether a field must be present on the message. ## Fields and Constraints + ### Symbol Symbol is used as a displayable identifies for the security. @@ -111,114 +129,125 @@ IG supports a unique identity for each instrument. The Symbol uniquely identifies an instrument at a given point in time. -In some cases, such as for futures, the Symbol can be "reused" once the instrument has expired or been otherwise terminated. The effect of instrument lifecycle is discussed in the PreTrade section of the API. +In some cases, such as for futures, the Symbol can be "reused" once the instrument has expired or been otherwise +terminated. The effect of instrument lifecycle is discussed in the PreTrade section of the API. This does not happen routinely for Spot instruments. -|Field|Description| -|---|---| -|SecurityID|Required by IG, Marketplace Assigned Identifier for the security as provided by IG| -|SecurityIDSource|Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier".| - +| Field | Description | +|------------------|------------------------------------------------------------------------------------------------------| +| SecurityID | Required by IG, Marketplace Assigned Identifier for the security as provided by IG | +| SecurityIDSource | Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier". | ### Currency -Although the FIX specification does not require that currency be set, IG Group does require that currency be set (on trading messages) to avoid any ambiguity. + +Although the FIX specification does not require that currency be set, IG Group does require that currency be set (on +trading messages) to avoid any ambiguity. Currency will be regarded as case sensitive. The currency supplied will be checked against the instrument to ensure a valid match. -As defined in the FIX Specification (Volume 6, Appendix A) the Currency Codes are ISO 4217 codes. +As defined in the FIX Specification (Volume 6, Appendix A) the Currency Codes are ISO 4217 codes. -Prices must be expressed in the units defined by the currency code. If quotes are traditionally expressed in multiples or fractions of the currency the price amounts must be normalised to be represented in the currency amount. As an example UK securities quoted in pence must be represented in pounds in FIX messages. +Prices must be expressed in the units defined by the currency code. If quotes are traditionally expressed in multiples +or fractions of the currency the price amounts must be normalised to be represented in the currency amount. As an +example UK securities quoted in pence must be represented in pounds in FIX messages. IG Group supports trading in a restricted set of currencies. -Valid values depend on the individual instrument and are specified in the Security Definition and Security List messages described in the FIX OTC Market Data Rules of Engagement document. +Valid values depend on the individual instrument and are specified in the Security Definition and Security List messages +described in the FIX OTC Market Data Rules of Engagement document. + +### Quantities -### Quantities OrderQty, LongQty and ShortQty decimal values are supported to a maximum of 2 decimal places. ## Components ### Instrument -|Field/Component Name|Required?|Comments| -|---|---|---| -|Symbol|N|Common, "human understood" representation of the security. This is provided by IG for display purposes and is not evaluated on messages received by IG. Use SecurityID, SecurityIDSource as follows. | -|SecurityID|Y|Required by IG, Marketplace Assigned Identifier for the security as provided by IG| -|SecurityIDSource|Y|Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier".| -|SecAltIDGrp|N|Security Alt ID Group. Alternate identifiers for the Security.| -|CFICode|N|Represents the Option Type.| -|SecurityGroup|N|IG-specific name assigned to a group of related securities.| -|MaturityMonthYear|C|Month and Year of Maturity. Conditionally required by IG for dated instruments. If MaturityMonthYear is specified in the Instrument Component of SecurityDefinition/Security List messages then it must be also be included in the Instrument Component of Order Messages | -|MaturityDate|N|Specifies the full date of maturity. This field may be included by IG for information only and will not be evaluated on incoming orders.| -|StrikePrice|N|Specifies the Strike Price| -|ContractMultiplier|N|Specifies the ratio or multiply factor to convert from "nominal" units (e.g. contracts) to total units (e.g. shares) (e.g. 1.0, 100.0, 1000.0, etc).| -|SecurityDesc|N|Provides an optional textual description for a financial instrument.| +| Field/Component Name | Required? | Comments | +|----------------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Symbol | N | Common, "human understood" representation of the security. This is provided by IG for display purposes and is not evaluated on messages received by IG. Use SecurityID, SecurityIDSource as follows. | +| SecurityID | Y | Required by IG, Marketplace Assigned Identifier for the security as provided by IG | +| SecurityIDSource | Y | Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier". | +| SecAltIDGrp | N | Security Alt ID Group. Alternate identifiers for the Security. | +| CFICode | N | Represents the Option Type. | +| SecurityGroup | N | IG-specific name assigned to a group of related securities. | +| MaturityMonthYear | C | Month and Year of Maturity. Conditionally required by IG for dated instruments. If MaturityMonthYear is specified in the Instrument Component of SecurityDefinition/Security List messages then it must be also be included in the Instrument Component of Order Messages | +| MaturityDate | N | Specifies the full date of maturity. This field may be included by IG for information only and will not be evaluated on incoming orders. | +| StrikePrice | N | Specifies the Strike Price | +| ContractMultiplier | N | Specifies the ratio or multiply factor to convert from "nominal" units (e.g. contracts) to total units (e.g. shares) (e.g. 1.0, 100.0, 1000.0, etc). | +| SecurityDesc | N | Provides an optional textual description for a financial instrument. | ### Instrument Extension -|Field/Component Name|Required?|Comments| -|---|---|---| -|AttrbGrp|N|Attribute Repeating Group| + +| Field/Component Name | Required? | Comments | +|----------------------|-----------|---------------------------| +| AttrbGrp | N | Attribute Repeating Group | ### Underlying Instrument -|Field/Component Name|Required?|Comments| -|---|---|---| -|UnderlyingSymbol|N|Common, "human understood" representation of the security. Present if the Component is present.| -|UnderlyingSecurityID|N|Identifier for the security. | -|UnderlyingSecurityIDSource|C|Identifies class or source of the SecurityID value. Required if UnderlyingSecurityID is specified.| -|UndSecAltIDGrp|N|Alternate identifiers for the Security.| -|UnderlyingCurrency|N|ISO Currency Code| +| Field/Component Name | Required? | Comments | +|----------------------------|-----------|----------------------------------------------------------------------------------------------------| +| UnderlyingSymbol | N | Common, "human understood" representation of the security. Present if the Component is present. | +| UnderlyingSecurityID | N | Identifier for the security. | +| UnderlyingSecurityIDSource | C | Identifies class or source of the SecurityID value. Required if UnderlyingSecurityID is specified. | +| UndSecAltIDGrp | N | Alternate identifiers for the Security. | +| UnderlyingCurrency | N | ISO Currency Code | ## Repeating Groups ### SecurityAltID Repeating Group (SecAltIDGrp) -|Field/Component Name|Required?|Comments| -|---|---|---| -|SecurityAltID|C|Required if the Group is present. Alternate Security Identifier| -|SecurityAltIDSource|C|Required if the Group is present. Alternate Security Identifier Source| + +| Field/Component Name | Required? | Comments | +|----------------------|-----------|------------------------------------------------------------------------| +| SecurityAltID | C | Required if the Group is present. Alternate Security Identifier | +| SecurityAltIDSource | C | Required if the Group is present. Alternate Security Identifier Source | ### Underlying Security AltID Repeating Group (UndSecAltIDGrp) -|Field/Component Name|Required?|Comments| -|---|---|---| -|UnderlyingSecurityAltID|C|Required if the Group is present. Alternate Security Identifier.| -|UnderlyingSecurityAltIDSource|C|Required if the Group is present. Alternate Security Identifier Source| +| Field/Component Name | Required? | Comments | +|-------------------------------|-----------|------------------------------------------------------------------------| +| UnderlyingSecurityAltID | C | Required if the Group is present. Alternate Security Identifier. | +| UnderlyingSecurityAltIDSource | C | Required if the Group is present. Alternate Security Identifier Source | ### Attribute Repeating Group (AttrbGrp) This group will be used to communicate additional attributes for the instrument definition. For this purpose, IG has defined additional InstrAttribTypes : -|InstrAttribType|Description|IG Customisation?| -|---|--|--| -|"InstrumentPricePrecision"|The arithmetic precision of the price, i.e the number of digits following the decimal point.|N| -|"DealableCurrencies"|Used to provide a comma separated list of the dealable currencies for an instrument|Y| -|"MarketOrdersSupported"|Used to indicate whether the instrument supports market orders. InstrAttribValue will be ‘Y’ if market orders are supported.|Y| -|"MarketDataSupported"|Used to indicate whether the instrument supports requests for market data. InstrAttribValue will be ‘N’ if market data is not supported|Y| - -|Field/Component Name|Required?|Comments| -|---|---|---| -|InstrAttrType|C|Required if the Group is present. Type of instrument attribute| -|InstrAttrValue|C|Required if the Group is present. Value of instrument attribute, if applicable| +| InstrAttribType | Description | IG Customisation? | +|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|-------------------| +| "InstrumentPricePrecision" | The arithmetic precision of the price, i.e the number of digits following the decimal point. | N | +| "DealableCurrencies" | Used to provide a comma separated list of the dealable currencies for an instrument | Y | +| "MarketOrdersSupported" | Used to indicate whether the instrument supports market orders. InstrAttribValue will be ‘Y’ if market orders are supported. | Y | +| "MarketDataSupported" | Used to indicate whether the instrument supports requests for market data. InstrAttribValue will be ‘N’ if market data is not supported | Y | +| Field/Component Name | Required? | Comments | +|----------------------|-----------|--------------------------------------------------------------------------------| +| InstrAttrType | C | Required if the Group is present. Type of instrument attribute | +| InstrAttrValue | C | Required if the Group is present. Value of instrument attribute, if applicable | ## DateTime Formats + The Websocket API supports the following datetime formats: ### Time -|Format|Example| -|---|---| -|yyyy-MM-dd'T'HH:mm:ss.SSSX|2023-01-10T12:00:00.000+0000| -|yyyy-MM-dd'T'HH:mm:ss.SSS|2023-01-10T12:00:00.000| -|EEE, dd MMM yyyy HH:mm:ss zzz|Tue, 10 Jan 2023 12:00:00 +01:00| + +| Format | Example | +|-------------------------------|-------------------------------| +| yyyy-MM-dd'T'HH:mm:ss.SSSX | 2023-01-10T12:00:00.000+00:00 | +| yyyy-MM-dd'T'HH:mm:ss.SSS | 2023-01-10T12:00:00.000 | +| EEE, dd MMM yyyy HH:mm:ss zzz | Tue, 10 Jan 2023 12:00:00 GMT | ### Date -|Format|Example| -|---|---| -|yyyy-MM-dd|2023-01-10| + +| Format | Example | +|------------|------------| +| yyyy-MM-dd | 2023-01-10 | ### BusinessRejectMessage + In the event of an invalid date time value or message, a business message reject will be sent. ```json diff --git a/ig-us-rfed/document/document-websocket/markdown/websocketHistoricPriceAPI.md b/ig-us-rfed/document/document-websocket/markdown/websocketHistoricPriceAPI.md index 3777bc2..4d6170c 100644 --- a/ig-us-rfed/document/document-websocket/markdown/websocketHistoricPriceAPI.md +++ b/ig-us-rfed/document/document-websocket/markdown/websocketHistoricPriceAPI.md @@ -1,4 +1,5 @@ # Chart Data Web Socket API FIX/JSON + ## Introduction This document specifies the Rules of Engagement the Historic Price API. @@ -10,62 +11,66 @@ See also [ WebSocket API ](websocketAPI.md) ## WebSocket URL ### Demo + wss://demo-iguspretrade.ig.com/pretrade ### Production + wss://iguspretrade.ig.com/pretrade ## Components + ### CandleData -|Field/Component Name|Required?|Comments| -|---|---|---| -|StartDate|y|Start Date of the reported interval. In format yyyy-MM-dd'T'HH:mm:ss.SSS in UTC timezone| -|EndDate|c|End Date of the reported interval, present on Historic Candles. In format yyyy-MM-dd'T'HH:mm:ss.SSS in UTC timezone| -|First|y|First Price in the reported interval| -|Last|y|Last Price in the reported interval| -|High|y|Highest Price in the reported interval| -|Low|y|Lowest Price in the reported interval| +| Field/Component Name | Required? | Comments | +|----------------------|-----------|----------------------------------------------------------------------------------------------------------------------| +| StartDate | y | Start Date of the reported interval. In format yyyy-MM-dd'T'HH:mm:ss.SSSX in UTC timezone | +| EndDate | c | End Date of the reported interval, present on Historic Candles. In format yyyy-MM-dd'T'HH:mm:ss.SSSX in UTC timezone | +| First | y | First Price in the reported interval | +| Last | y | Last Price in the reported interval | +| High | y | Highest Price in the reported interval | +| Low | y | Lowest Price in the reported interval | ## Application Messages ### Chart Data Subscription Request -|Field/Component Name|Required?|Comments| -|---|---|---| -|Standard Header|Y|MsgType "ChartDataSubscriptionRequest"| -|ReqID|y|Unique ID for the request| -|SecurityID|y|Required by IG, Marketplace Assigned Identifier for the security as provided by IG| -|SecurityIDSource|y|Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier".| -|Interval|y|The requested interval for the candle data. Valid intervals are: | +| Field/Component Name | Required? | Comments | +|----------------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------| +| Standard Header | Y | MsgType "ChartDataSubscriptionRequest" | +| ReqID | y | Unique ID for the request | +| SecurityID | y | Required by IG, Marketplace Assigned Identifier for the security as provided by IG | +| SecurityIDSource | y | Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier". | +| Interval | y | The requested interval for the candle data. Valid intervals are: | Example Message + ```json { - "MsgType":"ChartDataSubscriptionRequest", - "ApplVerID":"FIX50SP2", - "CstmApplVerID":"IGUS/PreTrade/V1", - "SendingTime":"2021-08-09T17:26:57.042", - "ReqID":"2", - "SubscriptionRequestType":"SnapshotAndUpdates", - "SecurityID":"CS.D.GBPUSD.CZD.IP", - "SecurityIDSource":"MarketplaceAssignedIdentifier", - "Interval":"FIVE_MIN" + "MsgType": "ChartDataSubscriptionRequest", + "ApplVerID": "FIX50SP2", + "CstmApplVerID": "IGUS/PreTrade/V1", + "SendingTime": "2021-08-09T17:26:57.042", + "ReqID": "2", + "SubscriptionRequestType": "SnapshotAndUpdates", + "SecurityID": "CS.D.GBPUSD.CZD.IP", + "SecurityIDSource": "MarketplaceAssignedIdentifier", + "Interval": "FIVE_MIN" } ``` - ### Chart Data Subscription Response -|Field/Component Name|Required?|Comments| -|---|---|---| -|Standard Header|Y|MsgType "ChartDataSubscriptionResponse"| -|ReqID|y|Unique ID corresponding to the request| -|SubscriptionRequestType|Y|Expect | -|Interval|y|The interval for the candle data. Valid intervals are: | -|CandleData|y|The Chart Data| +| Field/Component Name | Required? | Comments | +|-------------------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| Standard Header | Y | MsgType "ChartDataSubscriptionResponse" | +| ReqID | y | Unique ID corresponding to the request | +| SubscriptionRequestType | Y | Expect | +| Interval | y | The interval for the candle data. Valid intervals are: | +| CandleData | y | The Chart Data | Example Message + ```json { "MsgType": "ChartDataSubscriptionResponse", @@ -74,7 +79,7 @@ Example Message "ReqID": "2", "Interval": "FIVE_MIN", "CandleData": { - "StartDate": "2021-08-09T18:25:00.000", + "StartDate": "2021-08-09T18:25:00.000+00:00", "First": { "Bid": 1.3847, "Offer": 1.3848 @@ -97,37 +102,37 @@ Example Message ### Chart Data Request Reject -|Field/Component Name|Required?|Comments| -|---|---|---| -|Standard Header|Y|MsgType "ChartDataRequestReject"| -|ReqID|y|Unique ID corresponding to the request| -|SecurityID|y|Required by IG, Marketplace Assigned Identifier for the security as provided by IG| -|SecurityIDSource|y|Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier".| -|ChartRequestRejectReason|y|The reject reason| +| Field/Component Name | Required? | Comments | +|--------------------------|-----------|------------------------------------------------------------------------------------------------------| +| Standard Header | Y | MsgType "ChartDataRequestReject" | +| ReqID | y | Unique ID corresponding to the request | +| SecurityID | y | Required by IG, Marketplace Assigned Identifier for the security as provided by IG | +| SecurityIDSource | y | Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier". | +| ChartRequestRejectReason | y | The reject reason | ### ChartRequestRejectReason -|Value| -|---| -|UnknownSymbol| -|RequestExceedsLimit| -|TooLateToEnter| -|NotAuthorizedToRequestData| -|DuplicateRequest| -|UnsupportedSubscriptionRequestType| -|Other| +| Value | +|------------------------------------| +| UnknownSymbol | +| RequestExceedsLimit | +| TooLateToEnter | +| NotAuthorizedToRequestData | +| DuplicateRequest | +| UnsupportedSubscriptionRequestType | +| Other | ### Historic Price Candle Request -|Field/Component Name|Required?|Comments| -|---|---|---| -|Standard Header|Y|MsgType "HistoricCandleRequest"| -|ReqID|y|Unique ID for the request| -|SecurityID|y|Required by IG, Marketplace Assigned Identifier for the security as provided by IG| -|SecurityIDSource|y|Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier".| -|Interval|y|The requested interval for the candle data. Valid intervals are: | -|StartDate|y|The start date of the interval. Must be in format yyyy-MM-dd'T'HH:mm:ss.SSS in UTC timezone| -|EndDate|y|The end date of the interval. Must be in format yyyy-MM-dd'T'HH:mm:ss.SSS in UTC timezone| +| Field/Component Name | Required? | Comments | +|----------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Standard Header | Y | MsgType "HistoricCandleRequest" | +| ReqID | y | Unique ID for the request | +| SecurityID | y | Required by IG, Marketplace Assigned Identifier for the security as provided by IG | +| SecurityIDSource | y | Required by IG, distinguishes the source of the SecurityID. Must be "MarketplaceAssignedIdentifier". | +| Interval | y | The requested interval for the candle data. Valid intervals are: | +| StartDate | y | The start date of the interval. Can be in any timezone but must adhere to format ([see here](https://github.com/IG-Group/ig-orchestrations/blob/master/ig-us-rfed/document/document-websocket/markdown/websocketAPI.md#datetime-formats)) | +| EndDate | y | The end date of the interval. Can be in any timezone but must adhere to format ([see here](https://github.com/IG-Group/ig-orchestrations/blob/master/ig-us-rfed/document/document-websocket/markdown/websocketAPI.md#datetime-formats)) | The maximum number of data points that can be requested is 10,000. @@ -147,36 +152,27 @@ This requests high, low, first and last bid and offer prices in 5 minute resolut ```json { "MsgType": "HistoricCandleRequest", - "ApplVerID":"FIX50SP2", + "ApplVerID": "FIX50SP2", "SendingTime": "2021-08-09T17:09:16.602", "CstmApplVerID": "IGUS/PriceHistory/V1", - "ReqID":"24572562", - "SecurityID":"CS.D.GBPUSD.CZD.IP", - "SecurityIDSource":"MarketplaceAssignedIdentifier", - "Interval":"FIVE_MIN", - "StartDate":"2021-08-09T09:00:00.000", - "EndDate":"2021-08-09T12:00:00.000" + "ReqID": "24572562", + "SecurityID": "CS.D.GBPUSD.CZD.IP", + "SecurityIDSource": "MarketplaceAssignedIdentifier", + "Interval": "FIVE_MIN", + "StartDate": "2021-08-09T09:00:00.000", + "EndDate": "2021-08-09T12:00:00.000" } ``` Response : See Historic Price Candle Response -## Historic Price Candle Response - -|Field/Component Name|Required?|Comments| -|---|---|---| -|Standard Header|Y|MsgType "HistoricCandleResponse"| -|ReqID|y|Unique ID for the associated request| -|CandleData Repeating Group|y|The Candle Data| -|Last Message|c|Present and set to true if the message is the last one for the requested period| -|Allowance|Y|| -### Allowance +## Historic Price Candle Response -|Field/Component Name|Required?|Comments| -|---|---|---| -|RemainingAllowance|y|Remaining Data Points Allowance| -|TotalAllowance|y|Remaining Data Points Allowance| -|AllowanceExpiry|y|Allowance Expiry| +| Field/Component Name | Required? | Comments | +|----------------------------|-----------|---------------------------------------------------------------------------------| +| Standard Header | Y | MsgType "HistoricCandleResponse" | +| ReqID | y | Unique ID for the associated request | +| CandleData Repeating Group | y | The Candle Data | Message Example: @@ -185,15 +181,72 @@ Message Example: "MsgType": "HistoricCandleResponse", "ApplVerID": "FIX50SP2", "CstmApplVerID": "IGUS/PriceHistory/V1", - "SendingTime":"2021-08-09T17:09:17.602", - "ReqID":"24572562", - "SecurityID":"CS.D.GBPUSD.CZD.IP", - "SecurityIDSource":"MarketplaceAssignedIdentifier", - "CandleData":[ - {"StartDate":"2021-08-09T10:00:00.000","EndDate":"2021-08-09T10:00:00.000","First":{"Bid":1.38569,"Offer":1.38579},"Last":{"Bid":1.38585,"Offer":1.38595},"High":{"Bid":1.38588,"Offer":1.38598},"Low":{"Bid":1.38552,"Offer":1.38564}}, - {"StartDate":"2021-08-09T10:00:00.000","EndDate":"2021-08-09T10:05:00.000","First":{"Bid":1.38582,"Offer":1.38598},"Last":{"Bid":1.38725,"Offer":1.38741},"High":{"Bid":1.38729,"Offer":1.38742},"Low":{"Bid":1.3858,"Offer":1.38594}}, + "SendingTime": "2021-08-09T17:09:17.602", + "ReqID": "24572562", + "SecurityID": "CS.D.GBPUSD.CZD.IP", + "SecurityIDSource": "MarketplaceAssignedIdentifier", + "CandleData": [ + { + "StartDate": "2021-08-09T10:00:00.000+00:00", + "EndDate": "2021-08-09T10:00:00.000+00:00", + "First": { + "Bid": 1.38569, + "Offer": 1.38579 + }, + "Last": { + "Bid": 1.38585, + "Offer": 1.38595 + }, + "High": { + "Bid": 1.38588, + "Offer": 1.38598 + }, + "Low": { + "Bid": 1.38552, + "Offer": 1.38564 + } + }, + { + "StartDate": "2021-08-09T10:00:00.000+00:00", + "EndDate": "2021-08-09T10:05:00.000+00:00", + "First": { + "Bid": 1.38582, + "Offer": 1.38598 + }, + "Last": { + "Bid": 1.38725, + "Offer": 1.38741 + }, + "High": { + "Bid": 1.38729, + "Offer": 1.38742 + }, + "Low": { + "Bid": 1.3858, + "Offer": 1.38594 + } + }, ... - {"StartDate":"2021-08-09T12:55:00.000","EndDate":"2021-08-09T13:00:00.000","First":{"Bid":1.38744,"Offer":1.3876},"Last":{"Bid":1.38774,"Offer":1.38784},"High":{"Bid":1.38804,"Offer":1.38815},"Low":{"Bid":1.38734,"Offer":1.38744}} + { + "StartDate": "2021-08-09T12:55:00.000+00:00", + "EndDate": "2021-08-09T13:00:00.000+00:00", + "First": { + "Bid": 1.38744, + "Offer": 1.3876 + }, + "Last": { + "Bid": 1.38774, + "Offer": 1.38784 + }, + "High": { + "Bid": 1.38804, + "Offer": 1.38815 + }, + "Low": { + "Bid": 1.38734, + "Offer": 1.38744 + } + } ] } ```