建玉一覧の取得に対応
建玉一覧の取得に対応しました。
→Github - unageanu / clickclient_scrap
高速化のため、注文一覧と同じく一覧画面から取得できる情報のみを返します。
サンプル
$: << "../lib" require 'clickclient_scrap' require 'constants' # ログイン c = ClickClient::Client.new c.fx_session( USER, PASS ) {|session| # 建玉一覧を取得 list = session.list_open_interests list.each_pair {|k,v| puts <<-STR --- open_interest_id : #{v.open_interest_id} sell_or_buy : #{v.sell_or_buy} pair : #{v.pair} count : #{v.count} rate : #{v.rate} profit or loss : #{v.profit_or_loss} STR } }
実行結果です。
--- open_interest_id : 10047786647 sell_or_buy : 1 pair : USDJPY count : 1 rate : 96.66 profit or loss : -200 --- open_interest_id : 10047786636 sell_or_buy : 0 pair : USDJPY count : 1 rate : 96.67 profit or loss : 0