Menu

VWD quotes stopped working

2001-05-07
2001-08-09
  • Jan Willamowius

    Jan Willamowius - 2001-05-07

    It ssems www.vwd.de has changed the format of their website. Did anybody fix the vwd module, yet ?

     
    • Paul Fenwick

      Paul Fenwick - 2001-05-08

      Not yet. Both ASX and VWD are currently broken, and I have a patch for ASX.  I also have a whole slew of new modules that have been submitted which I really should be looking at before almost
      anything else.

      If you're interested in creating patch I can provide you with write access to the CVS tree.  :)

       
    • Erik Aronesty

      Erik Aronesty - 2001-08-09

      Example script to greate a "reliable" feed by allowing you to safely "requote" failed symbols using multiple feeds.

      ######## EXAMPLE
      #
      #
      # uses Finance::Quote to requote any failed entries or entries with a zero value in the 'close' field
      # finance_requote(\%quotes, \@syms, 'nyse', 'close');
      #
      ########

      sub finance_requote {
      local (*quotes, *syms, $source, $field) = (@_);

      my ($f, $v, $ok, $n);

      my @news;

      foreach $f (@syms) {
         $ok = ($quotes{$f,"success"} && ($quotes{$f,"success"} == 1));
       
         if ($ok && $field) {
          $v = $quotes{$f,$field};
         $ok = 0 if ($v == 0);
         }
         push @news, $f if (!$ok);
      }

      if (@news) {
        my $q = Finance::Quote->new;

        my %newquotes = $q->$source(@news);
        for (keys(%newquotes)) {
         ($f, $n) = split(chr(28),$_);
         if ($newquotes{$f,"success"} && ($newquotes{$f,"success"} == 1)) {
          $quotes{$f,$n} = $newquotes{$f,$n};
         }
        }
      }
      }

       

Log in to post a comment.