coinbase-ruby 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95dc1d24dc32cd17d2781d876dfa1802aa5cd0c061adde263cec928767f4b882
4
- data.tar.gz: a7ea7a69384f0503f2ff44407bba4a07eb2b46a66f52ddff94ca32946e28e394
3
+ metadata.gz: 02a6a7c787dea087a53af60bd7b8cfc16f5bdb1e214aa301fdd1db1324a0ac85
4
+ data.tar.gz: d81beef8d543773b2baec925d57ed6dc14e0b952e7024bb56086c08e3a1cecea
5
5
  SHA512:
6
- metadata.gz: f5a578511565c78f1cdb33c5086503e8c27929c493b3180feb8e7753e2e1894edb9b496f1ec7eef004b0c00f85f72e7b8bdc642daf440b60ba0f0559cedba4dd
7
- data.tar.gz: 226b70ab8f59e845f0014b00120faefbc8616dad767143a703aed349c959acc9e198043c699abdc8869fa59c4e67220b52fb25218a6d08922bfac98b3d8b98d1
6
+ metadata.gz: c81f237de3da81c91ec7457622d1c015589070cc28d2089d76333fe7a555f5cec9ef0beafa5637ed362eb98e035d126242ba51e7076945da74ba01cd33fadf49
7
+ data.tar.gz: 44d7af6dd6fae233035ee108fcc5dd69baaff74a5f0e63d1d37c74252164a422edc7bc9c5f84761a6d994b15a58d20cdb692952e792021e5e77e7e371ce0a493
@@ -0,0 +1,12 @@
1
+ module Coinbase
2
+ class ExchangeRates
3
+
4
+ # Get exchange rates for a given currency.
5
+ #
6
+ # @params [String] currency
7
+ # @return [Hash] a list of spot prices.
8
+ def get(currency)
9
+ send_request("/exchange-rates")
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,30 @@
1
+ module Coinbase
2
+ class Prices
3
+
4
+ # Get buy prices for a given currency pair.
5
+ #
6
+ # @params [String] currency pair
7
+ # @return [Hash] a list of buy prices.
8
+ def buy(currency_pair)
9
+ send_request("/prices/#{currency_pair}/buy")
10
+ end
11
+
12
+
13
+ # Get sell prices for a given currency pair.
14
+ #
15
+ # @params [String] currency pair
16
+ # @return [Hash] a list of sell prices.
17
+ def sell(currency_pair)
18
+ send_request("/prices/#{currency_pair}/sell")
19
+ end
20
+
21
+
22
+ # Get spot prices for a given currency pair.
23
+ #
24
+ # @params [String] currency pair
25
+ # @return [Hash] a list of spot prices.
26
+ def spot(currency_pair)
27
+ send_request("/prices/#{currency_pair}/spot")
28
+ end
29
+ end
30
+ end
data/lib/coinbase.rb CHANGED
@@ -14,6 +14,8 @@ require 'coinbase/withdrawals'
14
14
  require 'coinbase/fees'
15
15
  require 'coinbase/deposits'
16
16
  require 'coinbase/conversions'
17
+ require 'coinbase/prices'
18
+ require 'coinbase/exchange_rates'
17
19
 
18
20
  # Coinbase base module
19
21
  module Coinbase
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinbase-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nisha Jadhav
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-22 00:00:00.000000000 Z
11
+ date: 2022-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -78,8 +78,10 @@ files:
78
78
  - lib/coinbase/conversions.rb
79
79
  - lib/coinbase/currency.rb
80
80
  - lib/coinbase/deposits.rb
81
+ - lib/coinbase/exchange_rates.rb
81
82
  - lib/coinbase/fees.rb
82
83
  - lib/coinbase/orders.rb
84
+ - lib/coinbase/prices.rb
83
85
  - lib/coinbase/products.rb
84
86
  - lib/coinbase/transactions.rb
85
87
  - lib/coinbase/transfers.rb