Class: BitmexClient::HTTP::Public::Client
- Inherits:
-
Object
- Object
- BitmexClient::HTTP::Public::Client
- Defined in:
- lib/bitmex_client/http/public.rb
Instance Method Summary collapse
- #announcement(options = {}) ⇒ Object
- #announcement_urgent(options = {}) ⇒ Object
- #funding(options = {}) ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #instrument(options = {}) ⇒ Object
- #instrument_active ⇒ Object
- #insurance(options = {}) ⇒ Object
- #leaderboard(options = {}) ⇒ Object
- #liquidation(options = {}) ⇒ Object
- #order_book_l2(symbol, depth = 25) ⇒ Object
- #settlement(options = {}) ⇒ Object
- #stats ⇒ Object
- #stats_history ⇒ Object
- #stats_history_usd ⇒ Object
- #trade(options = {}) ⇒ Object
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
6 7 8 |
# File 'lib/bitmex_client/http/public.rb', line 6 def initialize @connection = Connection.new(nil, nil) end |
Instance Method Details
#announcement(options = {}) ⇒ Object
11 12 13 |
# File 'lib/bitmex_client/http/public.rb', line 11 def announcement( = {}) @connection.get('/api/v1/announcement', ).body end |
#announcement_urgent(options = {}) ⇒ Object
16 17 18 |
# File 'lib/bitmex_client/http/public.rb', line 16 def announcement_urgent( = {}) @connection.get('/api/v1/announcement/urgent', ).body end |
#funding(options = {}) ⇒ Object
21 22 23 |
# File 'lib/bitmex_client/http/public.rb', line 21 def funding( = {}) @connection.get('/api/v1/funding', ).body end |
#instrument(options = {}) ⇒ Object
26 27 28 |
# File 'lib/bitmex_client/http/public.rb', line 26 def instrument( = {}) @connection.get('/api/v1/instrument', ).body end |
#instrument_active ⇒ Object
31 32 33 |
# File 'lib/bitmex_client/http/public.rb', line 31 def instrument_active @connection.get('/api/v1/instrument/active').body end |
#insurance(options = {}) ⇒ Object
36 37 38 |
# File 'lib/bitmex_client/http/public.rb', line 36 def insurance( = {}) @connection.get('/api/v1/insurance', ).body end |
#leaderboard(options = {}) ⇒ Object
41 42 43 |
# File 'lib/bitmex_client/http/public.rb', line 41 def leaderboard( = {}) @connection.get('/api/v1/leaderboard', ).body end |
#liquidation(options = {}) ⇒ Object
46 47 48 |
# File 'lib/bitmex_client/http/public.rb', line 46 def liquidation( = {}) @connection.get('/api/v1/liquidation', ).body end |
#order_book_l2(symbol, depth = 25) ⇒ Object
51 52 53 |
# File 'lib/bitmex_client/http/public.rb', line 51 def order_book_l2(symbol, depth = 25) @connection.get('/api/v1/orderBook/L2', { symbol: symbol, depth: depth }).body end |
#settlement(options = {}) ⇒ Object
56 57 58 |
# File 'lib/bitmex_client/http/public.rb', line 56 def settlement( = {}) @connection.get('/api/v1/settlement', ).body end |
#stats ⇒ Object
61 62 63 |
# File 'lib/bitmex_client/http/public.rb', line 61 def stats @connection.get('/api/v1/stats').body end |
#stats_history ⇒ Object
66 67 68 |
# File 'lib/bitmex_client/http/public.rb', line 66 def stats_history @connection.get('/api/v1/stats/history').body end |
#stats_history_usd ⇒ Object
71 72 73 |
# File 'lib/bitmex_client/http/public.rb', line 71 def stats_history_usd @connection.get('/api/v1/stats/historyUSD').body end |
#trade(options = {}) ⇒ Object
76 77 78 |
# File 'lib/bitmex_client/http/public.rb', line 76 def trade( = {}) @connection.get('/api/v1/trade', ).body end |