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 +4 -4
- data/lib/coinbase/exchange_rates.rb +12 -0
- data/lib/coinbase/prices.rb +30 -0
- data/lib/coinbase.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02a6a7c787dea087a53af60bd7b8cfc16f5bdb1e214aa301fdd1db1324a0ac85
|
4
|
+
data.tar.gz: d81beef8d543773b2baec925d57ed6dc14e0b952e7024bb56086c08e3a1cecea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c81f237de3da81c91ec7457622d1c015589070cc28d2089d76333fe7a555f5cec9ef0beafa5637ed362eb98e035d126242ba51e7076945da74ba01cd33fadf49
|
7
|
+
data.tar.gz: 44d7af6dd6fae233035ee108fcc5dd69baaff74a5f0e63d1d37c74252164a422edc7bc9c5f84761a6d994b15a58d20cdb692952e792021e5e77e7e371ce0a493
|
@@ -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
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.
|
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:
|
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
|