Class: Binance::Client::REST
- Inherits:
-
Object
- Object
- Binance::Client::REST
- Includes:
- Account_API, Public_API, Withdraw_API
- Defined in:
- lib/binance/client/rest.rb,
lib/binance/client/rest/public_api.rb,
lib/binance/client/rest/account_api.rb,
lib/binance/client/rest/withdraw_api.rb,
lib/binance/client/rest/sign_request_middleware.rb,
lib/binance/client/rest/timestamp_request_middleware.rb
Overview
Provides low level methods for Binance APIs via their REST interface
Defined Under Namespace
Modules: Account_API, Public_API, Withdraw_API Classes: SignRequestMiddleware, TimestampRequestMiddleware
Constant Summary collapse
- BASE_URL =
'https://www.binance.com'.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_key: '', secret_key: '') ⇒ REST
constructor
A new instance of REST.
Methods included from Withdraw_API
#deposit_address, #deposit_history, #withdraw, #withdraw_api, #withdraw_history
Methods included from Account_API
#account_api, #account_info, #account_trade_list, #all_orders, #cancel_order, #create_order, #open_orders, #query_order
Methods included from Public_API
#agg_trades, #all_book_tickers, #all_prices, #depth, #exchange_info, #klines, #ping, #products, #public_api, #time, #twenty_four_hour
Constructor Details
#initialize(api_key: '', secret_key: '') ⇒ REST
Returns a new instance of REST.
17 18 19 20 |
# File 'lib/binance/client/rest.rb', line 17 def initialize(api_key: '', secret_key: '') @api_key = api_key @secret_key = secret_key end |
Class Method Details
.add_query_param(query, key, value) ⇒ Object
22 23 24 25 26 |
# File 'lib/binance/client/rest.rb', line 22 def self.add_query_param(query, key, value) query = query.to_s query << '&' unless query.empty? query << "#{Faraday::Utils.escape key}=#{Faraday::Utils.escape value}" end |