schwab_rb 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/schwab_rb/clients/base_client.rb +98 -70
- data/lib/schwab_rb/clients/client.rb +17 -0
- data/lib/schwab_rb/orders/iron_condor_order.rb +103 -0
- data/lib/schwab_rb/orders/order_factory.rb +51 -0
- data/lib/schwab_rb/orders/single_order.rb +54 -0
- data/lib/schwab_rb/orders/vertical_order.rb +77 -0
- data/lib/schwab_rb/version.rb +1 -1
- data/lib/schwab_rb.rb +4 -0
- metadata +6 -3
- data/.rspec_status +0 -321
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 286e74e6bfe86be042b8863bbbc302e62eaca061d7640ae08bc5dd7f4d73528a
|
4
|
+
data.tar.gz: a75283f71dd0a09aedb78362b82242c6344c0003b66c38d68d9bcce3f4c26a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41f2a377bc7a7ba4896e0628f3573e6bb06d1c34d1a5f4822dab5d4ed69d32cfb9346f10e880576ea0e09462bdccfbbe7315ce6f9889a6092535083d693d8571
|
7
|
+
data.tar.gz: c982d20399c1bdf9bccb19c45fdf7a0d6c5fe121c4c3a59512f171a0bd2b4a603ace02108c1c4d9749bd499dd5cd56d2746e9a0c16259eec4ef37bf1b27feef4
|
@@ -555,11 +555,14 @@ module SchwabRb
|
|
555
555
|
end
|
556
556
|
end
|
557
557
|
|
558
|
-
def get_price_history_every_minute(
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
558
|
+
def get_price_history_every_minute(
|
559
|
+
symbol,
|
560
|
+
start_datetime: nil,
|
561
|
+
end_datetime: nil,
|
562
|
+
need_extended_hours_data: nil,
|
563
|
+
need_previous_close: nil,
|
564
|
+
return_data_objects: true
|
565
|
+
)
|
563
566
|
refresh_token_if_needed
|
564
567
|
|
565
568
|
start_datetime, end_datetime = normalize_start_and_end_datetimes(
|
@@ -568,22 +571,26 @@ module SchwabRb
|
|
568
571
|
|
569
572
|
get_price_history(
|
570
573
|
symbol,
|
571
|
-
period_type: SchwabRb::PriceHistory::
|
572
|
-
period: SchwabRb::PriceHistory::
|
573
|
-
frequency_type: SchwabRb::PriceHistory::
|
574
|
-
frequency: SchwabRb::PriceHistory::
|
574
|
+
period_type: SchwabRb::PriceHistory::PeriodTypes::DAY,
|
575
|
+
period: SchwabRb::PriceHistory::Periods::ONE_DAY,
|
576
|
+
frequency_type: SchwabRb::PriceHistory::FrequencyTypes::MINUTE,
|
577
|
+
frequency: SchwabRb::PriceHistory::Frequencies::EVERY_MINUTE,
|
575
578
|
start_datetime: start_datetime,
|
576
579
|
end_datetime: end_datetime,
|
577
580
|
need_extended_hours_data: need_extended_hours_data,
|
578
|
-
need_previous_close: need_previous_close
|
581
|
+
need_previous_close: need_previous_close,
|
582
|
+
return_data_objects: return_data_objects
|
579
583
|
)
|
580
584
|
end
|
581
585
|
|
582
|
-
def get_price_history_every_five_minutes(
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
586
|
+
def get_price_history_every_five_minutes(
|
587
|
+
symbol,
|
588
|
+
start_datetime: nil,
|
589
|
+
end_datetime: nil,
|
590
|
+
need_extended_hours_data: nil,
|
591
|
+
need_previous_close: nil,
|
592
|
+
return_data_objects: true
|
593
|
+
)
|
587
594
|
refresh_token_if_needed
|
588
595
|
|
589
596
|
start_datetime, end_datetime = normalize_start_and_end_datetimes(
|
@@ -592,22 +599,26 @@ module SchwabRb
|
|
592
599
|
|
593
600
|
get_price_history(
|
594
601
|
symbol,
|
595
|
-
period_type: SchwabRb::PriceHistory::
|
596
|
-
period: SchwabRb::PriceHistory::
|
597
|
-
frequency_type: SchwabRb::PriceHistory::
|
598
|
-
frequency: SchwabRb::PriceHistory::
|
602
|
+
period_type: SchwabRb::PriceHistory::PeriodTypes::DAY,
|
603
|
+
period: SchwabRb::PriceHistory::Periods::ONE_DAY,
|
604
|
+
frequency_type: SchwabRb::PriceHistory::FrequencyTypes::MINUTE,
|
605
|
+
frequency: SchwabRb::PriceHistory::Frequencies::EVERY_FIVE_MINUTES,
|
599
606
|
start_datetime: start_datetime,
|
600
607
|
end_datetime: end_datetime,
|
601
608
|
need_extended_hours_data: need_extended_hours_data,
|
602
|
-
need_previous_close: need_previous_close
|
609
|
+
need_previous_close: need_previous_close,
|
610
|
+
return_data_objects: return_data_objects
|
603
611
|
)
|
604
612
|
end
|
605
613
|
|
606
|
-
def get_price_history_every_ten_minutes(
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
614
|
+
def get_price_history_every_ten_minutes(
|
615
|
+
symbol,
|
616
|
+
start_datetime: nil,
|
617
|
+
end_datetime: nil,
|
618
|
+
need_extended_hours_data: nil,
|
619
|
+
need_previous_close: nil,
|
620
|
+
return_data_objects: true
|
621
|
+
)
|
611
622
|
refresh_token_if_needed
|
612
623
|
|
613
624
|
start_datetime, end_datetime = normalize_start_and_end_datetimes(
|
@@ -616,22 +627,26 @@ module SchwabRb
|
|
616
627
|
|
617
628
|
get_price_history(
|
618
629
|
symbol,
|
619
|
-
period_type: SchwabRb::PriceHistory::
|
620
|
-
period: SchwabRb::PriceHistory::
|
621
|
-
frequency_type: SchwabRb::PriceHistory::
|
622
|
-
frequency: SchwabRb::PriceHistory::
|
630
|
+
period_type: SchwabRb::PriceHistory::PeriodTypes::DAY,
|
631
|
+
period: SchwabRb::PriceHistory::Periods::ONE_DAY,
|
632
|
+
frequency_type: SchwabRb::PriceHistory::FrequencyTypes::MINUTE,
|
633
|
+
frequency: SchwabRb::PriceHistory::Frequencies::EVERY_TEN_MINUTES,
|
623
634
|
start_datetime: start_datetime,
|
624
635
|
end_datetime: end_datetime,
|
625
636
|
need_extended_hours_data: need_extended_hours_data,
|
626
|
-
need_previous_close: need_previous_close
|
637
|
+
need_previous_close: need_previous_close,
|
638
|
+
return_data_objects: return_data_objects
|
627
639
|
)
|
628
640
|
end
|
629
641
|
|
630
|
-
def get_price_history_every_fifteen_minutes(
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
642
|
+
def get_price_history_every_fifteen_minutes(
|
643
|
+
symbol,
|
644
|
+
start_datetime: nil,
|
645
|
+
end_datetime: nil,
|
646
|
+
need_extended_hours_data: nil,
|
647
|
+
need_previous_close: nil,
|
648
|
+
return_data_objects: true
|
649
|
+
)
|
635
650
|
refresh_token_if_needed
|
636
651
|
|
637
652
|
start_datetime, end_datetime = normalize_start_and_end_datetimes(
|
@@ -640,22 +655,26 @@ module SchwabRb
|
|
640
655
|
|
641
656
|
get_price_history(
|
642
657
|
symbol,
|
643
|
-
period_type: SchwabRb::PriceHistory::
|
644
|
-
period: SchwabRb::PriceHistory::
|
645
|
-
frequency_type: SchwabRb::PriceHistory::
|
646
|
-
frequency: SchwabRb::PriceHistory::
|
658
|
+
period_type: SchwabRb::PriceHistory::PeriodTypes::DAY,
|
659
|
+
period: SchwabRb::PriceHistory::Periods::ONE_DAY,
|
660
|
+
frequency_type: SchwabRb::PriceHistory::FrequencyTypes::MINUTE,
|
661
|
+
frequency: SchwabRb::PriceHistory::Frequencies::EVERY_FIFTEEN_MINUTES,
|
647
662
|
start_datetime: start_datetime,
|
648
663
|
end_datetime: end_datetime,
|
649
664
|
need_extended_hours_data: need_extended_hours_data,
|
650
|
-
need_previous_close: need_previous_close
|
665
|
+
need_previous_close: need_previous_close,
|
666
|
+
return_data_objects: return_data_objects
|
651
667
|
)
|
652
668
|
end
|
653
669
|
|
654
|
-
def get_price_history_every_thirty_minutes(
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
670
|
+
def get_price_history_every_thirty_minutes(
|
671
|
+
symbol,
|
672
|
+
start_datetime: nil,
|
673
|
+
end_datetime: nil,
|
674
|
+
need_extended_hours_data: nil,
|
675
|
+
need_previous_close: nil,
|
676
|
+
return_data_objects: true
|
677
|
+
)
|
659
678
|
refresh_token_if_needed
|
660
679
|
|
661
680
|
start_datetime, end_datetime = normalize_start_and_end_datetimes(
|
@@ -664,22 +683,26 @@ module SchwabRb
|
|
664
683
|
|
665
684
|
get_price_history(
|
666
685
|
symbol,
|
667
|
-
period_type: SchwabRb::PriceHistory::
|
668
|
-
period: SchwabRb::PriceHistory::
|
669
|
-
frequency_type: SchwabRb::PriceHistory::
|
670
|
-
frequency: SchwabRb::PriceHistory::
|
686
|
+
period_type: SchwabRb::PriceHistory::PeriodTypes::DAY,
|
687
|
+
period: SchwabRb::PriceHistory::Periods::ONE_DAY,
|
688
|
+
frequency_type: SchwabRb::PriceHistory::FrequencyTypes::MINUTE,
|
689
|
+
frequency: SchwabRb::PriceHistory::Frequencies::EVERY_THIRTY_MINUTES,
|
671
690
|
start_datetime: start_datetime,
|
672
691
|
end_datetime: end_datetime,
|
673
692
|
need_extended_hours_data: need_extended_hours_data,
|
674
|
-
need_previous_close: need_previous_close
|
693
|
+
need_previous_close: need_previous_close,
|
694
|
+
return_data_objects: return_data_objects
|
675
695
|
)
|
676
696
|
end
|
677
697
|
|
678
|
-
def get_price_history_every_day(
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
698
|
+
def get_price_history_every_day(
|
699
|
+
symbol,
|
700
|
+
start_datetime: nil,
|
701
|
+
end_datetime: nil,
|
702
|
+
need_extended_hours_data: nil,
|
703
|
+
need_previous_close: nil,
|
704
|
+
return_data_objects: true
|
705
|
+
)
|
683
706
|
refresh_token_if_needed
|
684
707
|
|
685
708
|
start_datetime, end_datetime = normalize_start_and_end_datetimes(
|
@@ -688,22 +711,26 @@ module SchwabRb
|
|
688
711
|
|
689
712
|
get_price_history(
|
690
713
|
symbol,
|
691
|
-
period_type: SchwabRb::PriceHistory::
|
692
|
-
period: SchwabRb::PriceHistory::
|
693
|
-
frequency_type: SchwabRb::PriceHistory::
|
694
|
-
frequency: SchwabRb::PriceHistory::
|
714
|
+
period_type: SchwabRb::PriceHistory::PeriodTypes::YEAR,
|
715
|
+
period: SchwabRb::PriceHistory::Periods::TWENTY_YEARS,
|
716
|
+
frequency_type: SchwabRb::PriceHistory::FrequencyTypes::DAILY,
|
717
|
+
frequency: SchwabRb::PriceHistory::FrequencyTypes::EVERY_MINUTE,
|
695
718
|
start_datetime: start_datetime,
|
696
719
|
end_datetime: end_datetime,
|
697
720
|
need_extended_hours_data: need_extended_hours_data,
|
698
|
-
need_previous_close: need_previous_close
|
721
|
+
need_previous_close: need_previous_close,
|
722
|
+
return_data_objects: return_data_objects
|
699
723
|
)
|
700
724
|
end
|
701
725
|
|
702
|
-
def get_price_history_every_week(
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
726
|
+
def get_price_history_every_week(
|
727
|
+
symbol,
|
728
|
+
start_datetime: nil,
|
729
|
+
end_datetime: nil,
|
730
|
+
need_extended_hours_data: nil,
|
731
|
+
need_previous_close: nil,
|
732
|
+
return_data_objects: true
|
733
|
+
)
|
707
734
|
refresh_token_if_needed
|
708
735
|
|
709
736
|
start_datetime, end_datetime = normalize_start_and_end_datetimes(
|
@@ -712,14 +739,15 @@ module SchwabRb
|
|
712
739
|
|
713
740
|
get_price_history(
|
714
741
|
symbol,
|
715
|
-
period_type: SchwabRb::PriceHistory::
|
716
|
-
period: SchwabRb::PriceHistory::
|
717
|
-
frequency_type: SchwabRb::PriceHistory::
|
718
|
-
frequency: SchwabRb::PriceHistory::
|
742
|
+
period_type: SchwabRb::PriceHistory::PeriodTypes::YEAR,
|
743
|
+
period: SchwabRb::PriceHistory::Periods::TWENTY_YEARS,
|
744
|
+
frequency_type: SchwabRb::PriceHistory::FrequencyTypes::WEEKLY,
|
745
|
+
frequency: SchwabRb::PriceHistory::FrequencyTypes::EVERY_MINUTE,
|
719
746
|
start_datetime: start_datetime,
|
720
747
|
end_datetime: end_datetime,
|
721
748
|
need_extended_hours_data: need_extended_hours_data,
|
722
|
-
need_previous_close: need_previous_close
|
749
|
+
need_previous_close: need_previous_close,
|
750
|
+
return_data_objects: return_data_objects
|
723
751
|
)
|
724
752
|
end
|
725
753
|
|
@@ -23,6 +23,9 @@ module SchwabRb
|
|
23
23
|
|
24
24
|
log_response(response, req_num)
|
25
25
|
response
|
26
|
+
rescue StandardError => e
|
27
|
+
log_error(e, req_num)
|
28
|
+
raise e
|
26
29
|
end
|
27
30
|
|
28
31
|
def post(path, data = {})
|
@@ -40,6 +43,9 @@ module SchwabRb
|
|
40
43
|
)
|
41
44
|
log_response(response, req_num)
|
42
45
|
response
|
46
|
+
rescue StandardError => e
|
47
|
+
log_error(e, req_num)
|
48
|
+
raise e
|
43
49
|
end
|
44
50
|
|
45
51
|
def put(path, data = {})
|
@@ -57,6 +63,9 @@ module SchwabRb
|
|
57
63
|
)
|
58
64
|
log_response(response, req_num)
|
59
65
|
response
|
66
|
+
rescue StandardError => e
|
67
|
+
log_error(e, req_num)
|
68
|
+
raise e
|
60
69
|
end
|
61
70
|
|
62
71
|
def delete(path)
|
@@ -68,6 +77,9 @@ module SchwabRb
|
|
68
77
|
response = session.delete(dest)
|
69
78
|
log_response(response, req_num)
|
70
79
|
response
|
80
|
+
rescue StandardError => e
|
81
|
+
log_error(e, req_num)
|
82
|
+
raise e
|
71
83
|
end
|
72
84
|
|
73
85
|
def log_request(method, req_num, dest, data = nil)
|
@@ -89,6 +101,11 @@ module SchwabRb
|
|
89
101
|
SchwabRb::Logger.logger.debug("Response body: #{JSON.pretty_generate(redacted_body)}") if redacted_body
|
90
102
|
end
|
91
103
|
|
104
|
+
def log_error(error, req_num)
|
105
|
+
SchwabRb::Logger.logger.error("Req #{req_num}: Error - #{error.message}")
|
106
|
+
SchwabRb::Logger.logger.debug("Backtrace: #{error.backtrace.join("\n")}")
|
107
|
+
end
|
108
|
+
|
92
109
|
def req_num
|
93
110
|
@request_counter ||= 0
|
94
111
|
@request_counter += 1
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'schwab_rb'
|
4
|
+
|
5
|
+
module SchwabRb
|
6
|
+
module Orders
|
7
|
+
class IronCondorOrder
|
8
|
+
class << self
|
9
|
+
def build(
|
10
|
+
account_number:,
|
11
|
+
put_short_symbol:,
|
12
|
+
put_long_symbol:,
|
13
|
+
call_short_symbol:,
|
14
|
+
call_long_symbol:,
|
15
|
+
price:,
|
16
|
+
credit_debit: :credit,
|
17
|
+
order_instruction: :open,
|
18
|
+
quantity: 1
|
19
|
+
)
|
20
|
+
schwab_order_builder.new.tap do |builder|
|
21
|
+
builder.set_account_number(account_number)
|
22
|
+
builder.set_order_strategy_type('SINGLE')
|
23
|
+
builder.set_session(SchwabRb::Orders::Session::NORMAL)
|
24
|
+
builder.set_duration(SchwabRb::Orders::Duration::DAY)
|
25
|
+
builder.set_order_type(order_type(credit_debit))
|
26
|
+
builder.set_complex_order_strategy_type(SchwabRb::Order::ComplexOrderStrategyTypes::IRON_CONDOR)
|
27
|
+
builder.set_quantity(quantity)
|
28
|
+
builder.set_price(price)
|
29
|
+
|
30
|
+
instructions = leg_instructions_for_position(order_instruction, credit_debit)
|
31
|
+
|
32
|
+
builder.add_option_leg(
|
33
|
+
instructions[:put_short],
|
34
|
+
put_short_symbol,
|
35
|
+
quantity
|
36
|
+
)
|
37
|
+
builder.add_option_leg(
|
38
|
+
instructions[:put_long],
|
39
|
+
put_long_symbol,
|
40
|
+
quantity
|
41
|
+
)
|
42
|
+
builder.add_option_leg(
|
43
|
+
instructions[:call_short],
|
44
|
+
call_short_symbol,
|
45
|
+
quantity
|
46
|
+
)
|
47
|
+
builder.add_option_leg(
|
48
|
+
instructions[:call_long],
|
49
|
+
call_long_symbol,
|
50
|
+
quantity
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def order_type(credit_debit)
|
56
|
+
if credit_debit == :credit
|
57
|
+
SchwabRb::Order::Types::NET_CREDIT
|
58
|
+
else
|
59
|
+
SchwabRb::Order::Types::NET_DEBIT
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def leg_instructions_for_position(order_instruction, credit_debit)
|
64
|
+
if order_instruction == :open && credit_debit == :credit
|
65
|
+
{
|
66
|
+
put_short: SchwabRb::Orders::OptionInstructions::SELL_TO_OPEN,
|
67
|
+
put_long: SchwabRb::Orders::OptionInstructions::BUY_TO_OPEN,
|
68
|
+
call_short: SchwabRb::Orders::OptionInstructions::SELL_TO_OPEN,
|
69
|
+
call_long: SchwabRb::Orders::OptionInstructions::BUY_TO_OPEN
|
70
|
+
}
|
71
|
+
elsif order_instruction == :open && credit_debit == :debit
|
72
|
+
{
|
73
|
+
put_short: SchwabRb::Orders::OptionInstructions::BUY_TO_OPEN,
|
74
|
+
put_long: SchwabRb::Orders::OptionInstructions::SELL_TO_OPEN,
|
75
|
+
call_short: SchwabRb::Orders::OptionInstructions::BUY_TO_OPEN,
|
76
|
+
call_long: SchwabRb::Orders::OptionInstructions::SELL_TO_OPEN
|
77
|
+
}
|
78
|
+
elsif order_instruction == :close && credit_debit == :credit
|
79
|
+
{
|
80
|
+
put_short: SchwabRb::Orders::OptionInstructions::BUY_TO_CLOSE,
|
81
|
+
put_long: SchwabRb::Orders::OptionInstructions::SELL_TO_CLOSE,
|
82
|
+
call_short: SchwabRb::Orders::OptionInstructions::BUY_TO_CLOSE,
|
83
|
+
call_long: SchwabRb::Orders::OptionInstructions::SELL_TO_CLOSE
|
84
|
+
}
|
85
|
+
elsif order_instruction == :close && credit_debit == :debit
|
86
|
+
{
|
87
|
+
put_short: SchwabRb::Orders::OptionInstructions::SELL_TO_CLOSE,
|
88
|
+
put_long: SchwabRb::Orders::OptionInstructions::BUY_TO_CLOSE,
|
89
|
+
call_short: SchwabRb::Orders::OptionInstructions::SELL_TO_CLOSE,
|
90
|
+
call_long: SchwabRb::Orders::OptionInstructions::BUY_TO_CLOSE
|
91
|
+
}
|
92
|
+
else
|
93
|
+
raise "Unsupported order instruction: #{order_instruction} with credit/debit: #{credit_debit}"
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def schwab_order_builder
|
98
|
+
SchwabRb::Orders::Builder
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'iron_condor_order'
|
4
|
+
require_relative 'vertical_order'
|
5
|
+
require_relative 'single_order'
|
6
|
+
|
7
|
+
module SchwabRb
|
8
|
+
module Orders
|
9
|
+
class OrderFactory
|
10
|
+
class << self
|
11
|
+
def build(**options)
|
12
|
+
case options[:strategy_type] || 'none'
|
13
|
+
when 'ironcondor'
|
14
|
+
IronCondorOrder.build(
|
15
|
+
put_short_symbol: options[:put_short_symbol],
|
16
|
+
put_long_symbol: options[:put_long_symbol],
|
17
|
+
call_short_symbol: options[:call_short_symbol],
|
18
|
+
call_long_symbol: options[:call_long_symbol],
|
19
|
+
price: options[:price],
|
20
|
+
account_number: options[:account_number],
|
21
|
+
credit_debit: options[:credit_debit] || :credit,
|
22
|
+
order_instruction: options[:order_instruction] || :open,
|
23
|
+
quantity: options[:quantity] || 1
|
24
|
+
)
|
25
|
+
when 'vertical' # call or put spreads
|
26
|
+
VerticalOrder.build(
|
27
|
+
short_leg_symbol: options[:short_leg_symbol],
|
28
|
+
long_leg_symbol: options[:long_leg_symbol],
|
29
|
+
price: options[:price],
|
30
|
+
account_number: options[:account_number],
|
31
|
+
credit_debit: options[:credit_debit] || :credit,
|
32
|
+
order_instruction: options[:order_instruction] || :open,
|
33
|
+
quantity: options[:quantity] || 1
|
34
|
+
)
|
35
|
+
when 'single'
|
36
|
+
SingleOrder.build(
|
37
|
+
symbol: options[:symbol],
|
38
|
+
price: options[:price],
|
39
|
+
account_number: options[:account_number],
|
40
|
+
credit_debit: options[:credit_debit] || :credit,
|
41
|
+
order_instruction: options[:order_instruction] || :open,
|
42
|
+
quantity: options[:quantity] || 1
|
43
|
+
)
|
44
|
+
else
|
45
|
+
raise "Unsupported trade strategy: #{options[:strategy_type] || 'none'}"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'schwab_rb'
|
4
|
+
|
5
|
+
module SchwabRb
|
6
|
+
module Orders
|
7
|
+
class SingleOrder
|
8
|
+
class << self
|
9
|
+
def build(symbol:, price:, account_number:, credit_debit: :credit, order_instruction: :open, quantity: 1)
|
10
|
+
schwab_order_builder.new.tap do |builder|
|
11
|
+
builder.set_account_number(account_number)
|
12
|
+
builder.set_order_strategy_type('SINGLE')
|
13
|
+
builder.set_session(SchwabRb::Orders::Session::NORMAL)
|
14
|
+
builder.set_duration(SchwabRb::Orders::Duration::DAY)
|
15
|
+
builder.set_order_type(order_type(credit_debit))
|
16
|
+
builder.set_quantity(quantity)
|
17
|
+
builder.set_price(price)
|
18
|
+
builder.add_option_leg(
|
19
|
+
leg_instruction(order_instruction, credit_debit),
|
20
|
+
symbol,
|
21
|
+
quantity
|
22
|
+
)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def order_type(credit_debit)
|
27
|
+
if credit_debit == :credit
|
28
|
+
SchwabRb::Order::Types::NET_CREDIT
|
29
|
+
else
|
30
|
+
SchwabRb::Order::Types::NET_DEBIT
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def leg_instruction(order_instruction, credit_debit)
|
35
|
+
if order_instruction == :open && credit_debit == :credit
|
36
|
+
SchwabRb::Orders::OptionInstructions::SELL_TO_OPEN
|
37
|
+
elsif order_instruction == :open && credit_debit == :debit
|
38
|
+
SchwabRb::Orders::OptionInstructions::BUY_TO_OPEN
|
39
|
+
elsif order_instruction == :close && credit_debit == :debit
|
40
|
+
SchwabRb::Orders::OptionInstructions::BUY_TO_CLOSE
|
41
|
+
elsif order_instruction == :close && credit_debit == :credit
|
42
|
+
SchwabRb::Orders::OptionInstructions::SELL_TO_CLOSE
|
43
|
+
else
|
44
|
+
raise "Unsupported order instruction: #{order_instruction} with credit/debit: #{credit_debit}"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def schwab_order_builder
|
49
|
+
SchwabRb::Orders::Builder
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'schwab_rb'
|
4
|
+
|
5
|
+
module SchwabRb
|
6
|
+
module Orders
|
7
|
+
class VerticalOrder
|
8
|
+
class << self
|
9
|
+
def build(
|
10
|
+
short_leg_symbol:, long_leg_symbol:, price:,
|
11
|
+
account_number:, credit_debit: :credit, order_instruction: :open, quantity: 1
|
12
|
+
)
|
13
|
+
schwab_order_builder.new.tap do |builder|
|
14
|
+
builder.set_account_number(account_number)
|
15
|
+
builder.set_order_strategy_type('SINGLE')
|
16
|
+
builder.set_session(SchwabRb::Orders::Session::NORMAL)
|
17
|
+
builder.set_duration(SchwabRb::Orders::Duration::DAY)
|
18
|
+
builder.set_order_type(order_type(credit_debit))
|
19
|
+
builder.set_complex_order_strategy_type(SchwabRb::Order::ComplexOrderStrategyTypes::VERTICAL)
|
20
|
+
builder.set_quantity(quantity)
|
21
|
+
builder.set_price(price)
|
22
|
+
builder.add_option_leg(
|
23
|
+
short_leg_instruction(order_instruction, credit_debit),
|
24
|
+
short_leg_symbol,
|
25
|
+
quantity
|
26
|
+
)
|
27
|
+
builder.add_option_leg(
|
28
|
+
long_leg_instruction(order_instruction, credit_debit),
|
29
|
+
long_leg_symbol,
|
30
|
+
quantity
|
31
|
+
)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def order_type(credit_debit)
|
36
|
+
if credit_debit == :credit
|
37
|
+
SchwabRb::Order::Types::NET_CREDIT
|
38
|
+
else
|
39
|
+
SchwabRb::Order::Types::NET_DEBIT
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def short_leg_instruction(order_instruction, credit_debit)
|
44
|
+
if order_instruction == :open && credit_debit == :credit
|
45
|
+
SchwabRb::Orders::OptionInstructions::SELL_TO_OPEN
|
46
|
+
elsif order_instruction == :open && credit_debit == :debit
|
47
|
+
SchwabRb::Orders::OptionInstructions::BUY_TO_OPEN
|
48
|
+
elsif order_instruction == :close && credit_debit == :credit
|
49
|
+
SchwabRb::Orders::OptionInstructions::SELL_TO_CLOSE
|
50
|
+
elsif order_instruction == :close && credit_debit == :debit
|
51
|
+
SchwabRb::Orders::OptionInstructions::BUY_TO_CLOSE
|
52
|
+
else
|
53
|
+
raise "Unsupported order instruction: #{order_instruction} with credit/debit: #{credit_debit}"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def long_leg_instruction(order_instruction, credit_debit)
|
58
|
+
if order_instruction == :open && credit_debit == :credit
|
59
|
+
SchwabRb::Orders::OptionInstructions::BUY_TO_OPEN
|
60
|
+
elsif order_instruction == :close && credit_debit == :credit
|
61
|
+
SchwabRb::Orders::OptionInstructions::SELL_TO_CLOSE
|
62
|
+
elsif order_instruction == :open && credit_debit == :debit
|
63
|
+
SchwabRb::Orders::OptionInstructions::SELL_TO_OPEN
|
64
|
+
elsif order_instruction == :close && credit_debit == :debit
|
65
|
+
SchwabRb::Orders::OptionInstructions::BUY_TO_CLOSE
|
66
|
+
else
|
67
|
+
raise "Unsupported order instruction: #{order_instruction} with credit/debit: #{credit_debit}"
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def schwab_order_builder
|
72
|
+
SchwabRb::Orders::Builder
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
data/lib/schwab_rb/version.rb
CHANGED
data/lib/schwab_rb.rb
CHANGED
@@ -43,6 +43,10 @@ require_relative "schwab_rb/data_objects/option_expiration_chain"
|
|
43
43
|
require_relative "schwab_rb/data_objects/price_history"
|
44
44
|
require_relative "schwab_rb/data_objects/market_hours"
|
45
45
|
require_relative "schwab_rb/data_objects/market_movers"
|
46
|
+
require_relative "schwab_rb/orders/order_factory"
|
47
|
+
require_relative "schwab_rb/orders/iron_condor_order"
|
48
|
+
require_relative "schwab_rb/orders/vertical_order"
|
49
|
+
require_relative "schwab_rb/orders/single_order"
|
46
50
|
|
47
51
|
module SchwabRb
|
48
52
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schwab_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joseph Platta
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-08-29 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: async
|
@@ -195,7 +195,6 @@ files:
|
|
195
195
|
- ".claude/settings.json"
|
196
196
|
- ".copilotignore"
|
197
197
|
- ".rspec"
|
198
|
-
- ".rspec_status"
|
199
198
|
- ".rubocop.yml"
|
200
199
|
- ".rubocop_todo.yml"
|
201
200
|
- CHANGELOG.md
|
@@ -246,16 +245,20 @@ files:
|
|
246
245
|
- lib/schwab_rb/orders/equity_instructions.rb
|
247
246
|
- lib/schwab_rb/orders/errors.rb
|
248
247
|
- lib/schwab_rb/orders/instruments.rb
|
248
|
+
- lib/schwab_rb/orders/iron_condor_order.rb
|
249
249
|
- lib/schwab_rb/orders/option_instructions.rb
|
250
250
|
- lib/schwab_rb/orders/order.rb
|
251
|
+
- lib/schwab_rb/orders/order_factory.rb
|
251
252
|
- lib/schwab_rb/orders/price_link_basis.rb
|
252
253
|
- lib/schwab_rb/orders/price_link_type.rb
|
253
254
|
- lib/schwab_rb/orders/session.rb
|
255
|
+
- lib/schwab_rb/orders/single_order.rb
|
254
256
|
- lib/schwab_rb/orders/special_instruction.rb
|
255
257
|
- lib/schwab_rb/orders/stop_price_link_basis.rb
|
256
258
|
- lib/schwab_rb/orders/stop_price_link_type.rb
|
257
259
|
- lib/schwab_rb/orders/stop_type.rb
|
258
260
|
- lib/schwab_rb/orders/tax_lot_method.rb
|
261
|
+
- lib/schwab_rb/orders/vertical_order.rb
|
259
262
|
- lib/schwab_rb/price_history.rb
|
260
263
|
- lib/schwab_rb/quote.rb
|
261
264
|
- lib/schwab_rb/transaction.rb
|
data/.rspec_status
DELETED
@@ -1,321 +0,0 @@
|
|
1
|
-
example_id | status | run_time |
|
2
|
-
------------------------------------------------------------- | ------- | --------------- |
|
3
|
-
./spec/account_spec.rb[1:1] | passed | 0.00106 seconds |
|
4
|
-
./spec/account_spec.rb[1:2] | passed | 0.00056 seconds |
|
5
|
-
./spec/auth/init_client_login_spec.rb[1:1:1] | passed | 0.00033 seconds |
|
6
|
-
./spec/auth/init_client_login_spec.rb[1:2:1] | pending | 0 seconds |
|
7
|
-
./spec/auth/init_client_token_file_spec.rb[1:1:1] | passed | 0.00028 seconds |
|
8
|
-
./spec/auth/login_flow_server_spec.rb[1:1] | pending | 0 seconds |
|
9
|
-
./spec/auth/token_manager_spec.rb[1:1] | passed | 0.00003 seconds |
|
10
|
-
./spec/clients/async_client_spec.rb[1:1:1] | passed | 0.00187 seconds |
|
11
|
-
./spec/clients/async_client_spec.rb[1:2:1] | passed | 0.00416 seconds |
|
12
|
-
./spec/clients/async_client_spec.rb[1:3:1] | passed | 0.0003 seconds |
|
13
|
-
./spec/clients/async_client_spec.rb[1:4:1] | passed | 0.00048 seconds |
|
14
|
-
./spec/clients/async_client_spec.rb[1:5:1] | passed | 0.00025 seconds |
|
15
|
-
./spec/clients/async_client_spec.rb[1:6:1] | passed | 0.00007 seconds |
|
16
|
-
./spec/clients/async_client_spec.rb[1:7:1] | passed | 0.00011 seconds |
|
17
|
-
./spec/clients/client_spec.rb[1:1] | passed | 0.00003 seconds |
|
18
|
-
./spec/clients/client_spec.rb[1:2:1] | passed | 0.00033 seconds |
|
19
|
-
./spec/clients/client_spec.rb[1:3:1] | passed | 0.00018 seconds |
|
20
|
-
./spec/clients/client_spec.rb[1:4:1] | passed | 0.00021 seconds |
|
21
|
-
./spec/clients/client_spec.rb[1:5:1] | passed | 0.00019 seconds |
|
22
|
-
./spec/clients/client_spec.rb[1:6:1] | passed | 0.00015 seconds |
|
23
|
-
./spec/clients/client_spec.rb[1:7:1] | passed | 0.00018 seconds |
|
24
|
-
./spec/clients/client_spec.rb[1:8:1] | passed | 0.00014 seconds |
|
25
|
-
./spec/clients/client_spec.rb[1:9:1] | passed | 0.00155 seconds |
|
26
|
-
./spec/clients/client_spec.rb[1:10:1] | passed | 0.00014 seconds |
|
27
|
-
./spec/clients/client_spec.rb[1:11:1] | passed | 0.00014 seconds |
|
28
|
-
./spec/clients/client_spec.rb[1:12:1] | passed | 0.002 seconds |
|
29
|
-
./spec/clients/client_spec.rb[1:13:1] | passed | 0.00021 seconds |
|
30
|
-
./spec/clients/client_spec.rb[1:14:1] | passed | 0.0004 seconds |
|
31
|
-
./spec/clients/client_spec.rb[1:14:2] | passed | 0.00015 seconds |
|
32
|
-
./spec/clients/client_spec.rb[1:14:3] | passed | 0.00018 seconds |
|
33
|
-
./spec/clients/client_spec.rb[1:17:1] | pending | 0.00001 seconds |
|
34
|
-
./spec/clients/client_spec.rb[1:22:1] | passed | 0.00016 seconds |
|
35
|
-
./spec/clients/client_spec.rb[1:23:1] | passed | 0.00005 seconds |
|
36
|
-
./spec/clients/client_spec.rb[1:24:1] | passed | 0.00004 seconds |
|
37
|
-
./spec/data_objects/account_numbers_spec.rb[1:1:1] | passed | 0.00034 seconds |
|
38
|
-
./spec/data_objects/account_numbers_spec.rb[1:2:1] | passed | 0.00005 seconds |
|
39
|
-
./spec/data_objects/account_numbers_spec.rb[1:2:2] | passed | 0.00005 seconds |
|
40
|
-
./spec/data_objects/account_numbers_spec.rb[1:3:1] | passed | 0.00005 seconds |
|
41
|
-
./spec/data_objects/account_numbers_spec.rb[1:3:2] | passed | 0.00059 seconds |
|
42
|
-
./spec/data_objects/account_numbers_spec.rb[1:4:1] | passed | 0.00004 seconds |
|
43
|
-
./spec/data_objects/account_numbers_spec.rb[1:4:2] | passed | 0.00004 seconds |
|
44
|
-
./spec/data_objects/account_numbers_spec.rb[1:5:1] | passed | 0.00079 seconds |
|
45
|
-
./spec/data_objects/account_numbers_spec.rb[1:6:1] | passed | 0.00005 seconds |
|
46
|
-
./spec/data_objects/account_numbers_spec.rb[1:7:1] | passed | 0.00004 seconds |
|
47
|
-
./spec/data_objects/account_numbers_spec.rb[1:8:1] | passed | 0.0003 seconds |
|
48
|
-
./spec/data_objects/account_numbers_spec.rb[1:8:2] | passed | 0.00003 seconds |
|
49
|
-
./spec/data_objects/account_numbers_spec.rb[1:9:1] | passed | 0.00061 seconds |
|
50
|
-
./spec/data_objects/account_numbers_spec.rb[1:10:1] | passed | 0.00009 seconds |
|
51
|
-
./spec/data_objects/account_numbers_spec.rb[1:11:1:1] | passed | 0.00004 seconds |
|
52
|
-
./spec/data_objects/account_numbers_spec.rb[1:11:2:1] | passed | 0.00003 seconds |
|
53
|
-
./spec/data_objects/account_spec.rb[1:1:1] | passed | 0.00065 seconds |
|
54
|
-
./spec/data_objects/instrument_spec.rb[1:1:1] | passed | 0.00021 seconds |
|
55
|
-
./spec/data_objects/instrument_spec.rb[1:1:2] | passed | 0.00021 seconds |
|
56
|
-
./spec/data_objects/instrument_spec.rb[1:2:1] | passed | 0.00005 seconds |
|
57
|
-
./spec/data_objects/instrument_spec.rb[1:2:2] | passed | 0.00004 seconds |
|
58
|
-
./spec/data_objects/instrument_spec.rb[2:1:1] | passed | 0.00004 seconds |
|
59
|
-
./spec/data_objects/instrument_spec.rb[2:2:1] | passed | 0.00004 seconds |
|
60
|
-
./spec/data_objects/instrument_spec.rb[3:1:1] | passed | 0.00005 seconds |
|
61
|
-
./spec/data_objects/instrument_spec.rb[3:2:1] | passed | 0.00004 seconds |
|
62
|
-
./spec/data_objects/market_hours_spec.rb[1:1:1] | passed | 0.0002 seconds |
|
63
|
-
./spec/data_objects/market_hours_spec.rb[1:2:1] | passed | 0.00005 seconds |
|
64
|
-
./spec/data_objects/market_hours_spec.rb[1:3:1] | passed | 0.00005 seconds |
|
65
|
-
./spec/data_objects/market_hours_spec.rb[1:4:1] | passed | 0.00004 seconds |
|
66
|
-
./spec/data_objects/market_hours_spec.rb[1:5:1] | passed | 0.00004 seconds |
|
67
|
-
./spec/data_objects/market_hours_spec.rb[1:6:1:1] | passed | 0.00021 seconds |
|
68
|
-
./spec/data_objects/market_hours_spec.rb[1:6:2:1] | passed | 0.00005 seconds |
|
69
|
-
./spec/data_objects/market_hours_spec.rb[1:6:3:1] | passed | 0.00005 seconds |
|
70
|
-
./spec/data_objects/market_movers_spec.rb[1:1:1] | passed | 0.00006 seconds |
|
71
|
-
./spec/data_objects/market_movers_spec.rb[1:1:2] | passed | 0.00004 seconds |
|
72
|
-
./spec/data_objects/market_movers_spec.rb[1:1:3] | passed | 0.00003 seconds |
|
73
|
-
./spec/data_objects/market_movers_spec.rb[2:1:1] | passed | 0.00006 seconds |
|
74
|
-
./spec/data_objects/market_movers_spec.rb[2:2:1] | passed | 0.00006 seconds |
|
75
|
-
./spec/data_objects/market_movers_spec.rb[2:3:1] | passed | 0.00006 seconds |
|
76
|
-
./spec/data_objects/market_movers_spec.rb[2:3:2] | passed | 0.00005 seconds |
|
77
|
-
./spec/data_objects/market_movers_spec.rb[2:4:1] | passed | 0.00005 seconds |
|
78
|
-
./spec/data_objects/market_movers_spec.rb[2:4:2] | passed | 0.00006 seconds |
|
79
|
-
./spec/data_objects/market_movers_spec.rb[2:5:1] | passed | 0.00016 seconds |
|
80
|
-
./spec/data_objects/market_movers_spec.rb[2:6:1] | passed | 0.00005 seconds |
|
81
|
-
./spec/data_objects/market_movers_spec.rb[3:1:1] | passed | 0.00004 seconds |
|
82
|
-
./spec/data_objects/market_movers_spec.rb[3:2:1] | passed | 0.00035 seconds |
|
83
|
-
./spec/data_objects/market_movers_spec.rb[3:2:2] | passed | 0.00003 seconds |
|
84
|
-
./spec/data_objects/market_movers_spec.rb[3:2:3] | passed | 0.00008 seconds |
|
85
|
-
./spec/data_objects/market_movers_spec.rb[3:3:1] | passed | 0.00008 seconds |
|
86
|
-
./spec/data_objects/market_movers_spec.rb[3:3:2] | passed | 0.00003 seconds |
|
87
|
-
./spec/data_objects/market_movers_spec.rb[3:3:3] | passed | 0.00002 seconds |
|
88
|
-
./spec/data_objects/market_movers_spec.rb[3:4:1] | passed | 0.00002 seconds |
|
89
|
-
./spec/data_objects/market_movers_spec.rb[3:4:2] | passed | 0.00002 seconds |
|
90
|
-
./spec/data_objects/market_movers_spec.rb[3:4:3] | passed | 0.00002 seconds |
|
91
|
-
./spec/data_objects/market_movers_spec.rb[3:5:1] | passed | 0.00002 seconds |
|
92
|
-
./spec/data_objects/market_movers_spec.rb[3:5:2] | passed | 0.00002 seconds |
|
93
|
-
./spec/data_objects/market_movers_spec.rb[3:5:3] | passed | 0.00002 seconds |
|
94
|
-
./spec/data_objects/market_movers_spec.rb[3:6:1] | passed | 0.00003 seconds |
|
95
|
-
./spec/data_objects/market_movers_spec.rb[3:7:1] | passed | 0.00004 seconds |
|
96
|
-
./spec/data_objects/option_chain_spec.rb[1:1:1] | passed | 0.01721 seconds |
|
97
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:1:1] | passed | 0.00038 seconds |
|
98
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:2:1] | passed | 0.00013 seconds |
|
99
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:2:2] | passed | 0.00004 seconds |
|
100
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:3:1] | passed | 0.00012 seconds |
|
101
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:3:2] | passed | 0.00011 seconds |
|
102
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:4:1] | passed | 0.00007 seconds |
|
103
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:4:2] | passed | 0.00009 seconds |
|
104
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:4:3] | passed | 0.00008 seconds |
|
105
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:5:1] | passed | 0.00008 seconds |
|
106
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:5:2] | passed | 0.00008 seconds |
|
107
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:6:1] | passed | 0.00102 seconds |
|
108
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:7:1] | passed | 0.00008 seconds |
|
109
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:8:1] | passed | 0.00007 seconds |
|
110
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:9:1] | passed | 0.0001 seconds |
|
111
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:10:1] | passed | 0.00007 seconds |
|
112
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:11:1] | passed | 0.00007 seconds |
|
113
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:12:1] | passed | 0.00006 seconds |
|
114
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:12:2] | passed | 0.00003 seconds |
|
115
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:13:1] | passed | 0.00011 seconds |
|
116
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:13:2] | passed | 0.00007 seconds |
|
117
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:14:1] | passed | 0.00007 seconds |
|
118
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:14:2] | passed | 0.00006 seconds |
|
119
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:1:1] | passed | 0.00004 seconds |
|
120
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:2:1] | passed | 0.00004 seconds |
|
121
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:3:1] | passed | 0.00005 seconds |
|
122
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:3:2] | passed | 0.00003 seconds |
|
123
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:4:1] | passed | 0.00002 seconds |
|
124
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:4:2] | passed | 0.00002 seconds |
|
125
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:4:3] | passed | 0.00003 seconds |
|
126
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:4:4] | passed | 0.00002 seconds |
|
127
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:5:1] | passed | 0.00004 seconds |
|
128
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:5:2] | passed | 0.00003 seconds |
|
129
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:6:1] | passed | 0.00003 seconds |
|
130
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:7:1] | passed | 0.00003 seconds |
|
131
|
-
./spec/data_objects/option_expiration_chain_spec.rb[1:15:8:1] | passed | 0.00003 seconds |
|
132
|
-
./spec/data_objects/order_leg_spec.rb[1:1:1] | passed | 0.00036 seconds |
|
133
|
-
./spec/data_objects/order_leg_spec.rb[1:2:1] | passed | 0.00015 seconds |
|
134
|
-
./spec/data_objects/order_preview_spec.rb[1:1:1] | passed | 0.00007 seconds |
|
135
|
-
./spec/data_objects/order_preview_spec.rb[1:2:1] | passed | 0.00005 seconds |
|
136
|
-
./spec/data_objects/order_preview_spec.rb[1:2:2] | passed | 0.00005 seconds |
|
137
|
-
./spec/data_objects/order_preview_spec.rb[1:2:3] | passed | 0.00003 seconds |
|
138
|
-
./spec/data_objects/order_preview_spec.rb[1:2:4] | passed | 0.00003 seconds |
|
139
|
-
./spec/data_objects/order_preview_spec.rb[1:2:5] | passed | 0.00004 seconds |
|
140
|
-
./spec/data_objects/order_preview_spec.rb[1:2:6] | passed | 0.00004 seconds |
|
141
|
-
./spec/data_objects/order_preview_spec.rb[1:3:1] | passed | 0.00004 seconds |
|
142
|
-
./spec/data_objects/order_preview_spec.rb[1:4:1] | passed | 0.00004 seconds |
|
143
|
-
./spec/data_objects/order_preview_spec.rb[1:4:2] | passed | 0.00005 seconds |
|
144
|
-
./spec/data_objects/order_preview_spec.rb[1:5:1:1] | passed | 0.00005 seconds |
|
145
|
-
./spec/data_objects/order_preview_spec.rb[1:5:1:2] | passed | 0.00004 seconds |
|
146
|
-
./spec/data_objects/order_preview_spec.rb[1:5:2:1] | passed | 0.00004 seconds |
|
147
|
-
./spec/data_objects/order_preview_spec.rb[1:5:2:2] | passed | 0.00003 seconds |
|
148
|
-
./spec/data_objects/order_preview_spec.rb[1:5:3:1] | passed | 0.00004 seconds |
|
149
|
-
./spec/data_objects/order_preview_spec.rb[1:5:3:2] | passed | 0.00004 seconds |
|
150
|
-
./spec/data_objects/order_preview_spec.rb[1:5:4:1] | passed | 0.00004 seconds |
|
151
|
-
./spec/data_objects/order_preview_spec.rb[1:5:4:2] | passed | 0.00004 seconds |
|
152
|
-
./spec/data_objects/order_preview_spec.rb[1:6:1:1] | passed | 0.00004 seconds |
|
153
|
-
./spec/data_objects/order_preview_spec.rb[1:6:1:2] | passed | 0.00003 seconds |
|
154
|
-
./spec/data_objects/order_preview_spec.rb[1:6:2:1] | passed | 0.00003 seconds |
|
155
|
-
./spec/data_objects/order_preview_spec.rb[1:6:2:2] | passed | 0.00002 seconds |
|
156
|
-
./spec/data_objects/order_preview_spec.rb[1:7:1:1] | passed | 0.00026 seconds |
|
157
|
-
./spec/data_objects/order_preview_spec.rb[1:7:1:2] | passed | 0.00007 seconds |
|
158
|
-
./spec/data_objects/order_preview_spec.rb[1:7:1:3] | passed | 0.00008 seconds |
|
159
|
-
./spec/data_objects/order_preview_spec.rb[1:7:1:4] | passed | 0.00007 seconds |
|
160
|
-
./spec/data_objects/order_preview_spec.rb[1:7:2:1] | passed | 0.00023 seconds |
|
161
|
-
./spec/data_objects/order_preview_spec.rb[1:7:2:2] | passed | 0.00007 seconds |
|
162
|
-
./spec/data_objects/order_preview_spec.rb[1:7:2:3] | passed | 0.00007 seconds |
|
163
|
-
./spec/data_objects/order_preview_spec.rb[1:7:3:1] | passed | 0.00008 seconds |
|
164
|
-
./spec/data_objects/order_preview_spec.rb[1:7:3:2] | passed | 0.00007 seconds |
|
165
|
-
./spec/data_objects/order_spec.rb[1:1:1] | passed | 0.00028 seconds |
|
166
|
-
./spec/data_objects/order_spec.rb[1:2:1] | passed | 0.00034 seconds |
|
167
|
-
./spec/data_objects/order_spec.rb[1:3:1] | passed | 0.00006 seconds |
|
168
|
-
./spec/data_objects/order_spec.rb[1:3:2] | passed | 0.00003 seconds |
|
169
|
-
./spec/data_objects/order_spec.rb[2:1:1] | passed | 0.00013 seconds |
|
170
|
-
./spec/data_objects/order_spec.rb[3:1:1] | passed | 0.00015 seconds |
|
171
|
-
./spec/data_objects/price_history_spec.rb[1:1:1] | passed | 0.00033 seconds |
|
172
|
-
./spec/data_objects/price_history_spec.rb[1:2:1] | passed | 0.0001 seconds |
|
173
|
-
./spec/data_objects/price_history_spec.rb[1:2:2] | passed | 0.00004 seconds |
|
174
|
-
./spec/data_objects/price_history_spec.rb[1:3:1] | passed | 0.00009 seconds |
|
175
|
-
./spec/data_objects/price_history_spec.rb[1:3:2] | passed | 0.00007 seconds |
|
176
|
-
./spec/data_objects/price_history_spec.rb[1:4:1] | passed | 0.00005 seconds |
|
177
|
-
./spec/data_objects/price_history_spec.rb[1:4:2] | passed | 0.00004 seconds |
|
178
|
-
./spec/data_objects/price_history_spec.rb[1:4:3] | passed | 0.00002 seconds |
|
179
|
-
./spec/data_objects/price_history_spec.rb[1:5:1] | passed | 0.00005 seconds |
|
180
|
-
./spec/data_objects/price_history_spec.rb[1:6:1] | passed | 0.00005 seconds |
|
181
|
-
./spec/data_objects/price_history_spec.rb[1:6:2] | passed | 0.00002 seconds |
|
182
|
-
./spec/data_objects/price_history_spec.rb[1:7:1] | passed | 0.00005 seconds |
|
183
|
-
./spec/data_objects/price_history_spec.rb[1:7:2] | passed | 0.00002 seconds |
|
184
|
-
./spec/data_objects/price_history_spec.rb[1:8:1] | passed | 0.00006 seconds |
|
185
|
-
./spec/data_objects/price_history_spec.rb[1:9:1] | passed | 0.00005 seconds |
|
186
|
-
./spec/data_objects/price_history_spec.rb[1:9:2] | passed | 0.00002 seconds |
|
187
|
-
./spec/data_objects/price_history_spec.rb[1:10:1] | passed | 0.00005 seconds |
|
188
|
-
./spec/data_objects/price_history_spec.rb[1:10:2] | passed | 0.00002 seconds |
|
189
|
-
./spec/data_objects/price_history_spec.rb[1:11:1] | passed | 0.00005 seconds |
|
190
|
-
./spec/data_objects/price_history_spec.rb[1:11:2] | passed | 0.00002 seconds |
|
191
|
-
./spec/data_objects/price_history_spec.rb[1:12:1] | passed | 0.00005 seconds |
|
192
|
-
./spec/data_objects/price_history_spec.rb[1:12:2] | passed | 0.00002 seconds |
|
193
|
-
./spec/data_objects/price_history_spec.rb[1:13:1] | passed | 0.00006 seconds |
|
194
|
-
./spec/data_objects/price_history_spec.rb[1:13:2] | passed | 0.00003 seconds |
|
195
|
-
./spec/data_objects/price_history_spec.rb[1:14:1] | passed | 0.00006 seconds |
|
196
|
-
./spec/data_objects/price_history_spec.rb[1:14:2] | passed | 0.00003 seconds |
|
197
|
-
./spec/data_objects/price_history_spec.rb[1:15:1] | passed | 0.00006 seconds |
|
198
|
-
./spec/data_objects/price_history_spec.rb[1:15:2] | passed | 0.00004 seconds |
|
199
|
-
./spec/data_objects/price_history_spec.rb[1:16:1] | passed | 0.00005 seconds |
|
200
|
-
./spec/data_objects/price_history_spec.rb[1:16:2] | passed | 0.00005 seconds |
|
201
|
-
./spec/data_objects/price_history_spec.rb[1:17:1:1] | passed | 0.00003 seconds |
|
202
|
-
./spec/data_objects/price_history_spec.rb[1:17:2:1] | passed | 0.00002 seconds |
|
203
|
-
./spec/data_objects/price_history_spec.rb[1:17:3:1] | passed | 0.00003 seconds |
|
204
|
-
./spec/data_objects/price_history_spec.rb[1:17:3:2] | passed | 0.00002 seconds |
|
205
|
-
./spec/data_objects/price_history_spec.rb[1:17:4:1] | passed | 0.00003 seconds |
|
206
|
-
./spec/data_objects/price_history_spec.rb[1:17:5:1] | passed | 0.00002 seconds |
|
207
|
-
./spec/data_objects/price_history_spec.rb[1:17:6:1] | passed | 0.00002 seconds |
|
208
|
-
./spec/data_objects/price_history_spec.rb[1:17:6:2] | passed | 0.00002 seconds |
|
209
|
-
./spec/data_objects/price_history_spec.rb[1:17:7:1] | passed | 0.00003 seconds |
|
210
|
-
./spec/data_objects/price_history_spec.rb[1:17:7:2] | passed | 0.00003 seconds |
|
211
|
-
./spec/data_objects/price_history_spec.rb[1:17:7:3] | passed | 0.00002 seconds |
|
212
|
-
./spec/data_objects/price_history_spec.rb[1:17:8:1:1] | passed | 0.00003 seconds |
|
213
|
-
./spec/data_objects/price_history_spec.rb[1:17:8:2:1] | passed | 0.00002 seconds |
|
214
|
-
./spec/data_objects/price_history_spec.rb[1:17:8:3:1] | passed | 0.00003 seconds |
|
215
|
-
./spec/data_objects/price_history_spec.rb[1:17:8:4:1] | passed | 0.00002 seconds |
|
216
|
-
./spec/data_objects/price_history_spec.rb[1:17:9:1:1] | passed | 0.00002 seconds |
|
217
|
-
./spec/data_objects/price_history_spec.rb[1:17:9:2:1] | passed | 0.00002 seconds |
|
218
|
-
./spec/data_objects/price_history_spec.rb[1:17:9:3:1] | passed | 0.00002 seconds |
|
219
|
-
./spec/data_objects/price_history_spec.rb[1:17:9:4:1] | passed | 0.00002 seconds |
|
220
|
-
./spec/data_objects/quote_spec.rb[1:1:1] | passed | 0.00015 seconds |
|
221
|
-
./spec/data_objects/quote_spec.rb[1:1:2] | passed | 0.00015 seconds |
|
222
|
-
./spec/data_objects/quote_spec.rb[1:1:3] | passed | 0.00011 seconds |
|
223
|
-
./spec/data_objects/quote_spec.rb[2:1:1] | passed | 0.00007 seconds |
|
224
|
-
./spec/data_objects/quote_spec.rb[3:1:1] | passed | 0.00008 seconds |
|
225
|
-
./spec/data_objects/quote_spec.rb[4:1:1] | passed | 0.00006 seconds |
|
226
|
-
./spec/data_objects/transaction_spec.rb[1:1:1] | passed | 0.00014 seconds |
|
227
|
-
./spec/data_objects/transaction_spec.rb[1:2:1] | passed | 0.00011 seconds |
|
228
|
-
./spec/data_objects/transaction_spec.rb[1:3:1] | passed | 0.00007 seconds |
|
229
|
-
./spec/data_objects/transaction_spec.rb[1:4:1] | passed | 0.00006 seconds |
|
230
|
-
./spec/data_objects/transaction_spec.rb[2:1:1] | passed | 0.00008 seconds |
|
231
|
-
./spec/data_objects/transaction_spec.rb[2:2:1] | passed | 0.00003 seconds |
|
232
|
-
./spec/data_objects/transaction_spec.rb[2:3:1] | passed | 0.00003 seconds |
|
233
|
-
./spec/data_objects/transaction_spec.rb[2:4:1] | passed | 0.00003 seconds |
|
234
|
-
./spec/data_objects/transaction_spec.rb[2:5:1] | passed | 0.00003 seconds |
|
235
|
-
./spec/data_objects/transaction_spec.rb[2:6:1] | passed | 0.00003 seconds |
|
236
|
-
./spec/data_objects/transaction_spec.rb[2:6:2] | passed | 0.00002 seconds |
|
237
|
-
./spec/data_objects/transaction_spec.rb[2:7:1] | passed | 0.00003 seconds |
|
238
|
-
./spec/data_objects/transaction_spec.rb[2:7:2] | passed | 0.00002 seconds |
|
239
|
-
./spec/data_objects/user_preferences_spec.rb[1:1:1] | passed | 0.00028 seconds |
|
240
|
-
./spec/data_objects/user_preferences_spec.rb[1:2:1] | passed | 0.00006 seconds |
|
241
|
-
./spec/data_objects/user_preferences_spec.rb[1:2:2] | passed | 0.00005 seconds |
|
242
|
-
./spec/data_objects/user_preferences_spec.rb[1:2:3] | passed | 0.00005 seconds |
|
243
|
-
./spec/data_objects/user_preferences_spec.rb[1:3:1] | passed | 0.00005 seconds |
|
244
|
-
./spec/data_objects/user_preferences_spec.rb[1:3:2:1] | passed | 0.00005 seconds |
|
245
|
-
./spec/data_objects/user_preferences_spec.rb[1:4:1] | passed | 0.00005 seconds |
|
246
|
-
./spec/data_objects/user_preferences_spec.rb[1:4:2] | passed | 0.00004 seconds |
|
247
|
-
./spec/data_objects/user_preferences_spec.rb[1:5:1] | passed | 0.00006 seconds |
|
248
|
-
./spec/data_objects/user_preferences_spec.rb[1:6:1] | passed | 0.00004 seconds |
|
249
|
-
./spec/data_objects/user_preferences_spec.rb[1:7:1] | passed | 0.00004 seconds |
|
250
|
-
./spec/data_objects/user_preferences_spec.rb[1:7:2:1] | passed | 0.00005 seconds |
|
251
|
-
./spec/data_objects/user_preferences_spec.rb[1:8:1] | passed | 0.00006 seconds |
|
252
|
-
./spec/data_objects/user_preferences_spec.rb[1:9:1:1] | passed | 0.00005 seconds |
|
253
|
-
./spec/data_objects/user_preferences_spec.rb[1:9:2:1] | passed | 0.00004 seconds |
|
254
|
-
./spec/data_objects/user_preferences_spec.rb[1:9:3:1] | passed | 0.00004 seconds |
|
255
|
-
./spec/data_objects/user_preferences_spec.rb[1:9:4:1] | passed | 0.00004 seconds |
|
256
|
-
./spec/data_objects/user_preferences_spec.rb[1:10:1:1] | passed | 0.00005 seconds |
|
257
|
-
./spec/data_objects/user_preferences_spec.rb[1:10:2:1] | passed | 0.00005 seconds |
|
258
|
-
./spec/data_objects/user_preferences_spec.rb[1:11:1:1] | passed | 0.00005 seconds |
|
259
|
-
./spec/data_objects/user_preferences_spec.rb[1:11:2:1] | passed | 0.00004 seconds |
|
260
|
-
./spec/data_objects/user_preferences_spec.rb[1:11:3:1] | passed | 0.00004 seconds |
|
261
|
-
./spec/instrument_spec.rb[1:1] | passed | 0.00003 seconds |
|
262
|
-
./spec/market_hours_spec.rb[1:1] | passed | 0.00002 seconds |
|
263
|
-
./spec/movers_spec.rb[1:1] | passed | 0.00002 seconds |
|
264
|
-
./spec/movers_spec.rb[1:2:1] | passed | 0.00005 seconds |
|
265
|
-
./spec/movers_spec.rb[1:2:2] | passed | 0.00003 seconds |
|
266
|
-
./spec/movers_spec.rb[1:2:3] | passed | 0.00003 seconds |
|
267
|
-
./spec/option_spec.rb[1:1] | passed | 0.00002 seconds |
|
268
|
-
./spec/orders/builder_spec.rb[1:1:1] | passed | 0.00003 seconds |
|
269
|
-
./spec/orders/builder_spec.rb[1:2:1] | passed | 0.00002 seconds |
|
270
|
-
./spec/orders/builder_spec.rb[1:3:1] | passed | 0.00003 seconds |
|
271
|
-
./spec/orders/builder_spec.rb[1:4:1] | passed | 0.00002 seconds |
|
272
|
-
./spec/orders/builder_spec.rb[1:5:1] | passed | 0.00002 seconds |
|
273
|
-
./spec/orders/builder_spec.rb[1:6:1] | passed | 0.00002 seconds |
|
274
|
-
./spec/orders/builder_spec.rb[1:7:1] | passed | 0.00002 seconds |
|
275
|
-
./spec/orders/builder_spec.rb[1:7:2] | passed | 0.00004 seconds |
|
276
|
-
./spec/orders/builder_spec.rb[1:8:1] | passed | 0.00002 seconds |
|
277
|
-
./spec/orders/builder_spec.rb[1:9:1] | passed | 0.00003 seconds |
|
278
|
-
./spec/orders/builder_spec.rb[1:10:1] | passed | 0.00002 seconds |
|
279
|
-
./spec/orders/builder_spec.rb[1:11:1] | passed | 0.00003 seconds |
|
280
|
-
./spec/orders/builder_spec.rb[1:11:2] | passed | 0.00002 seconds |
|
281
|
-
./spec/orders/builder_spec.rb[1:12:1] | passed | 0.00002 seconds |
|
282
|
-
./spec/orders/builder_spec.rb[1:13:1] | pending | 0 seconds |
|
283
|
-
./spec/orders/builder_spec.rb[1:13:2] | passed | 0.00004 seconds |
|
284
|
-
./spec/orders/builder_spec.rb[1:14:1] | passed | 0.00003 seconds |
|
285
|
-
./spec/orders/builder_spec.rb[1:15:1] | passed | 0.00006 seconds |
|
286
|
-
./spec/orders/builder_spec.rb[1:15:2] | pending | 0 seconds |
|
287
|
-
./spec/orders/order_spec.rb[1:1] | passed | 0.00002 seconds |
|
288
|
-
./spec/orders/order_spec.rb[1:2:1] | passed | 0.00003 seconds |
|
289
|
-
./spec/orders/order_spec.rb[1:2:2] | passed | 0.00003 seconds |
|
290
|
-
./spec/price_history_spec.rb[1:1] | passed | 0.00002 seconds |
|
291
|
-
./spec/price_history_spec.rb[1:2:1] | passed | 0.00002 seconds |
|
292
|
-
./spec/price_history_spec.rb[1:2:2] | passed | 0.00004 seconds |
|
293
|
-
./spec/price_history_spec.rb[1:2:3] | passed | 0.00002 seconds |
|
294
|
-
./spec/price_history_spec.rb[1:2:4] | passed | 0.00002 seconds |
|
295
|
-
./spec/quote_spec.rb[1:1] | passed | 0.00002 seconds |
|
296
|
-
./spec/quote_spec.rb[1:2] | passed | 0.00002 seconds |
|
297
|
-
./spec/transaction_spec.rb[1:1] | passed | 0.00002 seconds |
|
298
|
-
./spec/utils/enum_enforcer_spec.rb[1:1:1] | passed | 0.00003 seconds |
|
299
|
-
./spec/utils/enum_enforcer_spec.rb[1:1:2] | passed | 0.00004 seconds |
|
300
|
-
./spec/utils/enum_enforcer_spec.rb[1:1:3] | passed | 0.00002 seconds |
|
301
|
-
./spec/utils/enum_enforcer_spec.rb[1:2:1] | passed | 0.00003 seconds |
|
302
|
-
./spec/utils/enum_enforcer_spec.rb[1:2:2] | passed | 0.00003 seconds |
|
303
|
-
./spec/utils/enum_enforcer_spec.rb[1:2:3] | passed | 0.00005 seconds |
|
304
|
-
./spec/utils/logger_spec.rb[1:1] | passed | 0.00023 seconds |
|
305
|
-
./spec/utils/logger_spec.rb[1:2] | passed | 0.00019 seconds |
|
306
|
-
./spec/utils/logger_spec.rb[1:3] | passed | 0.0001 seconds |
|
307
|
-
./spec/utils/logger_spec.rb[1:4] | passed | 0.0001 seconds |
|
308
|
-
./spec/utils/logger_spec.rb[1:5] | passed | 0.00012 seconds |
|
309
|
-
./spec/utils/redactor_spec.rb[1:1:1] | passed | 0.00004 seconds |
|
310
|
-
./spec/utils/redactor_spec.rb[1:1:2] | passed | 0.0001 seconds |
|
311
|
-
./spec/utils/redactor_spec.rb[1:1:3] | passed | 0.0001 seconds |
|
312
|
-
./spec/utils/redactor_spec.rb[1:2:1] | passed | 0.00007 seconds |
|
313
|
-
./spec/utils/redactor_spec.rb[1:2:2] | passed | 0.00004 seconds |
|
314
|
-
./spec/utils/redactor_spec.rb[1:2:3] | passed | 0.00004 seconds |
|
315
|
-
./spec/utils/redactor_spec.rb[1:2:4] | passed | 0.00004 seconds |
|
316
|
-
./spec/utils/redactor_spec.rb[1:3:1] | passed | 0.00003 seconds |
|
317
|
-
./spec/utils/redactor_spec.rb[1:3:2] | passed | 0.00002 seconds |
|
318
|
-
./spec/utils/redactor_spec.rb[1:3:3] | passed | 0.00002 seconds |
|
319
|
-
./spec/utils/redactor_spec.rb[1:4:1] | passed | 0.00014 seconds |
|
320
|
-
./spec/utils/redactor_spec.rb[1:4:2] | passed | 0.00003 seconds |
|
321
|
-
./spec/utils/redactor_spec.rb[1:4:3] | passed | 0.00002 seconds |
|