Class: ClickClient::FX::Margin

Inherits:
Base
  • Object
show all
Defined in:
lib/clickclient/fx.rb

Overview

余力

定義済みの属性の他に、レスポンスXMLの要素名、属性名でも値にアクセスできます。 レスポンスXMLについては、クリック証券提供のドキュメントを参照ください。

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#eql?, #hash, #method_missing, #to_s

Constructor Details

#initialize(item) ⇒ Margin

コンストラクタ

item

結果要素



886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
# File 'lib/clickclient/fx.rb', line 886

def initialize( item )
  super(item)
  @margin = item.text( "./yoryoku").to_i
  @transferable_money_amount = item.text( "./furikaeKano" ).to_i
  @guarantee_money_status = item.text( "./shokokinStatus" ).to_i
  @guarantee_money_maintenance_ratio = item.text( "./shokokinIjiritsu" ).to_f
  @market_value = item.text( "./jikaHyokaSogaku" ).to_i
  @appraisal_profit_or_loss_of_open_interest = item.text( "./tategyokuHyokaSoneki" ).to_i
  @balance_in_account = item.text( "./kozaZandaka" ).to_i
  @balance_of_cach = item.text( "./genkinZandaka" ).to_i
  @settlement_profit_or_loss_of_today = item.text( "./kessaiSonekiT" ).to_i
  @settlement_profit_or_loss_of_next_business_day = item.text( "./kessaiSonekiT1" ).to_i
  @settlement_profit_or_loss_of_next_next_business_day = item.text( "./kessaiSonekiT2" ).to_i
  @swap_profit_or_loss = item.text( "./swapSoneki" ).to_i
  @freezed_guarantee_money = item.text( "./kosokuShokokin" ).to_i
  @required_guarantee_money = item.text( "./hitsuyoShokokin" ).to_i
  @ordered_guarantee_money = item.text( "./chumonShokokin" ).to_i

  @guarantee_money_list = []
  item.elements.each( "./torihikiShokokinList/torihikiShokokinListItem" ) { |t|
    @guarantee_money_list << GuaranteeMoney.new(t)
  }
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ClickClient::Base

Instance Attribute Details

#appraisal_profit_or_loss_of_open_interestObject

建玉の評価損益



920
921
922
# File 'lib/clickclient/fx.rb', line 920

def appraisal_profit_or_loss_of_open_interest
  @appraisal_profit_or_loss_of_open_interest
end

#balance_in_accountObject

口座残高



922
923
924
# File 'lib/clickclient/fx.rb', line 922

def 
  @balance_in_account
end

#balance_of_cachObject

現金残高



924
925
926
# File 'lib/clickclient/fx.rb', line 924

def balance_of_cach
  @balance_of_cach
end

#freezed_guarantee_moneyObject

拘束されている証拠金



934
935
936
# File 'lib/clickclient/fx.rb', line 934

def freezed_guarantee_money
  @freezed_guarantee_money
end

#guarantee_money_listObject

証拠金一覧(ClickClient::FX::GuaranteeMoneyの配列)



940
941
942
# File 'lib/clickclient/fx.rb', line 940

def guarantee_money_list
  @guarantee_money_list
end

#guarantee_money_maintenance_ratioObject

証拠金の維持率



916
917
918
# File 'lib/clickclient/fx.rb', line 916

def guarantee_money_maintenance_ratio
  @guarantee_money_maintenance_ratio
end

#guarantee_money_statusObject

証拠金ステータス



914
915
916
# File 'lib/clickclient/fx.rb', line 914

def guarantee_money_status
  @guarantee_money_status
end

#marginObject

余力



910
911
912
# File 'lib/clickclient/fx.rb', line 910

def margin
  @margin
end

#market_valueObject

時価評価の総額



918
919
920
# File 'lib/clickclient/fx.rb', line 918

def market_value
  @market_value
end

#ordered_guarantee_moneyObject

注文中の証拠金



938
939
940
# File 'lib/clickclient/fx.rb', line 938

def ordered_guarantee_money
  @ordered_guarantee_money
end

#required_guarantee_moneyObject

必要な証拠金



936
937
938
# File 'lib/clickclient/fx.rb', line 936

def required_guarantee_money
  @required_guarantee_money
end

#settlement_profit_or_loss_of_next_business_dayObject

翌営業日既決済取引の損益



928
929
930
# File 'lib/clickclient/fx.rb', line 928

def settlement_profit_or_loss_of_next_business_day
  @settlement_profit_or_loss_of_next_business_day
end

#settlement_profit_or_loss_of_next_next_business_dayObject

翌々営業日既決済取引の損益



930
931
932
# File 'lib/clickclient/fx.rb', line 930

def settlement_profit_or_loss_of_next_next_business_day
  @settlement_profit_or_loss_of_next_next_business_day
end

#settlement_profit_or_loss_of_todayObject

当日既決済取引の損益



926
927
928
# File 'lib/clickclient/fx.rb', line 926

def settlement_profit_or_loss_of_today
  @settlement_profit_or_loss_of_today
end

#swap_profit_or_lossObject

スワップ損益



932
933
934
# File 'lib/clickclient/fx.rb', line 932

def swap_profit_or_loss
  @swap_profit_or_loss
end

#transferable_money_amountObject

振替可能額



912
913
914
# File 'lib/clickclient/fx.rb', line 912

def transferable_money_amount
  @transferable_money_amount
end