MARKET.RTD Application Fields
Application fields allow getting information about application settings, downloads, and value changes using RTD formulas.
Server Fields
Formula format:
=RTD("market.rtd",,"<Data field>")
For example:
=RTD("market.rtd",,"rtd_server_Version") =RTD("market.rtd",,"rtd_server_DataCacheDirectory")
Complete list of fields:
Field | Meaning |
---|---|
rtd_server_Version | The MARKET.RTD version |
rtd_server_Registration | Information about the registered edition and trial period |
rtd_server_DataCacheDirectory | The DataCacheDirectory configuration value |
rtd_server_TimeZone | The TimeZone configuration value |
rtd_server_DateTime | The current date and time adjusted to the server time zone |
rtd_server_Date | The current date adjusted to the server time zone |
rtd_server_Time | The current time adjusted to the server time zone |
rtd_server_Path | The MARKET.RTD installation path |
rtd_server_Stop_Download | Set 1 to stop downloads temporarily and 0 to enable it back |
Tick Fields
You can use special tick fields for number data fields. Add the :tick suffix to the data field name.
Example:
=RTD("market.rtd",,"YahooFinanceQuotes","AAPL","Last") =RTD("market.rtd",,"YahooFinanceQuotes","AAPL","Last:tick")
Tick values:
Tick Value | Meaning |
---|---|
1 | The value is changed up |
0 | The value is unchanged |
-1 | The value is changed down |
Tick fields can be used for conditional formatting of the underlying fields or as independent columns.
Data Provider Fields
Use the following fields to get the information for data providers:
Field | Meaning |
---|---|
rtd_RefreshInterval | The refresh interval (get and set) |
rtd_LastUpdate | The date and time of the last update |
rtd_LastUpdateDate | The date of the last update |
rtd_LastUpdateTime | The time of the last update |
rtd_LastError | The last error code (see codes below) |
rtd_LastMessage | The last error message |
For example, if a data formula is
=RTD("market.rtd",,"YahooFinanceQuotes","AAPL","Last")
you can add formulas to monitor data status:
=RTD("market.rtd",,"YahooFinanceQuotes","AAPL","rtd_LastUpdate") =RTD("market.rtd",,"YahooFinanceQuotes","AAPL","rtd_LastError") =RTD("market.rtd",,"YahooFinanceQuotes","AAPL","rtd_LastMessage")
Also, you can change the refresh interval (in seconds or as hh:mm:ss) using the formula like this (15 minutes):
=RTD("market.rtd",,"YahooFinanceQuotes","rtd_RefreshInterval",15*60)
Do not make a lot of requests to the website. Otherwise, the website can ban your IP.
LastError Codes
The rtd_LastError field returns the following codes:
Value | Member name | Description |
---|---|---|
0 | Success | No error was encountered |
14 | Timeout | No response was received during the time-out period for a request |
15 | ProxyNameResolutionFailure | The name resolver service could not resolve the proxy host name |
400 | BadRequest | The request could not be understood by the server due to malformed syntax |
401 | Unauthorized | The request requires user authentication |
403 | Forbidden | The server understood the request but is refusing to fulfill it |
404 | NotFound | The server has not found anything matching the Request-URI |
407 | ProxyAuthenticationRequired | This code is similar to 401 (Unauthorized) but indicates that the client must first authenticate itself with the proxy |
408 | RequestTimeout | The client did not produce a request within the time that the server was prepared to wait |
500 | InternalServerError | The server encountered an unexpected condition which prevented it from fulfilling the request |
503 | ServiceUnavailable | The server is currently unable to handle the request due to a temporary overloading or maintenance of the server |