Skip to content

Commit

Permalink
try to disable ssl verification
Browse files Browse the repository at this point in the history
I know that is not good, but until
craysiii#4 is fixed
  • Loading branch information
andrewroth committed Jan 12, 2018
1 parent 5a5aa9f commit 093a5a0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/binance/client/rest/account_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module Account_API
def self.extended(base)
REST.api[:account] = lambda do
Faraday.new(url: "#{BASE_URL}/api") do |conn|
conn.ssl.verify = false # not good, but until https://github.com/craysiii/binance/issues/4 is fixed
conn.request :json
conn.response :json, content_type: /\bjson$/
conn.headers['X-MBX-APIKEY'] = base.api_key
Expand Down Expand Up @@ -185,4 +186,4 @@ def account_trade_list(options)
end
end
end
end
end
1 change: 1 addition & 0 deletions lib/binance/client/rest/public_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module Public_API
def self.extended(base)
REST.api[:public] = lambda do
Faraday.new(url: "#{BASE_URL}/api") do |conn|
conn.ssl.verify = false # not good, but until https://github.com/craysiii/binance/issues/4 is fixed
conn.request :json
conn.response :json, content_type: /\bjson$/
conn.adapter base.adapter
Expand Down
3 changes: 2 additions & 1 deletion lib/binance/client/rest/user_data_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module UserData_API
def self.extended(base)
REST.api[:user_data] = lambda do
Faraday.new(url: "#{BASE_URL}/api") do |conn|
conn.ssl.verify = false # not good, but until https://github.com/craysiii/binance/issues/4 is fixed
conn.response :json, content_type: /\bjson$/
conn.headers['X-MBX-APIKEY'] = base.api_key
conn.adapter base.adapter
Expand Down Expand Up @@ -51,4 +52,4 @@ def close_stream(options)
end
end
end
end
end
3 changes: 2 additions & 1 deletion lib/binance/client/rest/withdraw_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module Withdraw_API
def self.extended(base)
REST.api[:withdraw] = lambda do
Faraday.new(url: "#{BASE_URL}/wapi") do |conn|
conn.ssl.verify = false # not good, but until https://github.com/craysiii/binance/issues/4 is fixed
conn.request :url_encoded
conn.response :json, content_type: /\bjson$/
conn.headers['X-MBX-APIKEY'] = base.api_key
Expand Down Expand Up @@ -103,4 +104,4 @@ def account_status(options)
end
end
end
end
end

0 comments on commit 093a5a0

Please sign in to comment.