okex 0.3.4 → 0.3.5
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/okex/api_v5.rb +2 -0
- data/lib/okex/version.rb +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: c89695e5a69a030932da7523030a2653250666a64b5d6be96cc49302c44f42b6
|
|
4
|
+
data.tar.gz: a556bf958a0c14b9b94e6b2ac91c5320541fb4fb05307920d8b60f6b28faa170
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a9bf7db9c81660b0295ac62a4fd217b79c888de5422b94fdcafb37cbb0b57db10c33c9d2d0ebe2522c2d98fa92acaf261784ef19b18b208585e55a80dae37c01
|
|
7
|
+
data.tar.gz: bf336b5e91e7d003afdcb262ada4f94a799d4704d4dff27b8c7e3f55f14cb750d6255da5c3e5d6e2d8c1daa5e2421757aa340032db0748ad7f92adacdda90e38
|
data/lib/okex/api_v5.rb
CHANGED
|
@@ -112,6 +112,8 @@ class OKEX::ApiV5
|
|
|
112
112
|
# @param inst_id [String] 合约名称
|
|
113
113
|
def stop_loss_price(inst_id)
|
|
114
114
|
result = client.get(host, "/api/v5/trade/orders-algo-pending?instId=#{inst_id}&instType=SWAP&ordType=conditional")
|
|
115
|
+
|
|
116
|
+
return -1 if result.empty?
|
|
115
117
|
return result[0]["slTriggerPx"].to_i if result.size == 1
|
|
116
118
|
|
|
117
119
|
raise "invalid result: #{result.inspect}"
|
data/lib/okex/version.rb
CHANGED