clickclient_scrap 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/clickclient_scrap.rb +10 -17
- data/lib/jiji_plugin.rb +1 -1
- data/sample/constants.rb +3 -1
- data/sample/sample_list_rates.rb +2 -2
- data/spec/cancel_order_spec.rb +3 -3
- data/spec/jiji_plugin_daily_spec.rb +34 -35
- data/spec/jiji_plugin_spec!.rb +24 -24
- data/spec/limit_order_spec.rb +48 -48
- data/spec/list_orders_spec.rb +1 -1
- data/spec/market_order_spec!.rb +28 -28
- data/spec/oco_order_spec.rb +24 -24
- data/spec/order_error_spec.rb +28 -28
- metadata +47 -68
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: da10b446c10b431d3484a6b062b3f1d8d7a1f97c
|
4
|
+
data.tar.gz: e54a0e2784a977216ae41bc81fb75c47fc9f3840
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2e777297c3f84ebd935088406e0dce6f9a924562d564894624e0a874422762ad35e908d0ef99e96e9bb20210f6fcde01a348f5f84699e47ac304060f055f2b6c
|
7
|
+
data.tar.gz: 67a59da477eca187262b9e3eca9cc55a8c0914096feba80770247c32f92a4fe49be826e048e38fda5d8775601b6ee487c5ab8e6ce9d48c9db4618fcc1661d106
|
data/lib/clickclient_scrap.rb
CHANGED
@@ -364,22 +364,22 @@ module ClickClientScrap
|
|
364
364
|
when ORDER_TYPE_MARKET_ORDER
|
365
365
|
# 成り行き
|
366
366
|
form["P003"] = unit.to_s # 取り引き数量
|
367
|
-
form
|
367
|
+
set_sell_or_buy( form, sell_or_buy )
|
368
368
|
form["P005"] = options[:slippage].to_s if ( options && options[:slippage] != nil ) # スリッページ
|
369
369
|
when ORDER_TYPE_NORMAL
|
370
370
|
# 指値
|
371
371
|
form["P003"] = options[:rate].to_s # レート
|
372
372
|
form["P005"] = unit.to_s # 取り引き数量
|
373
|
-
form
|
374
|
-
exp =
|
375
|
-
form
|
373
|
+
set_sell_or_buy( form, sell_or_buy )
|
374
|
+
exp = options[:execution_expression] == ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER ? "2" : "1"
|
375
|
+
form.radiobuttons_with(:name => 'P004.0', :value => exp )[0].check
|
376
376
|
set_expiration( form, options, "P008", "P009" ) # 有効期限
|
377
377
|
when ORDER_TYPE_OCO
|
378
378
|
# OCO
|
379
379
|
form["P003"] = options[:rate].to_s # レート
|
380
380
|
form["P005"] = options[:stop_order_rate].to_s # 逆指値レート
|
381
381
|
form["P007"] = unit.to_s # 取り引き数量
|
382
|
-
form
|
382
|
+
set_sell_or_buy( form, sell_or_buy )
|
383
383
|
set_expiration( form, options, "P010", "P011" ) # 有効期限
|
384
384
|
else
|
385
385
|
raise "not supported yet."
|
@@ -420,6 +420,11 @@ module ClickClientScrap
|
|
420
420
|
end
|
421
421
|
end
|
422
422
|
|
423
|
+
def set_sell_or_buy( form, sell_or_buy )
|
424
|
+
value = sell_or_buy == ClickClientScrap::FX::SELL ? "1" : "0" #売り/買い
|
425
|
+
form.radiobuttons_with(:name => 'P002.0', :value => value )[0].check
|
426
|
+
end
|
427
|
+
|
423
428
|
#
|
424
429
|
#=== 注文をキャンセルします。
|
425
430
|
#
|
@@ -724,15 +729,3 @@ module ClickClientScrap
|
|
724
729
|
end
|
725
730
|
end
|
726
731
|
|
727
|
-
class << Mechanize::Util
|
728
|
-
def from_native_charset(s, code)
|
729
|
-
if Mechanize.html_parser == Nokogiri::HTML
|
730
|
-
return unless s
|
731
|
-
Iconv.iconv(code, "UTF-8", s).join("") rescue s # エラーになった場合、変換前の文字列を返す
|
732
|
-
else
|
733
|
-
return s
|
734
|
-
end
|
735
|
-
end
|
736
|
-
end
|
737
|
-
|
738
|
-
|
data/lib/jiji_plugin.rb
CHANGED
@@ -65,7 +65,7 @@ class ClickSecuritiesPlugin
|
|
65
65
|
# 10s待っても取得できなければあきらめる
|
66
66
|
20.times {|i|
|
67
67
|
sleep 0.5
|
68
|
-
position = @session.list_open_interests.find {|
|
68
|
+
position = @session.list_open_interests.find {|inte| !before.include?(inte[0]) }
|
69
69
|
break if position
|
70
70
|
}
|
71
71
|
raise "order fialed." unless position
|
data/sample/constants.rb
CHANGED
data/sample/sample_list_rates.rb
CHANGED
@@ -7,8 +7,8 @@ require 'clickclient_scrap'
|
|
7
7
|
require 'constants'
|
8
8
|
|
9
9
|
# ログイン
|
10
|
-
c = ClickClientScrap::Client.new
|
11
|
-
c.fx_session(
|
10
|
+
c = ClickClientScrap::Client.new(nil, true)
|
11
|
+
c.fx_session( DEMO_USER, DEMO_PASS ) {|session|
|
12
12
|
|
13
13
|
# レート一覧を取得
|
14
14
|
rates = session.list_rates
|
data/spec/cancel_order_spec.rb
CHANGED
@@ -30,15 +30,15 @@ describe "cancel_order" do
|
|
30
30
|
@s.cancel_order(id.order_no)
|
31
31
|
@order_ids.pop
|
32
32
|
}
|
33
|
-
@s.list_orders(ClickClientScrap::FX::ORDER_CONDITION_ON_ORDER).size.
|
33
|
+
expect(@s.list_orders(ClickClientScrap::FX::ORDER_CONDITION_ON_ORDER).size).to eq 0
|
34
34
|
}
|
35
35
|
end
|
36
36
|
|
37
37
|
it "削除対象が存在しない" do
|
38
38
|
do_test {|s|
|
39
|
-
|
39
|
+
expect {
|
40
40
|
@s.cancel_order("not found")
|
41
|
-
}.
|
41
|
+
}.to raise_error( RuntimeError, "illegal order_no. order_no=not found" )
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
|
-
|
3
|
+
$:.unshift "../lib"
|
4
4
|
|
5
5
|
require "rubygems"
|
6
6
|
require "logger"
|
@@ -8,21 +8,20 @@ require 'clickclient_scrap'
|
|
8
8
|
require "common"
|
9
9
|
require 'jiji/plugin/plugin_loader'
|
10
10
|
require 'jiji/plugin/securities_plugin'
|
11
|
+
require 'jiji_plugin'
|
11
12
|
|
12
13
|
# jijiプラグインのテスト
|
13
14
|
# ※dailyでのテスト用。レート情報の参照のみをテストする。
|
14
15
|
describe "jiji plugin daily" do
|
15
16
|
before(:all) {
|
16
|
-
# ロード
|
17
|
-
JIJI::Plugin::Loader.new.load
|
18
17
|
@logger = Logger.new STDOUT
|
19
18
|
}
|
20
19
|
it "jiji pluginのテスト(DEMO)" do
|
21
20
|
plugins = JIJI::Plugin.get( JIJI::Plugin::SecuritiesPlugin::FUTURE_NAME )
|
22
21
|
plugin = plugins.find {|i| i.plugin_id == :click_securities_demo }
|
23
22
|
|
24
|
-
plugin.
|
25
|
-
plugin.display_name.
|
23
|
+
expect(plugin).not_to be_nil
|
24
|
+
expect(plugin.display_name).to eq "CLICK Securities DEMO"
|
26
25
|
|
27
26
|
begin
|
28
27
|
plugin.init_plugin( {:user=>DEMO_USER, :password=>DEMO_PASS}, @logger )
|
@@ -32,13 +31,13 @@ describe "jiji plugin daily" do
|
|
32
31
|
rates = plugin.list_rates
|
33
32
|
pairs.each {|p|
|
34
33
|
# 利用可能とされたペアのレートが取得できていることを確認
|
35
|
-
p.name.
|
36
|
-
p.trade_unit.
|
37
|
-
rates[p.name].
|
38
|
-
rates[p.name].bid.
|
39
|
-
rates[p.name].ask.
|
40
|
-
rates[p.name].sell_swap.
|
41
|
-
rates[p.name].buy_swap.
|
34
|
+
expect(p.name).not_to be_nil
|
35
|
+
expect(p.trade_unit).not_to be_nil
|
36
|
+
expect(rates[p.name]).not_to be_nil
|
37
|
+
expect(rates[p.name].bid).not_to be_nil
|
38
|
+
expect(rates[p.name].ask).not_to be_nil
|
39
|
+
expect(rates[p.name].sell_swap).not_to be_nil
|
40
|
+
expect(rates[p.name].buy_swap).not_to be_nil
|
42
41
|
}
|
43
42
|
sleep 1
|
44
43
|
|
@@ -46,13 +45,13 @@ describe "jiji plugin daily" do
|
|
46
45
|
rates = plugin.list_rates
|
47
46
|
pairs.each {|p|
|
48
47
|
# 利用可能とされたペアのレートが取得できていることを確認
|
49
|
-
p.name.
|
50
|
-
p.trade_unit.
|
51
|
-
rates[p.name].
|
52
|
-
rates[p.name].bid.
|
53
|
-
rates[p.name].ask.
|
54
|
-
rates[p.name].sell_swap.
|
55
|
-
rates[p.name].buy_swap.
|
48
|
+
expect(p.name).not_to be_nil
|
49
|
+
expect(p.trade_unit).not_to be_nil
|
50
|
+
expect(rates[p.name]).not_to be_nil
|
51
|
+
expect(rates[p.name].bid).not_to be_nil
|
52
|
+
expect(rates[p.name].ask).not_to be_nil
|
53
|
+
expect(rates[p.name].sell_swap).not_to be_nil
|
54
|
+
expect(rates[p.name].buy_swap).not_to be_nil
|
56
55
|
}
|
57
56
|
sleep 3
|
58
57
|
}
|
@@ -66,8 +65,8 @@ describe "jiji plugin daily" do
|
|
66
65
|
plugins = JIJI::Plugin.get( JIJI::Plugin::SecuritiesPlugin::FUTURE_NAME )
|
67
66
|
plugin = plugins.find {|i| i.plugin_id == :click_securities }
|
68
67
|
|
69
|
-
plugin.
|
70
|
-
plugin.display_name.
|
68
|
+
expect(plugin).not_to be_nil
|
69
|
+
expect(plugin.display_name).to eq "CLICK Securities"
|
71
70
|
|
72
71
|
begin
|
73
72
|
plugin.init_plugin( {:user=>USER, :password=>PASS}, @logger )
|
@@ -77,13 +76,13 @@ describe "jiji plugin daily" do
|
|
77
76
|
rates = plugin.list_rates
|
78
77
|
pairs.each {|p|
|
79
78
|
# 利用可能とされたペアのレートが取得できていることを確認
|
80
|
-
p.name.
|
81
|
-
p.trade_unit.
|
82
|
-
rates[p.name].
|
83
|
-
rates[p.name].bid.
|
84
|
-
rates[p.name].ask.
|
85
|
-
rates[p.name].sell_swap.
|
86
|
-
rates[p.name].buy_swap.
|
79
|
+
expect(p.name).not_to be_nil
|
80
|
+
expect(p.trade_unit).not_to be_nil
|
81
|
+
expect(rates[p.name]).not_to be_nil
|
82
|
+
expect(rates[p.name].bid).not_to be_nil
|
83
|
+
expect(rates[p.name].ask).not_to be_nil
|
84
|
+
expect(rates[p.name].sell_swap).not_to be_nil
|
85
|
+
expect(rates[p.name].buy_swap).not_to be_nil
|
87
86
|
}
|
88
87
|
sleep 1
|
89
88
|
|
@@ -91,13 +90,13 @@ describe "jiji plugin daily" do
|
|
91
90
|
rates = plugin.list_rates
|
92
91
|
pairs.each {|p|
|
93
92
|
# 利用可能とされたペアのレートが取得できていることを確認
|
94
|
-
p.name.
|
95
|
-
p.trade_unit.
|
96
|
-
rates[p.name].
|
97
|
-
rates[p.name].bid.
|
98
|
-
rates[p.name].ask.
|
99
|
-
rates[p.name].sell_swap.
|
100
|
-
rates[p.name].buy_swap.
|
93
|
+
expect(p.name).not_to be_nil
|
94
|
+
expect(p.trade_unit).not_to be_nil
|
95
|
+
expect(rates[p.name]).not_to be_nil
|
96
|
+
expect(rates[p.name].bid).not_to be_nil
|
97
|
+
expect(rates[p.name].ask).not_to be_nil
|
98
|
+
expect(rates[p.name].sell_swap).not_to be_nil
|
99
|
+
expect(rates[p.name].buy_swap).not_to be_nil
|
101
100
|
}
|
102
101
|
sleep 3
|
103
102
|
}
|
data/spec/jiji_plugin_spec!.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
|
-
|
3
|
+
$:.unshift "../lib"
|
4
4
|
|
5
5
|
require "rubygems"
|
6
6
|
require "logger"
|
@@ -8,21 +8,21 @@ require 'clickclient_scrap'
|
|
8
8
|
require "common"
|
9
9
|
require 'jiji/plugin/plugin_loader'
|
10
10
|
require 'jiji/plugin/securities_plugin'
|
11
|
+
require 'jiji_plugin'
|
11
12
|
|
12
13
|
# jijiプラグインのテスト
|
13
14
|
# ※実際に取引を行うので注意!
|
14
15
|
describe "market order" do
|
15
16
|
before(:all) {
|
16
17
|
# ロード
|
17
|
-
JIJI::Plugin::Loader.new.load
|
18
18
|
@logger = Logger.new STDOUT
|
19
19
|
}
|
20
20
|
it "jiji pluginのテスト(DEMO)" do
|
21
21
|
plugins = JIJI::Plugin.get( JIJI::Plugin::SecuritiesPlugin::FUTURE_NAME )
|
22
22
|
plugin = plugins.find {|i| i.plugin_id == :click_securities_demo }
|
23
23
|
|
24
|
-
plugin.
|
25
|
-
plugin.display_name.
|
24
|
+
expect(plugin).not_to be_nil
|
25
|
+
expect(plugin.display_name).to eq "CLICK Securities DEMO"
|
26
26
|
|
27
27
|
begin
|
28
28
|
plugin.init_plugin( {:user=>DEMO_USER, :password=>DEMO_PASS}, @logger )
|
@@ -32,21 +32,21 @@ describe "market order" do
|
|
32
32
|
rates = plugin.list_rates
|
33
33
|
pairs.each {|p|
|
34
34
|
# 利用可能とされたペアのレートが取得できていることを確認
|
35
|
-
p.name.
|
36
|
-
p.trade_unit.
|
37
|
-
rates[p.name].
|
38
|
-
rates[p.name].bid.
|
39
|
-
rates[p.name].ask.
|
40
|
-
rates[p.name].sell_swap.
|
41
|
-
rates[p.name].buy_swap.
|
35
|
+
expect(p.name).not_to be_nil
|
36
|
+
expect(p.trade_unit).not_to be_nil
|
37
|
+
expect(rates[p.name]).not_to be_nil
|
38
|
+
expect(rates[p.name].bid).not_to be_nil
|
39
|
+
expect(rates[p.name].ask).not_to be_nil
|
40
|
+
expect(rates[p.name].sell_swap).not_to be_nil
|
41
|
+
expect(rates[p.name].buy_swap).not_to be_nil
|
42
42
|
}
|
43
43
|
sleep 1
|
44
44
|
|
45
45
|
# 売り/買い
|
46
46
|
sell = plugin.order( :EURJPY, :sell, 1 )
|
47
47
|
buy = plugin.order( :EURJPY, :buy, 1 )
|
48
|
-
sell.position_id.
|
49
|
-
buy.position_id.
|
48
|
+
expect(sell.position_id).not_to be_nil
|
49
|
+
expect(buy.position_id).not_to be_nil
|
50
50
|
|
51
51
|
# 約定
|
52
52
|
plugin.commit sell.position_id, 1
|
@@ -60,8 +60,8 @@ describe "market order" do
|
|
60
60
|
plugins = JIJI::Plugin.get( JIJI::Plugin::SecuritiesPlugin::FUTURE_NAME )
|
61
61
|
plugin = plugins.find {|i| i.plugin_id == :click_securities }
|
62
62
|
|
63
|
-
plugin.
|
64
|
-
plugin.display_name.
|
63
|
+
expect(plugin).not_to be_nil
|
64
|
+
expect(plugin.display_name).to eq "CLICK Securities"
|
65
65
|
|
66
66
|
begin
|
67
67
|
plugin.init_plugin( {:user=>USER, :password=>PASS}, @logger )
|
@@ -71,21 +71,21 @@ describe "market order" do
|
|
71
71
|
rates = plugin.list_rates
|
72
72
|
pairs.each {|p|
|
73
73
|
# 利用可能とされたペアのレートが取得できていることを確認
|
74
|
-
p.name.
|
75
|
-
p.trade_unit.
|
76
|
-
rates[p.name].
|
77
|
-
rates[p.name].bid.
|
78
|
-
rates[p.name].ask.
|
79
|
-
rates[p.name].sell_swap.
|
80
|
-
rates[p.name].buy_swap.
|
74
|
+
expect(p.name).not_to be_nil
|
75
|
+
expect(p.trade_unit).not_to be_nil
|
76
|
+
expect(rates[p.name]).not_to be_nil
|
77
|
+
expect(rates[p.name].bid).not_to be_nil
|
78
|
+
expect(rates[p.name].ask).not_to be_nil
|
79
|
+
expect(rates[p.name].sell_swap).not_to be_nil
|
80
|
+
expect(rates[p.name].buy_swap).not_to be_nil
|
81
81
|
}
|
82
82
|
sleep 1
|
83
83
|
|
84
84
|
# 売り/買い
|
85
85
|
sell = plugin.order( :EURJPY, :sell, 1 )
|
86
86
|
buy = plugin.order( :EURJPY, :buy, 1 )
|
87
|
-
sell.position_id.
|
88
|
-
buy.position_id.
|
87
|
+
expect(sell.position_id).not_to be_nil
|
88
|
+
expect(buy.position_id).not_to be_nil
|
89
89
|
|
90
90
|
# 約定
|
91
91
|
plugin.commit sell.position_id, 1
|
data/spec/limit_order_spec.rb
CHANGED
@@ -17,18 +17,18 @@ describe "limit" do
|
|
17
17
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
18
18
|
})
|
19
19
|
@order = @s.list_orders[@order_ids[0].order_no]
|
20
|
-
@order_ids[0].
|
21
|
-
@order_ids[0].order_no.
|
22
|
-
@order.
|
23
|
-
@order.order_no.
|
24
|
-
@order.trade_type.
|
25
|
-
@order.execution_expression.
|
26
|
-
@order.sell_or_buy.
|
27
|
-
@order.pair.
|
28
|
-
@order.count.
|
29
|
-
@order.rate.
|
30
|
-
@order.stop_order_rate.
|
31
|
-
@order.stop_order_execution_expression.
|
20
|
+
expect(@order_ids[0]).not_to be_nil
|
21
|
+
expect(@order_ids[0].order_no).not_to be_nil
|
22
|
+
expect(@order).not_to be_nil
|
23
|
+
expect(@order.order_no).to eq @order_ids[0].order_no
|
24
|
+
expect(@order.trade_type).to eq ClickClientScrap::FX::TRADE_TYPE_NEW
|
25
|
+
expect(@order.execution_expression).to eq ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER
|
26
|
+
expect(@order.sell_or_buy).to eq ClickClientScrap::FX::BUY
|
27
|
+
expect(@order.pair).to eq ClickClientScrap::FX::EURJPY
|
28
|
+
expect(@order.count).to eq 1
|
29
|
+
expect(@order.rate).to eq @rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5
|
30
|
+
expect(@order.stop_order_rate).to be_nil
|
31
|
+
expect(@order.stop_order_execution_expression).to be_nil
|
32
32
|
@order.order_type= ClickClientScrap::FX::ORDER_TYPE_NORMAL
|
33
33
|
|
34
34
|
#指値-売り
|
@@ -38,18 +38,18 @@ describe "limit" do
|
|
38
38
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_WEEK_END
|
39
39
|
})
|
40
40
|
@order = @s.list_orders[@order_ids[1].order_no]
|
41
|
-
@order_ids[1].
|
42
|
-
@order_ids[1].order_no.
|
43
|
-
@order.
|
44
|
-
@order.order_no.
|
45
|
-
@order.trade_type.
|
46
|
-
@order.execution_expression.
|
47
|
-
@order.sell_or_buy.
|
48
|
-
@order.pair.
|
49
|
-
@order.count.
|
50
|
-
@order.rate.
|
51
|
-
@order.stop_order_rate.
|
52
|
-
@order.stop_order_execution_expression.
|
41
|
+
expect(@order_ids[1]).not_to be_nil
|
42
|
+
expect(@order_ids[1].order_no).not_to be_nil
|
43
|
+
expect(@order).not_to be_nil
|
44
|
+
expect(@order.order_no).to eq @order_ids[1].order_no
|
45
|
+
expect(@order.trade_type).to eq ClickClientScrap::FX::TRADE_TYPE_NEW
|
46
|
+
expect(@order.execution_expression).to eq ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER
|
47
|
+
expect(@order.sell_or_buy).to eq ClickClientScrap::FX::SELL
|
48
|
+
expect(@order.pair).to eq ClickClientScrap::FX::USDJPY
|
49
|
+
expect(@order.count).to eq 1
|
50
|
+
expect(@order.rate).to eq @rates[ClickClientScrap::FX::USDJPY].ask_rate + 0.5
|
51
|
+
expect(@order.stop_order_rate).to be_nil
|
52
|
+
expect(@order.stop_order_execution_expression).to be_nil
|
53
53
|
@order.order_type= ClickClientScrap::FX::ORDER_TYPE_NORMAL
|
54
54
|
|
55
55
|
#逆指値-買い
|
@@ -59,19 +59,19 @@ describe "limit" do
|
|
59
59
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
60
60
|
})
|
61
61
|
@order = @s.list_orders[@order_ids[2].order_no]
|
62
|
-
@order_ids[2].
|
63
|
-
@order_ids[2].order_no.
|
62
|
+
expect(@order_ids[2]).not_to be_nil
|
63
|
+
expect(@order_ids[2].order_no).not_to be_nil
|
64
64
|
@order = @s.list_orders[@order_ids[2].order_no]
|
65
|
-
@order.
|
66
|
-
@order.order_no.
|
67
|
-
@order.trade_type.
|
68
|
-
@order.execution_expression.
|
69
|
-
@order.sell_or_buy.
|
70
|
-
@order.pair.
|
71
|
-
@order.count.
|
72
|
-
@order.rate.to_s.
|
73
|
-
@order.stop_order_rate.
|
74
|
-
@order.stop_order_execution_expression.
|
65
|
+
expect(@order).not_to be_nil
|
66
|
+
expect(@order.order_no).to eq @order_ids[2].order_no
|
67
|
+
expect(@order.trade_type).to eq ClickClientScrap::FX::TRADE_TYPE_NEW
|
68
|
+
expect(@order.execution_expression).to eq ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER
|
69
|
+
expect(@order.sell_or_buy).to eq ClickClientScrap::FX::BUY
|
70
|
+
expect(@order.pair).to eq ClickClientScrap::FX::EURUSD
|
71
|
+
expect(@order.count).to eq 1
|
72
|
+
expect(@order.rate.to_s).to eq( (@rates[ClickClientScrap::FX::EURUSD].ask_rate + 0.05).to_s)
|
73
|
+
expect(@order.stop_order_rate).to be_nil
|
74
|
+
expect(@order.stop_order_execution_expression).to be_nil
|
75
75
|
@order.order_type= ClickClientScrap::FX::ORDER_TYPE_NORMAL
|
76
76
|
|
77
77
|
#逆指値-売り
|
@@ -82,18 +82,18 @@ describe "limit" do
|
|
82
82
|
:expiration_date=>Date.today+2 # 2日後
|
83
83
|
})
|
84
84
|
@order = @s.list_orders[@order_ids[3].order_no]
|
85
|
-
@order_ids[3].
|
86
|
-
@order_ids[3].order_no.
|
87
|
-
@order.
|
88
|
-
@order.order_no.
|
89
|
-
@order.trade_type.
|
90
|
-
@order.execution_expression.
|
91
|
-
@order.sell_or_buy.
|
92
|
-
@order.pair.
|
93
|
-
@order.count.
|
94
|
-
@order.rate.
|
95
|
-
@order.stop_order_rate.
|
96
|
-
@order.stop_order_execution_expression.
|
85
|
+
expect(@order_ids[3]).not_to be_nil
|
86
|
+
expect(@order_ids[3].order_no).not_to be_nil
|
87
|
+
expect(@order).not_to be_nil
|
88
|
+
expect(@order.order_no).to eq @order_ids[3].order_no
|
89
|
+
expect(@order.trade_type).to eq ClickClientScrap::FX::TRADE_TYPE_NEW
|
90
|
+
expect(@order.execution_expression).to eq ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER
|
91
|
+
expect(@order.sell_or_buy).to eq ClickClientScrap::FX::SELL
|
92
|
+
expect(@order.pair).to eq ClickClientScrap::FX::GBPJPY
|
93
|
+
expect(@order.count).to eq 2
|
94
|
+
expect(@order.rate).to eq @rates[ClickClientScrap::FX::GBPJPY].ask_rate - 0.5
|
95
|
+
expect(@order.stop_order_rate).to be_nil
|
96
|
+
expect(@order.stop_order_execution_expression).to be_nil
|
97
97
|
@order.order_type= ClickClientScrap::FX::ORDER_TYPE_NORMAL
|
98
98
|
}
|
99
99
|
end
|
data/spec/list_orders_spec.rb
CHANGED
data/spec/market_order_spec!.rb
CHANGED
@@ -26,14 +26,14 @@ describe "market order" do
|
|
26
26
|
#建玉一覧取得
|
27
27
|
after = @s.list_open_interests
|
28
28
|
positions = after.find_all {|i| !prev.include?(i[0]) }.map{|i| i[1] }
|
29
|
-
positions.length.
|
29
|
+
expect(positions.length).to eq 2 # 新規の建玉が2つ存在することを確認
|
30
30
|
positions.each {|p|
|
31
|
-
p.open_interest_id.
|
32
|
-
p.pair.
|
33
|
-
p.sell_or_buy.
|
34
|
-
p.count.
|
35
|
-
p.rate.
|
36
|
-
p.profit_or_loss.
|
31
|
+
expect(p.open_interest_id).not_to be_nil
|
32
|
+
expect(p.pair).not_to be_nil
|
33
|
+
expect(p.sell_or_buy).not_to be_nil
|
34
|
+
expect(p.count).to eq 1
|
35
|
+
expect(p.rate).not_to be_nil
|
36
|
+
expect(p.profit_or_loss).not_to be_nil
|
37
37
|
}
|
38
38
|
|
39
39
|
# 決済注文
|
@@ -42,8 +42,8 @@ describe "market order" do
|
|
42
42
|
sleep 1
|
43
43
|
|
44
44
|
after_settle = @s.list_open_interests
|
45
|
-
after_settle.key?( positions[0].open_interest_id ).
|
46
|
-
after_settle.key?( positions[1].open_interest_id ).
|
45
|
+
expect( after_settle.key?( positions[0].open_interest_id )).to eq false
|
46
|
+
expect( after_settle.key?( positions[1].open_interest_id )).to eq false
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
@@ -63,14 +63,14 @@ describe "market order" do
|
|
63
63
|
#建玉一覧取得
|
64
64
|
after = @s.list_open_interests
|
65
65
|
positions = after.find_all {|i| !prev.include?(i[0]) }.map{|i| i[1] }
|
66
|
-
positions.length.
|
66
|
+
expect(positions.length).to eq 2 # 新規の建玉が2つ存在することを確認
|
67
67
|
positions.each {|p|
|
68
|
-
p.open_interest_id.
|
69
|
-
p.pair.
|
70
|
-
p.sell_or_buy.
|
71
|
-
p.count.
|
72
|
-
p.rate.
|
73
|
-
p.profit_or_loss.
|
68
|
+
expect(p.open_interest_id).not_to be_nil
|
69
|
+
expect(p.pair).not_to be_nil
|
70
|
+
expect(p.sell_or_buy).not_to be_nil
|
71
|
+
expect(p.count).to eq 2
|
72
|
+
expect(p.rate).not_to be_nil
|
73
|
+
expect(p.profit_or_loss).not_to be_nil
|
74
74
|
}
|
75
75
|
|
76
76
|
# 決済注文
|
@@ -79,14 +79,14 @@ describe "market order" do
|
|
79
79
|
sleep 1
|
80
80
|
|
81
81
|
after_settle = @s.list_open_interests
|
82
|
-
after_settle.key?( positions[0].open_interest_id ).
|
83
|
-
after_settle.key?( positions[1].open_interest_id ).
|
82
|
+
expect( after_settle.key?( positions[0].open_interest_id ) ).to eq true
|
83
|
+
expect( after_settle.key?( positions[1].open_interest_id ) ).to eq true
|
84
84
|
|
85
85
|
@s.settle( positions[0].open_interest_id, 1 )
|
86
86
|
@s.settle( positions[1].open_interest_id, 1 )
|
87
87
|
after_settle = @s.list_open_interests
|
88
|
-
after_settle.key?( positions[0].open_interest_id ).
|
89
|
-
after_settle.key?( positions[1].open_interest_id ).
|
88
|
+
expect( after_settle.key?( positions[0].open_interest_id ) ).to eq false
|
89
|
+
expect( after_settle.key?( positions[1].open_interest_id ) ).to eq false
|
90
90
|
}
|
91
91
|
end
|
92
92
|
|
@@ -108,14 +108,14 @@ describe "market order" do
|
|
108
108
|
#建玉一覧取得
|
109
109
|
after = @s.list_open_interests
|
110
110
|
positions = after.find_all {|i| !prev.include?(i[0]) }.map{|i| i[1] }
|
111
|
-
positions.length.
|
111
|
+
expect(positions.length).to eq 8 # 新規の建玉が2つ存在することを確認
|
112
112
|
positions.each {|p|
|
113
|
-
p.open_interest_id.
|
114
|
-
p.pair.
|
115
|
-
p.sell_or_buy.
|
116
|
-
p.count.
|
117
|
-
p.rate.
|
118
|
-
p.profit_or_loss.
|
113
|
+
expect(p.open_interest_id).not_to be_nil
|
114
|
+
expect(p.pair).not_to be_nil
|
115
|
+
expect(p.sell_or_buy).not_to be_nil
|
116
|
+
expect(p.count).to eq 1
|
117
|
+
expect(p.rate).not_to be_nil
|
118
|
+
expect(p.profit_or_loss).not_to be_nil
|
119
119
|
}
|
120
120
|
|
121
121
|
# 決済注文
|
@@ -126,7 +126,7 @@ describe "market order" do
|
|
126
126
|
|
127
127
|
after_settle = @s.list_open_interests
|
128
128
|
positions.each {|p|
|
129
|
-
after_settle.key?( p.open_interest_id ).
|
129
|
+
expect( after_settle.key?( p.open_interest_id ) ).to eq false
|
130
130
|
}
|
131
131
|
}
|
132
132
|
end
|
data/spec/oco_order_spec.rb
CHANGED
@@ -18,18 +18,18 @@ describe "OCO" do
|
|
18
18
|
@order_ids << @order_id
|
19
19
|
orders = @s.list_orders
|
20
20
|
@order = orders[@order_id.order_no]
|
21
|
-
@order_id.
|
22
|
-
@order_id.order_no.
|
23
|
-
@order.
|
24
|
-
@order.order_no.
|
25
|
-
@order.trade_type.
|
26
|
-
@order.execution_expression.
|
27
|
-
@order.sell_or_buy.
|
28
|
-
@order.pair.
|
29
|
-
@order.count.
|
30
|
-
@order.rate.
|
31
|
-
@order.stop_order_rate.
|
32
|
-
@order.stop_order_execution_expression.
|
21
|
+
expect(@order_id).not_to be_nil
|
22
|
+
expect(@order_id.order_no).not_to be_nil
|
23
|
+
expect(@order).not_to be_nil
|
24
|
+
expect(@order.order_no).to eq @order_id.order_no
|
25
|
+
expect(@order.trade_type).to eq ClickClientScrap::FX::TRADE_TYPE_NEW
|
26
|
+
expect(@order.execution_expression).to eq ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER
|
27
|
+
expect(@order.sell_or_buy).to eq ClickClientScrap::FX::BUY
|
28
|
+
expect(@order.pair).to eq ClickClientScrap::FX::EURJPY
|
29
|
+
expect(@order.count).to eq 1
|
30
|
+
expect(@order.rate).to eq @rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5
|
31
|
+
expect(@order.stop_order_rate).to eq @rates[ClickClientScrap::FX::EURJPY].ask_rate + 0.5
|
32
|
+
expect(@order.stop_order_execution_expression).to eq ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER
|
33
33
|
@order.order_type= ClickClientScrap::FX::ORDER_TYPE_OCO
|
34
34
|
}
|
35
35
|
end
|
@@ -44,18 +44,18 @@ describe "OCO" do
|
|
44
44
|
@order_ids << @order_id
|
45
45
|
orders = @s.list_orders
|
46
46
|
@order = orders[@order_id.order_no]
|
47
|
-
@order_id.
|
48
|
-
@order_id.order_no.
|
49
|
-
@order.
|
50
|
-
@order.order_no.
|
51
|
-
@order.trade_type.
|
52
|
-
@order.execution_expression.
|
53
|
-
@order.sell_or_buy.
|
54
|
-
@order.pair.
|
55
|
-
@order.count.
|
56
|
-
@order.rate.
|
57
|
-
@order.stop_order_rate.
|
58
|
-
@order.stop_order_execution_expression.
|
47
|
+
expect(@order_id).not_to be_nil
|
48
|
+
expect(@order_id.order_no).not_to be_nil
|
49
|
+
expect(@order).not_to be_nil
|
50
|
+
expect(@order.order_no).to eq @order_id.order_no
|
51
|
+
expect(@order.trade_type).to eq ClickClientScrap::FX::TRADE_TYPE_NEW
|
52
|
+
expect(@order.execution_expression).to eq ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER
|
53
|
+
expect(@order.sell_or_buy).to eq ClickClientScrap::FX::SELL
|
54
|
+
expect(@order.pair).to eq ClickClientScrap::FX::GBPJPY
|
55
|
+
expect(@order.count).to eq 1
|
56
|
+
expect(@order.rate).to eq @rates[ClickClientScrap::FX::GBPJPY].ask_rate + 0.5
|
57
|
+
expect(@order.stop_order_rate).to eq @rates[ClickClientScrap::FX::GBPJPY].ask_rate - 0.5
|
58
|
+
expect(@order.stop_order_execution_expression).to eq ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER
|
59
59
|
@order.order_type= ClickClientScrap::FX::ORDER_TYPE_OCO
|
60
60
|
}
|
61
61
|
end
|
data/spec/order_error_spec.rb
CHANGED
@@ -11,130 +11,130 @@ describe "注文の異常系テスト" do
|
|
11
11
|
it "指値/逆指値" do
|
12
12
|
do_test {|s|
|
13
13
|
# 執行条件の指定がない
|
14
|
-
|
14
|
+
expect {
|
15
15
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
16
16
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5,
|
17
17
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
18
18
|
})
|
19
|
-
}.
|
19
|
+
}.to raise_error( RuntimeError, "options[:execution_expression] is required." )
|
20
20
|
|
21
21
|
# 有効期限の指定がない
|
22
|
-
|
22
|
+
expect {
|
23
23
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
24
24
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5,
|
25
25
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER,
|
26
26
|
})
|
27
|
-
}.
|
27
|
+
}.to raise_error( RuntimeError, "options[:expiration_type] is required." )
|
28
28
|
|
29
29
|
# 日付指定であるのに日時の指定がない
|
30
|
-
|
30
|
+
expect {
|
31
31
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
32
32
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5,
|
33
33
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER,
|
34
34
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_SPECIFIED
|
35
35
|
})
|
36
|
-
}.
|
36
|
+
}.to raise_error( RuntimeError, "options[:expiration_date] is required." )
|
37
37
|
|
38
38
|
# 日付指定の範囲が不正
|
39
|
-
|
39
|
+
expect {
|
40
40
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
41
41
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5,
|
42
42
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER,
|
43
43
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_SPECIFIED,
|
44
44
|
:expiration_date=>Date.today
|
45
45
|
})
|
46
|
-
}.
|
46
|
+
}.to raise_error( RuntimeError )
|
47
47
|
|
48
48
|
# レートが不正
|
49
|
-
|
49
|
+
expect {
|
50
50
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
51
51
|
:rate=>"-10000000",
|
52
52
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER,
|
53
53
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
54
54
|
})
|
55
|
-
}.
|
55
|
+
}.to raise_error( RuntimeError )
|
56
56
|
|
57
57
|
# 取引数量が不正
|
58
|
-
|
58
|
+
expect {
|
59
59
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, -1, {
|
60
60
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate + 0.5,
|
61
61
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER,
|
62
62
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
63
63
|
})
|
64
|
-
}.
|
64
|
+
}.to raise_error( RuntimeError )
|
65
65
|
|
66
|
-
|
66
|
+
expect {
|
67
67
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 0, {
|
68
68
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate + 0.5,
|
69
69
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER,
|
70
70
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
71
71
|
})
|
72
|
-
}.
|
72
|
+
}.to raise_error( RuntimeError )
|
73
73
|
|
74
|
-
|
74
|
+
expect {
|
75
75
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1000, {
|
76
76
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate + 0.5,
|
77
77
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER,
|
78
78
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
79
79
|
})
|
80
|
-
}.
|
80
|
+
}.to raise_error( RuntimeError )
|
81
81
|
|
82
82
|
# 不利な注文
|
83
|
-
|
83
|
+
expect {
|
84
84
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
85
85
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5,
|
86
86
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER,
|
87
87
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
88
88
|
})
|
89
|
-
}.
|
89
|
+
}.to raise_error( RuntimeError )
|
90
90
|
|
91
|
-
|
91
|
+
expect {
|
92
92
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
93
93
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate + 0.5,
|
94
94
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER,
|
95
95
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
96
96
|
})
|
97
|
-
}.
|
97
|
+
}.to raise_error( RuntimeError )
|
98
98
|
}
|
99
99
|
end
|
100
100
|
|
101
101
|
it "OCO" do
|
102
102
|
do_test {|s|
|
103
103
|
# 執行条件の指定がない
|
104
|
-
|
104
|
+
expect {
|
105
105
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
106
106
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate + 0.5,
|
107
107
|
:stop_order_rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5
|
108
108
|
})
|
109
|
-
}.
|
109
|
+
}.to raise_error( RuntimeError, "options[:expiration_type] is required." )
|
110
110
|
|
111
111
|
# 有効期限の指定がない
|
112
|
-
|
112
|
+
expect {
|
113
113
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
114
114
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate + 0.5,
|
115
115
|
:stop_order_rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5,
|
116
116
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER,
|
117
117
|
})
|
118
|
-
}.
|
118
|
+
}.to raise_error( RuntimeError, "options[:expiration_type] is required." )
|
119
119
|
|
120
120
|
# 不利な注文
|
121
|
-
|
121
|
+
expect {
|
122
122
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
123
123
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5,
|
124
124
|
:stop_order_rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate - 0.5,
|
125
125
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_LIMIT_ORDER,
|
126
126
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
127
127
|
})
|
128
|
-
}.
|
128
|
+
}.to raise_error( RuntimeError )
|
129
129
|
|
130
|
-
|
130
|
+
expect {
|
131
131
|
@s.order( ClickClientScrap::FX::EURJPY, ClickClientScrap::FX::SELL, 1, {
|
132
132
|
:rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate + 0.5,
|
133
133
|
:stop_order_rate=>@rates[ClickClientScrap::FX::EURJPY].ask_rate + 0.5,
|
134
134
|
:execution_expression=>ClickClientScrap::FX::EXECUTION_EXPRESSION_REVERSE_LIMIT_ORDER,
|
135
135
|
:expiration_type=>ClickClientScrap::FX::EXPIRATION_TYPE_TODAY
|
136
136
|
})
|
137
|
-
}.
|
137
|
+
}.to raise_error( RuntimeError )
|
138
138
|
}
|
139
139
|
end
|
140
140
|
|
metadata
CHANGED
@@ -1,61 +1,40 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: clickclient_scrap
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: false
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 12
|
10
|
-
version: 0.1.12
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.13
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Masaya Yamauchi
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-12-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
22
14
|
name: mechanize
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 23
|
30
|
-
segments:
|
31
|
-
- 1
|
32
|
-
- 0
|
33
|
-
- 0
|
34
|
-
version: 1.0.0
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.7.3
|
35
20
|
type: :runtime
|
36
|
-
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.7.3
|
37
27
|
description:
|
38
28
|
email: masaya.yamauchi@gmail.com
|
39
29
|
executables: []
|
40
|
-
|
41
30
|
extensions: []
|
42
|
-
|
43
|
-
extra_rdoc_files:
|
44
|
-
- README
|
45
|
-
files:
|
31
|
+
extra_rdoc_files:
|
46
32
|
- README
|
33
|
+
files:
|
47
34
|
- ChangeLog
|
35
|
+
- README
|
48
36
|
- lib/clickclient_scrap.rb
|
49
37
|
- lib/jiji_plugin.rb
|
50
|
-
- spec/cancel_order_spec.rb
|
51
|
-
- spec/common.rb
|
52
|
-
- spec/jiji_plugin_daily_spec.rb
|
53
|
-
- spec/jiji_plugin_spec!.rb
|
54
|
-
- spec/limit_order_spec.rb
|
55
|
-
- spec/list_orders_spec.rb
|
56
|
-
- spec/market_order_spec!.rb
|
57
|
-
- spec/oco_order_spec.rb
|
58
|
-
- spec/order_error_spec.rb
|
59
38
|
- sample/constants.rb
|
60
39
|
- sample/sample_get_margin.rb
|
61
40
|
- sample/sample_list_open_interests.rb
|
@@ -65,42 +44,42 @@ files:
|
|
65
44
|
- sample/sample_oco_order.rb
|
66
45
|
- sample/sample_order.rb
|
67
46
|
- sample/sample_settle.rb
|
68
|
-
|
47
|
+
- spec/cancel_order_spec.rb
|
48
|
+
- spec/common.rb
|
49
|
+
- spec/jiji_plugin_daily_spec.rb
|
50
|
+
- spec/jiji_plugin_spec!.rb
|
51
|
+
- spec/limit_order_spec.rb
|
52
|
+
- spec/list_orders_spec.rb
|
53
|
+
- spec/market_order_spec!.rb
|
54
|
+
- spec/oco_order_spec.rb
|
55
|
+
- spec/order_error_spec.rb
|
69
56
|
homepage: http://github.com/unageanu/clickclient_scrap/tree/master
|
70
|
-
licenses:
|
71
|
-
|
57
|
+
licenses:
|
58
|
+
- MIT
|
59
|
+
metadata: {}
|
72
60
|
post_install_message:
|
73
|
-
rdoc_options:
|
74
|
-
- --main
|
61
|
+
rdoc_options:
|
62
|
+
- "--main"
|
75
63
|
- README
|
76
|
-
require_paths:
|
64
|
+
require_paths:
|
77
65
|
- lib
|
78
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
-
|
80
|
-
requirements:
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
81
68
|
- - ">="
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
version: "0"
|
87
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
|
-
requirements:
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
90
73
|
- - ">="
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
|
93
|
-
segments:
|
94
|
-
- 0
|
95
|
-
version: "0"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
96
76
|
requirements: []
|
97
|
-
|
98
77
|
rubyforge_project:
|
99
|
-
rubygems_version:
|
78
|
+
rubygems_version: 2.2.2
|
100
79
|
signing_key:
|
101
|
-
specification_version:
|
80
|
+
specification_version: 4
|
102
81
|
summary: click securities client library for ruby.
|
103
|
-
test_files:
|
82
|
+
test_files:
|
104
83
|
- spec/cancel_order_spec.rb
|
105
84
|
- spec/common.rb
|
106
85
|
- spec/jiji_plugin_daily_spec.rb
|