Module: Binance::Client::REST::Withdraw_API
- Defined in:
- lib/binance/client/rest/withdraw_api.rb
Overview
API endpoints with require a timestamp and signature, as well as requiring url_encoded parameters
Class Method Summary collapse
Instance Method Summary collapse
- #deposit_address(options) ⇒ Object
- #deposit_history(options = {}) ⇒ Object
- #withdraw(options) ⇒ Object
- #withdraw_history(options = {}) ⇒ Object
Class Method Details
.extended(base) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/binance/client/rest/withdraw_api.rb', line 13 def self.extended(base) REST.api[:withdraw] = lambda do Faraday.new(url: "#{BASE_URL}/wapi") do |conn| conn.request :url_encoded conn.response :json, content_type: /\bjson$/ conn.headers['X-MBX-APIKEY'] = base.api_key conn.use TimestampRequestMiddleware conn.use SignRequestMiddleware, base.secret_key conn.adapter Faraday.default_adapter end end end |
Instance Method Details
#deposit_address(options) ⇒ Object
38 39 40 |
# File 'lib/binance/client/rest/withdraw_api.rb', line 38 def deposit_address() request :withdraw, :get, 'depositAddress', end |
#deposit_history(options = {}) ⇒ Object
30 31 32 |
# File 'lib/binance/client/rest/withdraw_api.rb', line 30 def deposit_history( = {}) request :withdraw, :get, 'depositHistory', end |
#withdraw(options) ⇒ Object
26 27 28 |
# File 'lib/binance/client/rest/withdraw_api.rb', line 26 def withdraw() request :withdraw, :post, 'withdraw', end |
#withdraw_history(options = {}) ⇒ Object
34 35 36 |
# File 'lib/binance/client/rest/withdraw_api.rb', line 34 def withdraw_history( = {}) request :withdraw, :get, 'withdrawHistory', end |