property ExChange.Debug (Query as String) as String
Queries a FXP server and gets the results as a string.

TypeDescription
Query as String A string expression that indicates the query being sent to a FXP server.
String A string expression that indicates the server's response. 

Here's the description for the FXP protocol. 

Introduction

The Foreign Exchange Protocol (FXP) allows a client to obtain currency exchange rate information from a server over the Internet. The protocol uses an underlying reliable stream protocol, currently TCP/IP.

The server listens for connections to TCP port 5 0 1 1. This port number has not been allocated by any official body, and is subject to change.

A client creates a connection to the server, and sends one or more requests over the connection. Each request is answered by an individual response from the server over the same connection. Requests are always answered in sequence. The connection may be broken by either the client or the server. Responses that are lost due to a broken connection are not re-transmitted.

Requests and responses are transmitted using the ASCII character set. Each request consists of a number of lines of text, followed by a single blank line. Each response consists of a number of lines of header text, followed by a single blank line, optionally followed by a number of lines of data, followed by a single blank line. All lines of text (including blank lines) are terminated by the two character sequence <carriage return> <line feed>. This retains compatibility with the telnet protocol, and telnet can be used to send fxp requests to a server.

The protocol is case insensitive, and requests and responses may be sent in either upper or lower case.

Requests

Each request must begin with a line giving the protocol version used:
fxp/1.1
The protocol version line is followed by one or more request specification lines, in any order. Each request specification line consists of a tag, followed by a single colon character, followed by a single space character, followed by a value. A specific tag may only be used once per request. Values revert to their default values after each request.

Responses

Each response begins with a line containing the protocol used, followed by a single space character, followed by a three digit status code, optionally followed by text that may be passed to a user explaining the status code:
fxp/1.1 200 ok
The first digit of each response code specifies the class of the response. Response codes starting with 2 specify a successful response, and such responses are followed by lines of data. Response codes starting with 4 indicate an illegal query. Response codes starting with 5 indicate a server error.

Response code Possible user text explanations
200 response ok
400 bad request
404 not found
500 server internal error
501 not implemented
503 unavailable
505 version unsupported

The response code line is followed by zero or more response header lines, in any order. Each response header line consists of a tag, followed by a single colon character, followed by a single space character, followed by a value. A specific tag will only be used once per response.

The request headers will be terminated by a single blank line. If the Content-lines header was present the blank line will be followed by the given number of lines of data, terminated by another blank line.

If the query type was quote, each line of data will contain one value for each token given in the Quotetype line. The values will be separated by single space characters. If the Quotetype token was date, the value will be a date string given in the standard date format specified in RFC 822, as modified by RFC 1123. For all other tokens, if the server can answer the query, the value will be a single floating point number such as:

1.2645
If the server can not answer the query, the value will be the token:
na
for "not available".

If the query type was currencies, each line of data will start with a three letter ISO (or O A N D A) currency symbol, followed by a single space character, followed by the name of the currency in English. If the quotecurrency was specified in the request, the response will contain a single line containing the symbol and name of that currency. If the quotecurrency was not specified, the response will contain multiple lines, one for each of the possible currencies.

   http://www.O A N D A.com/products/fxp/protocol.html