|
GoldMoney - Automated Holding History | | | | You can automatically retrieve the history of your Holding (without manually logging into your Holding) by performing the following steps: Write a script or program, for example using PERL, PHP or Visual Basic, that will create text consisting of a single line in the following format (shown here across multiple lines for readability): HISTORY <TAB> <holding_number> <TAB> <passphrase> <TAB> <reference_number> <NEWLINE> where: - HISTORY = the name of the service being requested (HISTORY indicates Holding history);
- <holding_number> = the number of your Holding in the format XX-XX-XX-X;
- <passphrase> = the current passphrase of your Holding;
- <reference_number> = an optional reference number that the GoldMoney system will include in the response;
- <TAB> = the TAB character (ASCII 0x09).
- <NEWLINE> = the newline/linefeed character (ASCII 0x0a).
Then, immediately following the above line, a line in the following format (once again shown across multiple lines for readability): <currency_id> <TAB> <vault_id> <TAB> <display_date_from> <TAB> <display_date_to> <TAB> <memo_contains> <NEWLINE> where: - <currency_id> = the numeric identifier of the metal or currency that you want to obtain a history for:
- 0 - GoldGrams
- 1000 - Silver ounces
- 124 - Canadian dollars
- 392 - Japanese yen
- 756 - Swiss francs
- 826 - British pounds
- 840 - US dollars
- 978 - euros
- <vault_id> = the numeric identifier of the vault that you want to obtain a history for:
- 0 - use for all non-metal currencies
- 1 - VIA MAT London (use for metals only)
- 2 - VIA MAT Zurich (use for metals only)
- <display_date_from> = the start date from when you want to obtain the history;
- <display_date_to> = the end date until when you want to obtain the history;
- <memo_contains> = any text based on which you want to filter the history (optional);
- <TAB> = the TAB character (ASCII 0x09).
- <NEWLINE> = the newline/linefeed character (ASCII 0x0a).
| Programmatically submit the text, as an HTML form field using the HTTP POST method, to the following URL: https://secure.goldmoney.com/user/auto.php Prior to submission, you must also explicitly set/override the Content-Type field in the HTTP header to application/x-www-form-urlencoded. Various libraries exist that enable you to programmatically send HTTP messages and override HTTP headers, for example cURL (Linux) and MSINET (Microsoft). Depending on which library you use, you may need to explicitly construct the entire HTTP message header in your program (you do not need to do this when using cURL or MSINET). Furthermore, the name of the HTML form field that contains the populated template must be set to either GM_AUTO or to gm_auto. | | Interpret the result that is returned by the GoldMoney system. The output from the service will always be enclosed in a set of <pre> </pre> tags. If any error occurred, the output will contain an error message which will always be prefixed with [ERROR]<TAB>. |
| |