class BitcointradeSDK::Market

Public Instance Methods

book_orders(currency:) click to toggle source
# File lib/bitcointrade_sdk/market.rb, line 5
def book_orders(currency:)
  send_request(:get, '/market', { currency: currency })['data']
end
cancel_order(order_id:) click to toggle source
# File lib/bitcointrade_sdk/market.rb, line 29
def cancel_order(order_id:)
  send_request(:delete, '/market/user_orders', { id: order_id })['data']
end
create_order!(currency:, type:, subtype:, amount:, unit_price:) click to toggle source
# File lib/bitcointrade_sdk/market.rb, line 13
def create_order!(currency:, type:, subtype:, amount:, unit_price:)
  params = {
    'currency'    => currency,
    'type'        => type,
    'subtype'     => subtype,
    'amount'      => amount,
    'unit_price'  => unit_price
  }

  send_request(:post, '/market/create_order', params)['data']
end
estimated_price(opts: {}) click to toggle source
# File lib/bitcointrade_sdk/market.rb, line 33
def estimated_price(opts: {})
  send_request(:get, '/market/estimated_price', {})['data']
end
summary(currency:) click to toggle source
# File lib/bitcointrade_sdk/market.rb, line 9
def summary(currency:)
  send_request(:get, '/market/summary', { currency: currency })['data']
end
user_orders(opts: {}) click to toggle source
# File lib/bitcointrade_sdk/market.rb, line 25
def user_orders(opts: {})
  send_request(:get, '/market/user_orders', opts)['data']
end