Class: Bitbot::Trader::Providers::Bitstamp::OpenOrderParser

Inherits:
Object
  • Object
show all
Defined in:
lib/bitbot/trader/providers/bitstamp/open_orders_parser.rb

Overview

Parses raw open orders

Instance Method Summary collapse

Instance Method Details

#parseOpenOrder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Makes raw open order hash into OpenOrder object

Returns:



21
22
23
24
25
26
27
28
# File 'lib/bitbot/trader/providers/bitstamp/open_orders_parser.rb', line 21

def parse
  OpenOrder.new(
    id: id,
    price: {value: price, currency: "USD"},
    amount: {value: amount, currency: "BTC"},
    bid: type == 0
  )
end