use Zaif; use JSON qw(encode_json decode_json); #PUBLIC API テスト # 取引履歴を出力 my($r,$t); $t = Zaif->market_history('mona_jpy'); foreach $r (@$t){ printf("%4s %6.1f %6d %-28s\n",$$r{'trade_type'},$$r{'price'},$$r{'amount'},<($$r{'date'})); } sleep 5; sub LT{ my @l; @l = localtime($_[0]); return sprintf('%04d/%02d/%02d %02d:%02d:%02d',1900+$l[5],1+$l[4],@l[3,2,1,0]); }