é常注æã®æ³¨æä¸è¦§åå¾ãå®è£
é常注æã®æ³¨æä¸è¦§åå¾ãå®è£
ãã¾ããã
âGithub - unageanu / clickclient_scrap
- â»IFDãOCO注æã®ä¸è¦§ã¯ä¸å®å ¨ã§ããIFDãOCO注æã®ã®å ´åã2ã¤ãã®æ³¨æã®æ å ±ãè¿ããã¾ããã
- 注æä¸è¦§ç»é¢ããåå¾ã§ããæ
å ±ã®ã¿ãè¿ãããã«ãã¦ãã¾ãã
- ãæå¹æéããåå¾ããã«ã¯ã注æãã¯ãªãã¯ãã¦å¾ãããã注æ詳細ç»é¢ãã®æ å ±ãå¿ è¦ã ãã©ã
- ä¸è¦§åå¾ã®ãã³ã«è©³ç´°æ å ±ã«ã¢ã¯ã»ã¹ãã¦ããæéããããããã ããåå¾ããªãæ¹åããªã
ãµã³ãã«
$: << "../lib" require 'clickclient_scrap' # â»sample.rbã¨åããã£ã¬ã¯ããªã«user,passãã¡ã¤ã«ãä½æãã # ã¦ã¼ã¶ã¼å,ãã¹ã¯ã¼ããè¨å®ãã¦ãããã¨ã USER=IO.read("./user") PASS=IO.read("./pass") # ãã°ã¤ã³ c = ClickClient::Client.new c.fx_session( USER, PASS ) {|session| # 注æä¸è¦§ãåå¾ orders = session.list_orders orders.each_pair {|k,v| puts <<-STR --- order_no : #{v.order_no} trade_type : #{v.trade_type} order_type : #{v.order_type} execution_expression : #{v.execution_expression} sell_or_buy : #{v.sell_or_buy} pair : #{v.pair} count : #{v.count} rate : #{v.rate} order_state : #{v.order_state} STR } }
å®è¡çµæã§ããsell_or_buyã¨ãã¯ClickClient::FXã§å®ç¾©ããã¦ããå®æ°å¤ã«ãªã£ã¦ã¾ãã
--- order_no : 10035753596 trade_type : æ°è¦ order_type : 01 execution_expression : æå¤ sell_or_buy : 0 pair : ZARJPY count : 1 rate : 9.5 order_state : åä»æ¸