Module: Binance::Client::REST::Public_API
- Defined in:
- lib/binance/client/rest/public_api.rb
Overview
API endpoints that don’t require any type of authentication
Class Method Summary collapse
Instance Method Summary collapse
- #agg_trades(options) ⇒ Object
-
#all_book_tickers ⇒ Object
Ensure backwards compatibility.
-
#all_prices ⇒ Object
Ensure backwards compatibility.
- #book_ticker(options) ⇒ Object
- #depth(options) ⇒ Object
- #exchange_info ⇒ Object
- #historical_trades(options) ⇒ Object
- #klines(options) ⇒ Object
- #ping ⇒ Object
- #price(options) ⇒ Object
- #products ⇒ Object
- #time ⇒ Object
- #trades(options) ⇒ Object
- #twenty_four_hour(options) ⇒ Object
Class Method Details
.extended(_base) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/binance/client/rest/public_api.rb', line 10 def self.extended(_base) REST.api[:public] = lambda do Faraday.new(url: "#{BASE_URL}/api") do |conn| conn.request :json conn.response :json, content_type: /\bjson$/ conn.adapter Faraday.default_adapter end end end |
Instance Method Details
#agg_trades(options) ⇒ Object
48 49 50 |
# File 'lib/binance/client/rest/public_api.rb', line 48 def agg_trades() request :public, :get, 'aggTrades', end |
#all_book_tickers ⇒ Object
Ensure backwards compatibility
74 75 76 |
# File 'lib/binance/client/rest/public_api.rb', line 74 def all_book_tickers request :public, :get, 'bookTicker' end |
#all_prices ⇒ Object
Ensure backwards compatibility
65 66 67 |
# File 'lib/binance/client/rest/public_api.rb', line 65 def all_prices request :public, :get, 'price' end |
#book_ticker(options) ⇒ Object
69 70 71 |
# File 'lib/binance/client/rest/public_api.rb', line 69 def book_ticker() request :public, :get, 'bookTicker', end |
#depth(options) ⇒ Object
36 37 38 |
# File 'lib/binance/client/rest/public_api.rb', line 36 def depth() request :public, :get, 'depth', end |
#exchange_info ⇒ Object
28 29 30 |
# File 'lib/binance/client/rest/public_api.rb', line 28 def exchange_info request :public, :get, 'exchangeInfo' end |
#historical_trades(options) ⇒ Object
44 45 46 |
# File 'lib/binance/client/rest/public_api.rb', line 44 def historical_trades() request :public, :get, 'historicalTrades', end |
#klines(options) ⇒ Object
52 53 54 |
# File 'lib/binance/client/rest/public_api.rb', line 52 def klines() request :public, :get, 'klines', end |
#ping ⇒ Object
20 21 22 |
# File 'lib/binance/client/rest/public_api.rb', line 20 def ping request :public, :get, 'ping' end |
#price(options) ⇒ Object
60 61 62 |
# File 'lib/binance/client/rest/public_api.rb', line 60 def price() request :public, :get, 'price', end |
#products ⇒ Object
32 33 34 |
# File 'lib/binance/client/rest/public_api.rb', line 32 def products request :public, :get, 'products' end |
#time ⇒ Object
24 25 26 |
# File 'lib/binance/client/rest/public_api.rb', line 24 def time request :public, :get, 'time' end |
#trades(options) ⇒ Object
40 41 42 |
# File 'lib/binance/client/rest/public_api.rb', line 40 def trades() request :public, :get, 'trades', end |
#twenty_four_hour(options) ⇒ Object
56 57 58 |
# File 'lib/binance/client/rest/public_api.rb', line 56 def twenty_four_hour() request :public, :get, '24hr', end |