Module: BittrexApi
- Defined in:
- lib/bittrex_api.rb,
lib/bittrex_api/version.rb
Defined Under Namespace
Classes: Configuration
Constant Summary collapse
- VERSION =
"1.0.4"
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
- .balance(currency) ⇒ Object
- .balances ⇒ Object
- .buy_limit(currency_pair, quantity, rate) ⇒ Object
- .cancel(uuid) ⇒ Object
- .currencies ⇒ Object
- .deposit_address(currency) ⇒ Object
- .deposit_history(currency = nil) ⇒ Object
- .market_history(currency_pair) ⇒ Object
- .market_summaries ⇒ Object
- .market_summary(currency_pair) ⇒ Object
- .markets ⇒ Object
- .open_orders(currency_pair = nil) ⇒ Object
- .order(uuid) ⇒ Object
- .order_book(currency_pair, type = 'both', depth = 10) ⇒ Object
- .order_history(currency_pair = nil) ⇒ Object
- .sell_limit(currency_pair, quantity, rate) ⇒ Object
- .setup {|@configuration| ... } ⇒ Object
- .ticker(currency_pair) ⇒ Object
- .withdraw(currency, quantity, address) ⇒ Object
- .withdrawal_history(currency = nil) ⇒ Object
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
8 9 10 |
# File 'lib/bittrex_api.rb', line 8 def configuration @configuration end |
Class Method Details
.balance(currency) ⇒ Object
73 74 75 |
# File 'lib/bittrex_api.rb', line 73 def self.balance( currency ) get_account 'getbalance', currency: currency end |
.balances ⇒ Object
69 70 71 |
# File 'lib/bittrex_api.rb', line 69 def self.balances get_account 'getbalances' end |
.buy_limit(currency_pair, quantity, rate) ⇒ Object
53 54 55 |
# File 'lib/bittrex_api.rb', line 53 def self.buy_limit( currency_pair, quantity, rate ) get_market 'buylimit', market: currency_pair, quantity: quantity, rate: rate end |
.cancel(uuid) ⇒ Object
61 62 63 |
# File 'lib/bittrex_api.rb', line 61 def self.cancel( uuid ) get_market 'cancel', uuid: uuid end |
.currencies ⇒ Object
29 30 31 |
# File 'lib/bittrex_api.rb', line 29 def self.currencies get_public 'getcurrencies' end |
.deposit_address(currency) ⇒ Object
77 78 79 |
# File 'lib/bittrex_api.rb', line 77 def self.deposit_address( currency ) get_account 'getdepositaddress', currency: currency end |
.deposit_history(currency = nil) ⇒ Object
98 99 100 |
# File 'lib/bittrex_api.rb', line 98 def self.deposit_history( currency = nil ) get_account 'getdeposithistory', currency: currency end |
.market_history(currency_pair) ⇒ Object
49 50 51 |
# File 'lib/bittrex_api.rb', line 49 def self.market_history( currency_pair ) get_public 'getmarkethistory', market: currency_pair end |
.market_summaries ⇒ Object
37 38 39 |
# File 'lib/bittrex_api.rb', line 37 def self.market_summaries get_public 'getmarketsummaries' end |
.market_summary(currency_pair) ⇒ Object
41 42 43 |
# File 'lib/bittrex_api.rb', line 41 def self.market_summary( currency_pair ) get_public 'getmarketsummary', market: currency_pair end |
.markets ⇒ Object
25 26 27 |
# File 'lib/bittrex_api.rb', line 25 def self.markets get_public 'getmarkets' end |
.open_orders(currency_pair = nil) ⇒ Object
65 66 67 |
# File 'lib/bittrex_api.rb', line 65 def self.open_orders( currency_pair = nil ) get_market 'getopenorders', market: currency_pair end |
.order(uuid) ⇒ Object
86 87 88 |
# File 'lib/bittrex_api.rb', line 86 def self.order( uuid ) get_account 'getorder', uuid: uuid end |
.order_book(currency_pair, type = 'both', depth = 10) ⇒ Object
45 46 47 |
# File 'lib/bittrex_api.rb', line 45 def self.order_book( currency_pair, type = 'both', depth = 10 ) get_public 'getorderbook', market: currency_pair, type: type, depth: depth end |
.order_history(currency_pair = nil) ⇒ Object
90 91 92 |
# File 'lib/bittrex_api.rb', line 90 def self.order_history( currency_pair = nil ) get_account 'getorderhistory', market: currency_pair end |
.sell_limit(currency_pair, quantity, rate) ⇒ Object
57 58 59 |
# File 'lib/bittrex_api.rb', line 57 def self.sell_limit( currency_pair, quantity, rate ) get_market 'selllimit', market: currency_pair, quantity: quantity, rate: rate end |
.setup {|@configuration| ... } ⇒ Object
11 12 13 14 |
# File 'lib/bittrex_api.rb', line 11 def self.setup @configuration ||= Configuration.new yield( @configuration ) end |
.ticker(currency_pair) ⇒ Object
33 34 35 |
# File 'lib/bittrex_api.rb', line 33 def self.ticker( currency_pair ) get_public 'getticker', market: currency_pair end |
.withdraw(currency, quantity, address) ⇒ Object
81 82 83 84 |
# File 'lib/bittrex_api.rb', line 81 def self.withdraw( currency, quantity, address ) get_account 'withdraw', currency: currency, quantity: quantity, address: address end |
.withdrawal_history(currency = nil) ⇒ Object
94 95 96 |
# File 'lib/bittrex_api.rb', line 94 def self.withdrawal_history( currency = nil ) get_account 'getwithdrawalhistory', currency: currency end |