Module: Binance::Client::REST::Account_API
- Defined in:
- lib/binance/client/rest/account_api.rb
Overview
API endpoints that require a timestamp and signature
Class Method Summary collapse
Instance Method Summary collapse
- #account_info(options = {}) ⇒ Object
- #account_trade_list(options) ⇒ Object
- #all_orders(options) ⇒ Object
- #cancel_order(options) ⇒ Object
- #create_order(options) ⇒ Object
- #create_test_order(options) ⇒ Object
- #open_orders(options) ⇒ Object
- #query_order(options) ⇒ Object
Class Method Details
.extended(base) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/binance/client/rest/account_api.rb', line 12 def self.extended(base) REST.api[:account] = lambda do Faraday.new(url: "#{BASE_URL}/api") do |conn| conn.request :json 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
#account_info(options = {}) ⇒ Object
49 50 51 |
# File 'lib/binance/client/rest/account_api.rb', line 49 def account_info( = {}) request :account, :get, 'account', end |
#account_trade_list(options) ⇒ Object
53 54 55 |
# File 'lib/binance/client/rest/account_api.rb', line 53 def account_trade_list() request :account, :get, 'myTrades', end |
#all_orders(options) ⇒ Object
45 46 47 |
# File 'lib/binance/client/rest/account_api.rb', line 45 def all_orders() request :account, :get, 'allOrders', end |
#cancel_order(options) ⇒ Object
37 38 39 |
# File 'lib/binance/client/rest/account_api.rb', line 37 def cancel_order() request :account, :delete, 'order', end |
#create_order(options) ⇒ Object
25 26 27 |
# File 'lib/binance/client/rest/account_api.rb', line 25 def create_order() request :account, :post, 'order', end |
#create_test_order(options) ⇒ Object
29 30 31 |
# File 'lib/binance/client/rest/account_api.rb', line 29 def create_test_order() request :account, :post, 'order/test', end |
#open_orders(options) ⇒ Object
41 42 43 |
# File 'lib/binance/client/rest/account_api.rb', line 41 def open_orders() request :account, :get, 'openOrders', end |
#query_order(options) ⇒ Object
33 34 35 |
# File 'lib/binance/client/rest/account_api.rb', line 33 def query_order() request :account, :get, 'order', end |