sensei_eod_utils 0.0.30 → 0.0.31
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/eod_services/contract.rb +7 -1
- data/sensei_eod_utils.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d6b956c73badfbaeb9920f1df08838ebd17d791cd7abc46a8fd28087e528264
|
4
|
+
data.tar.gz: ce006b39ffa6bf2e8ddd5c6cd473ea8d429e3c881a177a44d6c13c3cc5c24865
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6c8fb2fe24dace721dbdb81aa27a4dccf9bb13cf2e97d2f0ffbaa916fbdb56ae880338c91260bd21b7e3cc448434490244ea117455dc91a93d977bc98cf9eaf
|
7
|
+
data.tar.gz: da2d455f1645e556ef0e483381173d423409c3422b7ccaceed373b67d4440a588d8006c2fb94120972ff4d65b9c625bf4302628e79e1dcb3b51d8c182c444369
|
@@ -10,7 +10,13 @@ module EodServices
|
|
10
10
|
def contract_symbol(underlying:, expiry:, type:, strike:)
|
11
11
|
return underlying if type == EodModels::OptionType::STOCK
|
12
12
|
|
13
|
-
underlying + expiration(expiry) + type + padded_strike(strike)
|
13
|
+
contract = underlying + expiration(expiry) + type + padded_strike(strike)
|
14
|
+
|
15
|
+
unless EodServices::InstrumentType.option?(contract)
|
16
|
+
raise ArgumentError, "Contract #{contract} is not a valid options contract"
|
17
|
+
end
|
18
|
+
|
19
|
+
contract
|
14
20
|
end
|
15
21
|
|
16
22
|
def underlying_symbol(contract_symbol)
|
data/sensei_eod_utils.gemspec
CHANGED