Module: Poloniex
- Defined in:
- lib/poloniex.rb,
lib/poloniex/version.rb
Defined Under Namespace
Classes: Configuration
Constant Summary collapse
- VERSION =
"1.0.0"
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
- .balances ⇒ Object
- .buy(currency_pair, rate, amount) ⇒ Object
- .cancel_order(currency_pair, order_number) ⇒ Object
- .open_orders(currency_pair) ⇒ Object
- .order_book(currency_pair) ⇒ Object
- .sell(currency_pair, rate, amount) ⇒ Object
- .setup {|configuration| ... } ⇒ Object
- .ticker ⇒ Object
- .trade_history(currency_pair) ⇒ Object
- .volume ⇒ Object
- .withdraw(curreny, amount, address) ⇒ Object
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
10 11 12 |
# File 'lib/poloniex.rb', line 10 def configuration @configuration end |
Class Method Details
.balances ⇒ Object
43 44 45 |
# File 'lib/poloniex.rb', line 43 def self.balances post 'returnBalances' end |
.buy(currency_pair, rate, amount) ⇒ Object
55 56 57 |
# File 'lib/poloniex.rb', line 55 def self.buy( currency_pair, rate, amount ) post 'buy', currencyPair: currency_pair, rate: rate, amount: amount end |
.cancel_order(currency_pair, order_number) ⇒ Object
63 64 65 |
# File 'lib/poloniex.rb', line 63 def self.cancel_order( currency_pair, order_number ) post 'cancelOrder', currencyPair: currency_pair, orderNumber: order_number end |
.open_orders(currency_pair) ⇒ Object
47 48 49 |
# File 'lib/poloniex.rb', line 47 def self.open_orders( currency_pair ) post 'returnOpenOrders', currencyPair: currency_pair end |
.order_book(currency_pair) ⇒ Object
35 36 37 |
# File 'lib/poloniex.rb', line 35 def self.order_book( currency_pair ) get 'returnOrderBook', currencyPair: currency_pair end |
.sell(currency_pair, rate, amount) ⇒ Object
59 60 61 |
# File 'lib/poloniex.rb', line 59 def self.sell( currency_pair, rate, amount ) post 'sell', currencyPair: currency_pair, rate: rate, amount: amount end |
.setup {|configuration| ... } ⇒ Object
13 14 15 16 |
# File 'lib/poloniex.rb', line 13 def self.setup @configuration ||= Configuration.new yield( configuration ) end |
.ticker ⇒ Object
27 28 29 |
# File 'lib/poloniex.rb', line 27 def self.ticker get 'returnTicker' end |
.trade_history(currency_pair) ⇒ Object
39 40 41 |
# File 'lib/poloniex.rb', line 39 def self.trade_history( currency_pair ) get 'returnTradeHistory', currencyPair: currency_pair end |
.volume ⇒ Object
31 32 33 |
# File 'lib/poloniex.rb', line 31 def self.volume get 'return24hVolume' end |
.withdraw(curreny, amount, address) ⇒ Object
67 68 69 |
# File 'lib/poloniex.rb', line 67 def self.withdraw( curreny, amount, address ) post 'widthdraw', currency: currency, amount: amount, address: address end |