Endpoint Parameters
-
Request parameters
Name Type Origin Description AccountKey AccountKey Query-String Optional AssetType AssetType Query-String Asset type of the instrument. ChartSampleFieldSet ChartSampleFieldSet Query-String Optionally select which set of fields are returned in the Data array. Currently only applicable for asset types (Warrants, MiniFutures and Certificates). Count Integer Query-String Optionally specifies maximum number of samples to return, max 1200, default 1200. FieldGroups ChartFieldGroupSpec [] Query-String Specifies which data to return. Default is [Data] Horizon Integer Query-String The time period that each sample covers. Values are interpreted in minutes: 1, 2, 3, 5, 10, 15, 30, 60, 120, 180, 240, 300, 360, 480, 1440, 10080, 43200, 129600, 518400. Mode ChartRequestMode Query-String If Time is supplied, mode specifies if the endpoint should returns samples "UpTo" (and including) or "From" (and including) the specified time. Time UtcDateTime Query-String Specifies the time of a sample, which must either be the first (If Mode=="From") or the last (if Mode=="UpTo") in the returned data. Uic Integer Query-String UIC (Universal Instrument Code) of the instrument. -
Response Parameters
View Response CodesName Type Description ChartInfo ChartInfo Object holding information about the OHLC samples such as the exchange id of the price source, when the first sample begins, the horizon in minutes and how long the samples are delayed by. Data ChartSample [] Array holding the individual OHLC samples. For Forex Instruments both Bid and Ask values are returned. For other instruments the values are the last traded values. DataVersion Integer This field holds a version number of the data. DisplayAndFormat DisplayAndFormat Object holding information relevant to displaying the instrument and formatting the samples for charting it. Currently holds the symbol of the instrument, how many decimals samples have, a description of the instrument and what currency it is traded in. -
Request Example
Request URL
GET /chart/v3/charts?AccountKey=01b64edf-da03-4145-bf33-ae21527d4c86&AssetType=FxSpot&ChartSampleFieldSet=BidAsk&Count=99&FieldGroups=Data&Horizon=99&Mode=UpTo&Time=2021-05-21&Uic=99
-
Response Example
Response body
{ "ChartInfo": { "DelayedByMinutes": 15, "ExchangeId": "SBFX", "FirstSampleTime": "2015-02-02T01:02:03Z", "Horizon": 1 }, "Data": [ { "CloseAsk": 1.3475, "CloseBid": 1.3473, "HighAsk": 1.4003, "HighBid": 1.4001, "LowAsk": 1.2804, "LowBid": 1.2802, "OpenAsk": 1.3478, "OpenBid": 1.3476, "Time": "2015-02-01T11:45:00Z" }, { "CloseAsk": 1.3475, "CloseBid": 1.3473, "HighAsk": 1.4003, "HighBid": 1.4001, "LowAsk": 1.2804, "LowBid": 1.2802, "OpenAsk": 1.3478, "OpenBid": 1.3476, "Time": "2015-02-01T11:46:00Z" } ], "DataVersion": 99, "DisplayAndFormat": { "Currency": "USD", "Decimals": 4, "Description": "Euro/US Dollar", "Format": "AllowDecimalPips", "Symbol": "EURUSD" } }