5月 022011
 

=

さてと。

 

IT系の人とFXって深い関係あるんでしょうか。
気づくと意外とIT系の方がおおいような気がしました。

 

とにかく外為オンラインからレートを取る方法。

彼らのWebソースを追ってたどり着きましたw

http://www.gaitameonline.com/rateaj/getrate

 

くりっくすると文字がずらっとみえるとおもう。

 

たった今現在はこんな感じ

{"quotes":[{"high":"2.0766","open":"2.0624","bid":"2.0649","currencyPairCode":"GBPNZD","ask":"2.0666","low":"2.0616"},{"high":"86.07","open":"85.78","bid":"85.96","currencyPairCode":"CADJPY","ask":"86.01","low":"85.62"},{"high":"1.5264","open":"1.5226","bid":"1.5214","currencyPairCode":"GBPAUD","ask":"1.5223","low":"1.5196"},{"high":"89.25","open":"88.97","bid":"89.23","currencyPairCode":"AUDJPY","ask":"89.26","low":"88.74"},{"high":"1.3606","open":"1.3542","bid":"1.3568","currencyPairCode":"AUDNZD","ask":"1.3578","low":"1.3536"},{"high":"1.4053","open":"1.4004","bid":"1.4046","currencyPairCode":"EURCAD","ask":"1.4053","low":"1.3983"},{"high":"1.4863","open":"1.4818","bid":"1.4814","currencyPairCode":"EURUSD","ask":"1.4815","low":"1.4762"},{"high":"65.81","open":"65.69","bid":"65.74","currencyPairCode":"NZDJPY","ask":"65.80","low":"65.21"},{"high":"0.9491","open":"0.9449","bid":"0.9480","currencyPairCode":"USDCAD","ask":"0.9486","low":"0.9444"},{"high":"0.8887","open":"0.8865","bid":"0.8887","currencyPairCode":"EURGBP","ask":"0.8891","low":"0.8856"},{"high":"1.6737","open":"1.6708","bid":"1.6663","currencyPairCode":"GBPUSD","ask":"1.6666","low":"1.6641"},{"high":"12.364","open":"12.287","bid":"12.312","currencyPairCode":"ZARJPY","ask":"12.462","low":"12.249"},{"high":"1.2877","open":"1.2808","bid":"1.2869","currencyPairCode":"EURCHF","ask":"1.2874","low":"1.2796"},{"high":"94.02","open":"93.82","bid":"93.85","currencyPairCode":"CHFJPY","ask":"93.90","low":"93.63"},{"high":"1.1009","open":"1.0971","bid":"1.0948","currencyPairCode":"AUDUSD","ask":"1.0950","low":"1.0921"},{"high":"0.8695","open":"0.8641","bid":"0.8686","currencyPairCode":"USDCHF","ask":"0.8690","low":"0.8624"},{"high":"120.82","open":"120.24","bid":"120.80","currencyPairCode":"EURJPY","ask":"120.82","low":"120.03"},{"high":"1.4506","open":"1.4436","bid":"1.4475","currencyPairCode":"GBPCHF","ask":"1.4484","low":"1.4422"},{"high":"1.8407","open":"1.8290","bid":"1.8357","currencyPairCode":"EURNZD","ask":"1.8369","low":"1.8287"},{"high":"0.8105","open":"0.8098","bid":"0.8064","currencyPairCode":"NZDUSD","ask":"0.8070","low":"0.8029"},{"high":"81.68","open":"81.15","bid":"81.55","currencyPairCode":"USDJPY","ask":"81.56","low":"80.99"},{"high":"1.3538","open":"1.3501","bid":"1.3525","currencyPairCode":"EURAUD","ask":"1.3533","low":"1.3477"},{"high":"0.9518","open":"0.9481","bid":"0.9511","currencyPairCode":"AUDCHF","ask":"0.9517","low":"0.9459"},{"high":"136.10","open":"135.59","bid":"135.90","currencyPairCode":"GBPJPY","ask":"135.93","low":"135.47"}]}

 

この情報がれーと情報

高値、始値、売値、貨幣コード、買値、安値が分かってしまった。

http://www.gaitameonline.com/rateaj/js/ でタイムスタンプを見ると、このまま変わらないでいてくれそうですね。

 

TOPページに表示されるレートを見せる機能はどのようにされてんいるのか気になったのでちょっと見てみました。見えて問題ないソースファイルです。どうか誤解しないでね。

 

TOPページの上で右クリックして、ソースを見るとかで見れると思う。ケチャップでは無かったのは確か。

 

ソースを見たら「rate」って検索して・・・ から始まりました。

 

最大のヒントはこの設定ファイルでした。

http://www.gaitameonline.com/rateaj/js/config.js

var SERVER_URL = 'http://www.gaitameonline.com/rateaj/getrate';

 

さて、VPSサーバ上でなんかFXの情報収集をして時間つぶしをと思っていた矢先の出来事でして。

目的として、今回の発見を元に何かすることにした。

$rate = `wget -qO - http://www.gaitameonline.com/rateaj/getrate`;

まずはこんな感じにPerlでいこうかなぁ・・・とポチポチ。

 

でも、JavaScriptの画質のよさにちょっと引かれJavaScriptをちょっくら勉強中。

 

ま、そんな感じです。

Follow me if you can

 

 

FX開始一ヶ月で学んだこと

両建ては初心者には難しい

 

両建てして合計でマイナスの時に待てない

+100yenでもすぐに交換(?)しちゃう

結局マイナスは重く残る

手放す前にレートが回復すればいいけど、ロスカットの刃に背中を切られる前

自分で損切りの手を下すというなんとも悲しい結末

 

 

今日からもぼちぼち遊びますよ~

  One Response

  1. […] 外為オンラインの為替レートを取得する方法 […]

コメント大歓迎!質問も受け付けておりますヽ(*´∀`)ノ

%d人のブロガーが「いいね」をつけました。