Module: Coinbase::Advanced::REST::Resources::Futures
- Included in:
- Coinbase::Advanced::REST::RESTBase
- Defined in:
- lib/coinbase/advanced/rest/resources/futures.rb
Instance Method Summary collapse
- #cancel_pending_futures_sweep ⇒ Object
- #get_current_margin_window(params = {}) ⇒ Object
-
#get_futures_balance_summary ⇒ Object
rubocop:disable Naming/AccessorMethodName.
- #get_futures_position(params = {}) ⇒ Object
-
#get_intraday_margin_setting ⇒ Object
rubocop:disable Naming/AccessorMethodName.
- #list_futures_positions ⇒ Object
- #list_futures_sweeps ⇒ Object
- #schedule_futures_sweep(params = {}) ⇒ Object
- #set_intraday_margin_setting(params = {}) ⇒ Object
Instance Method Details
#cancel_pending_futures_sweep ⇒ Object
42 43 44 |
# File 'lib/coinbase/advanced/rest/resources/futures.rb', line 42 def cancel_pending_futures_sweep delete("cfm/sweeps") end |
#get_current_margin_window(params = {}) ⇒ Object
20 21 22 |
# File 'lib/coinbase/advanced/rest/resources/futures.rb', line 20 def get_current_margin_window(params = {}) get("cfm/intraday/current_margin_window", params) end |
#get_futures_balance_summary ⇒ Object
rubocop:disable Naming/AccessorMethodName
8 9 10 |
# File 'lib/coinbase/advanced/rest/resources/futures.rb', line 8 def get_futures_balance_summary # rubocop:disable Naming/AccessorMethodName get("cfm/balance_summary") end |
#get_futures_position(params = {}) ⇒ Object
28 29 30 31 32 |
# File 'lib/coinbase/advanced/rest/resources/futures.rb', line 28 def get_futures_position(params = {}) raise ArgumentError, "Missing :product_id" unless params.key? :product_id get("cfm/positions/#{params[:position_id]}") end |
#get_intraday_margin_setting ⇒ Object
rubocop:disable Naming/AccessorMethodName
12 13 14 |
# File 'lib/coinbase/advanced/rest/resources/futures.rb', line 12 def get_intraday_margin_setting # rubocop:disable Naming/AccessorMethodName get("cfm/intraday/margin_setting") end |
#list_futures_positions ⇒ Object
24 25 26 |
# File 'lib/coinbase/advanced/rest/resources/futures.rb', line 24 def list_futures_positions get("cfm/positions") end |
#list_futures_sweeps ⇒ Object
38 39 40 |
# File 'lib/coinbase/advanced/rest/resources/futures.rb', line 38 def list_futures_sweeps get("cfm/sweeps") end |
#schedule_futures_sweep(params = {}) ⇒ Object
34 35 36 |
# File 'lib/coinbase/advanced/rest/resources/futures.rb', line 34 def schedule_futures_sweep(params = {}) post("cfm/sweeps/schedule", params) end |
#set_intraday_margin_setting(params = {}) ⇒ Object
16 17 18 |
# File 'lib/coinbase/advanced/rest/resources/futures.rb', line 16 def set_intraday_margin_setting(params = {}) post("cfm/intraday/margin_setting", params) end |