bitstamper 0.1.0 → 0.1.1
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/Gemfile.lock +1 -1
- data/bitstamper.gemspec +1 -1
- data/lib/bitstamper/rest/public/ticker.rb +6 -6
- data/lib/bitstamper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed43fa9400ddf2ed372361cb04d17f6584a25d747e232fa587b1319146fa6f36
|
4
|
+
data.tar.gz: e7c5648688d202a22b84d81c5f2b6adf63a7560275f52ca465eebba263ae7eb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69c17f47a1a982a49a0cb349a051f5881a66f8b0a13ca960764df20d3fff30a134922e671db0bee86957a7ab8bd94a906f4c3b2f5dcfc953be5f45bd9c10fbe1
|
7
|
+
data.tar.gz: 3570987aee725f6e8fb3a21220f69158a1c853c9e1a791590ca6fffcfe13118b80729edd436fbccc23a156fbde1d419e5424cad2bf9a118b66537f13798711a2
|
data/Gemfile.lock
CHANGED
data/bitstamper.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["sebastian.johnsson@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Ruby client for Bitstamp's API'}
|
13
|
-
spec.description = %q{
|
13
|
+
spec.description = %q{Ruby REST + Websocket client for interacting with Bitstamp's API}
|
14
14
|
spec.homepage = "https://github.com/SebastianJ/Bitstamper"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
@@ -3,15 +3,15 @@ module Bitstamper
|
|
3
3
|
module Public
|
4
4
|
module Ticker
|
5
5
|
|
6
|
-
def daily_ticker(currency_pair: "btcusd")
|
7
|
-
ticker(currency_pair: currency_pair, interval: :daily)
|
6
|
+
def daily_ticker(currency_pair: "btcusd", options: {})
|
7
|
+
ticker(currency_pair: currency_pair, interval: :daily, options: options)
|
8
8
|
end
|
9
9
|
|
10
|
-
def hourly_ticker(currency_pair: "btcusd")
|
11
|
-
ticker(currency_pair: currency_pair, interval: :hourly)
|
10
|
+
def hourly_ticker(currency_pair: "btcusd", options: {})
|
11
|
+
ticker(currency_pair: currency_pair, interval: :hourly, options: options)
|
12
12
|
end
|
13
13
|
|
14
|
-
def ticker(currency_pair: "btcusd", interval: :daily)
|
14
|
+
def ticker(currency_pair: "btcusd", interval: :daily, options: {})
|
15
15
|
path = case interval.to_sym
|
16
16
|
when :daily
|
17
17
|
!currency_pair.to_s.empty? ? "/v2/ticker/#{::Bitstamper::Utilities.fix_currency_pair(currency_pair)}" : "/ticker"
|
@@ -19,7 +19,7 @@ module Bitstamper
|
|
19
19
|
!currency_pair.to_s.empty? ? "/v2/ticker_hour/#{::Bitstamper::Utilities.fix_currency_pair(currency_pair)}" : "/ticker_hour"
|
20
20
|
end
|
21
21
|
|
22
|
-
response = get(path)
|
22
|
+
response = get(path, options: options)
|
23
23
|
|
24
24
|
::Bitstamper::Models::Ticker.new(response.merge("currency_pair" => currency_pair)) if response
|
25
25
|
end
|
data/lib/bitstamper/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitstamper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SebastianJ
|
@@ -150,7 +150,7 @@ dependencies:
|
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '3.1'
|
153
|
-
description:
|
153
|
+
description: Ruby REST + Websocket client for interacting with Bitstamp's API
|
154
154
|
email:
|
155
155
|
- sebastian.johnsson@gmail.com
|
156
156
|
executables: []
|