okex 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46ba525661005cec7d3f40cf9391e09964e9ff9cde7c21717efa6991dd2b4d9c
4
- data.tar.gz: 47fb2e5caec6039559bcebf4c5397be2e66525c7f2f06bf02ee5e8a928b25311
3
+ metadata.gz: 633daa1f0495d2dcb85221058ac2b5e5a967416ea139277bb56bf34d88216a80
4
+ data.tar.gz: 2272c040ebb0bdaa5e1791d5ed94753c06d9c2e11f8a505164fcce8e8badd1f7
5
5
  SHA512:
6
- metadata.gz: 40c95b78c042c77674d0c030b06a7b1636cb94784c7e47819006fd617522cfef333731e29b3a02f83878dad4937023f36cfd0cc6673a0494cffbf8052533c977
7
- data.tar.gz: d673a85cee82d1e6514fece15211ef1b64188e792b2feb02b7d5eb0ee94d71d25d35c35757eb8ab2f4ea647b69cf82d8562766b208d0174c2548081c31eee7e1
6
+ metadata.gz: d96d3b40bbf42de610b2cb02e6bab2f19face0a8a39f8ade8c3a4fc3ea170213f88f83a60bd3a8cfb16feb83703c57f2d593d9ab63731a860760fd34292c07cc
7
+ data.tar.gz: 947569fb37f6cc68557d79abd6897d05c7522e8148701f4e285873c5cbeb6065f7a075e113cd6f8a131be271a7bfb21049fc70f5a0f2f97b0ea0ed94ac3224ba
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- okex (0.3.6)
4
+ okex (0.3.7)
5
5
  faraday (~> 1.5)
6
6
 
7
7
  GEM
data/lib/okex/api_v5.rb CHANGED
@@ -69,7 +69,7 @@ class OKEX::ApiV5
69
69
 
70
70
  def max_size(instrument_id)
71
71
  data = client.get(host, "/api/v5/account/max-size?instId=#{instrument_id}&tdMode=cross")
72
-
72
+
73
73
  ret = OKEX::MaxSize.new(-1, -1)
74
74
 
75
75
  el = data[0]
@@ -114,7 +114,7 @@ class OKEX::ApiV5
114
114
  result = client.get(host, "/api/v5/trade/orders-algo-pending?instId=#{inst_id}&instType=SWAP&ordType=conditional")
115
115
 
116
116
  return -1 if result.empty?
117
- return result[0]["slTriggerPx"].to_i if result.size == 1
117
+ return result[0]["slTriggerPx"].to_f if result.size == 1
118
118
 
119
119
  raise "invalid result: #{result.inspect}"
120
120
  end
@@ -139,7 +139,7 @@ class OKEX::ApiV5
139
139
  "algoId": algo_id,
140
140
  "instId": inst_id
141
141
  }
142
-
142
+
143
143
  client.post(host, "/api/v5/trade/cancel-algos", [params])
144
144
  end
145
145
 
data/lib/okex/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OKEX
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Zhang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-31 00:00:00.000000000 Z
11
+ date: 2021-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler