class Coinone::Order
Attributes
cancel_all_order_response[R]
cancel_order_response[R]
complete_orders[R]
connection[R]
limit_buy[R]
limit_orders[R]
limit_sell[R]
market_buy[R]
market_sell[R]
Public Class Methods
new(options={}, connection=nil)
click to toggle source
# File lib/coinone/order.rb, line 16 def initialize(options={}, connection=nil) @connection = connection || Connection.factory(options) @cancel_all_order_response = CancelAllOrderResponse.new() @cancel_order_response = CancelOrderResponse.new() @limit_sell = TradeResponse.new() @limit_buy = TradeResponse.new() @market_sell = TradeResponse.new() @market_buy = TradeResponse.new() @complete_orders = CompleteOrders.new() @limit_orders = LimitOrders.new() end
Public Instance Methods
cancel_all_order(options={})
click to toggle source
# File lib/coinone/order.rb, line 31 def cancel_all_order(options={}) options[:currency] = "btc" if options[:currency].blank? response = @connection.post( "/v2/order/cancel_all/", options) @cancel_all_order_response.update_response(response) @cancel_all_order_response end
cancel_order(options={})
click to toggle source
# File lib/coinone/order.rb, line 40 def cancel_order(options={}) options[:currency] = "btc" if options[:currency].blank? response = @connection.post( "/v2/order/cancel/", options) @cancel_order_response.update_response(response) @cancel_order_response end
get_complete_orders(options={})
click to toggle source
# File lib/coinone/order.rb, line 85 def get_complete_orders(options={}) options[:currency] = "btc" if options[:currency].blank? response = @connection.post( "/v2/order/complete_orders/", options) @complete_orders.update_response(response) @complete_orders end
get_limit_buy(options = {})
click to toggle source
# File lib/coinone/order.rb, line 58 def get_limit_buy(options = {}) options[:currency] = "btc" if options[:currency].blank? response = @connection.post( "/v2/order/limit_buy/", options) @limit_buy.update_response(response) @limit_buy end
get_limit_orders(options={})
click to toggle source
# File lib/coinone/order.rb, line 96 def get_limit_orders(options={}) options[:currency] = "btc" if options[:currency].blank? response = @connection.post( "/v2/order/limit_orders/", options) @limit_orders.update_response(response) @limit_orders end
get_limit_sell(options={})
click to toggle source
# File lib/coinone/order.rb, line 49 def get_limit_sell(options={}) options[:currency] = "btc" if options[:currency].blank? response = @connection.post( "/v2/order/limit_sell/", options) @limit_sell.update_response(response) @limit_sell end
get_market_buy(options={})
click to toggle source
# File lib/coinone/order.rb, line 67 def get_market_buy(options={}) options[:currency] = "btc" if options[:currency].blank? response = @connection.post( "/v2/order/market_buy/", options) @market_buy.update_response(response) @market_buy end
get_market_sell(options={})
click to toggle source
# File lib/coinone/order.rb, line 76 def get_market_sell(options={}) options[:currency] = "btc" if options[:currency].blank? response = @connection.post( "/v2/order/market_sell/", options) @market_sell.update_response(response) @market_sell end