vertpig 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +58 -0
  3. data/.gitignore +28 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +2 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +53 -0
  8. data/Rakefile +11 -0
  9. data/config/application.yml.example +2 -0
  10. data/lib/vertpig/client.rb +46 -0
  11. data/lib/vertpig/configuration.rb +33 -0
  12. data/lib/vertpig/currency.rb +27 -0
  13. data/lib/vertpig/deposit.rb +29 -0
  14. data/lib/vertpig/helpers.rb +10 -0
  15. data/lib/vertpig/market.rb +31 -0
  16. data/lib/vertpig/order.rb +66 -0
  17. data/lib/vertpig/quote.rb +26 -0
  18. data/lib/vertpig/summary.rb +38 -0
  19. data/lib/vertpig/version.rb +3 -0
  20. data/lib/vertpig/wallet.rb +26 -0
  21. data/lib/vertpig/withdrawal.rb +34 -0
  22. data/lib/vertpig.rb +32 -0
  23. data/spec/fixtures/currency.json +7 -0
  24. data/spec/fixtures/deposit.json +9 -0
  25. data/spec/fixtures/market.json +12 -0
  26. data/spec/fixtures/open_order.json +17 -0
  27. data/spec/fixtures/order.json +16 -0
  28. data/spec/fixtures/quote.json +5 -0
  29. data/spec/fixtures/summary.json +16 -0
  30. data/spec/fixtures/wallet.json +9 -0
  31. data/spec/fixtures/withdrawal.json +13 -0
  32. data/spec/models/configuration_spec.rb +27 -0
  33. data/spec/models/currency_spec.rb +14 -0
  34. data/spec/models/deposit_spec.rb +16 -0
  35. data/spec/models/helper_spec.rb +36 -0
  36. data/spec/models/market_spec.rb +17 -0
  37. data/spec/models/order_spec.rb +45 -0
  38. data/spec/models/quote_spec.rb +13 -0
  39. data/spec/models/summary_spec.rb +22 -0
  40. data/spec/models/wallet_spec.rb +16 -0
  41. data/spec/models/withdrawal_spec.rb +20 -0
  42. data/spec/spec_helper.rb +24 -0
  43. data/spec/support/api_helper.rb +9 -0
  44. data/vertpig.gemspec +30 -0
  45. metadata +220 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ba2b5017a039189e320dc94bbe38a641ea59c172
4
+ data.tar.gz: cc5a7aa3ba654b46d6c7afc16a9b8b3d9c404dc5
5
+ SHA512:
6
+ metadata.gz: 4debb7fb79bf70f8cea4170a106bd93fc3739b99d6acd0f1e51aeca5eaefd1d2e65b8255d27c3b5d1eab7ada02335fdd2214f6e27d8c7c4f471da1cccbba8ab1
7
+ data.tar.gz: 23575622d0c1b988b32f6e2c8a6ebfcb9c39a4e96d3293e76f15098363734c59d296f8062b0de304d56e8155fa9f6b49a2c2b0339210fafb654372a9ad7d84a5
@@ -0,0 +1,58 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+ jobs:
7
+ build:
8
+ docker:
9
+ # specify the version you desire here
10
+ - image: circleci/ruby:2.3.3-node-browsers
11
+
12
+ # Specify service dependencies here if necessary
13
+ # CircleCI maintains a library of pre-built images
14
+ # documented at https://circleci.com/docs/2.0/circleci-images/
15
+ # - image: circleci/postgres:9.4
16
+
17
+ working_directory: ~/repo
18
+
19
+ steps:
20
+ - checkout
21
+
22
+ # Download and cache dependencies
23
+ - restore_cache:
24
+ keys:
25
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
26
+ # fallback to using the latest cache if no exact match is found
27
+ - v1-dependencies-
28
+
29
+ - run:
30
+ name: install dependencies
31
+ command: |
32
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
33
+
34
+ - save_cache:
35
+ paths:
36
+ - ./vendor/bundle
37
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
38
+
39
+ # run tests!
40
+ - run:
41
+ name: run tests
42
+ command: |
43
+ mkdir /tmp/test-results
44
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
45
+
46
+ bundle exec rspec --format progress \
47
+ --format RspecJunitFormatter \
48
+ --out /tmp/test-results/rspec.xml \
49
+ --format progress \
50
+ -- \
51
+ $TEST_FILES
52
+
53
+ # collect reports
54
+ - store_test_results:
55
+ path: /tmp/test-results
56
+ - store_artifacts:
57
+ path: /tmp/test-results
58
+ destination: test-results
data/.gitignore ADDED
@@ -0,0 +1,28 @@
1
+ .DS_Store
2
+ *.gem
3
+ *.rbc
4
+ .rspec
5
+ .bundle
6
+ .config
7
+ .yardoc
8
+ Gemfile.lock
9
+ InstalledFiles
10
+ _yardoc
11
+ coverage
12
+ doc/
13
+ lib/bundler/man
14
+ pkg
15
+ rdoc
16
+ spec/reports
17
+ test/tmp
18
+ test/version_tmp
19
+ tmp
20
+ *.bundle
21
+ *.so
22
+ *.o
23
+ *.a
24
+ mkmf.log
25
+ script
26
+
27
+ # Ignore application configuration
28
+ /config/application.yml
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.4.2
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2018 American Trade Exchange, Inc.
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # Vertpig
2
+
3
+ Unofficial gem for the Vertpig API
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'vertpig'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install vertpig
18
+
19
+ ## Usage
20
+
21
+ The gem uses a simple mapping of API resources to models, with a majority of the attributes mapped to corresponding attributes on the corresponding class. There are some translations into a more "rubyish" verbage, but for the most part things are directly mapped.
22
+
23
+ require 'rubygems'
24
+ require 'vertpig'
25
+ >> Quote.current('BTC-LTC')
26
+ #=> #<Vertpig::Quote:0x000001015cd058 @market="BTC-LTC", @bid=0.015792, @ask=0.01602899, @last=0.015792, @raw={"Bid"=>0.015792, "Ask"=>0.01602899, "Last"=>0.015792}>
27
+
28
+ ## Authentication
29
+
30
+ You can authenticate access to your Vertpig account by configuring your implementation of the vertpig gem. This is accomplished by using a config block at the top of your application.
31
+
32
+ Set up your keys at: https://www.vertpig.com/account/api
33
+
34
+ Vertpig.config do |c|
35
+ c.key = 'my_api_key'
36
+ c.secret = 'my_api_secret'
37
+ end
38
+
39
+ ## Development
40
+
41
+ You can test out public API calls any time by running `bundle exec rake vertpig:console` and inputting your method.
42
+
43
+ If you want to test private API calls, you will need to create `config/application.yml` and add your Vertpig keys to it (`config/application.yml.example` provides a template for this).
44
+
45
+ Once you've added the API keys, run `bundle exec rake vertpig:console`
46
+
47
+ ## Contributing
48
+
49
+ 1. Fork it ( https://github.com/[my-github-username]/vertpig/fork )
50
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
51
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
52
+ 4. Push to the branch (`git push origin my-new-feature`)
53
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'figaro'
3
+
4
+ Figaro.application.path = File.expand_path('../config/application.yml', __FILE__)
5
+ Figaro.load
6
+
7
+ namespace :vertpig do
8
+ task :console do
9
+ exec "irb -r vertpig -I ./lib"
10
+ end
11
+ end
@@ -0,0 +1,2 @@
1
+ vertpig_api_key: xxx
2
+ vertpig_api_secret: yyy
@@ -0,0 +1,46 @@
1
+ require 'faraday'
2
+ require 'base64'
3
+ require 'json'
4
+
5
+ module Vertpig
6
+ class Client
7
+ HOST = 'https://www.vertpig.com/api/v1.1/'
8
+
9
+ attr_reader :key, :secret
10
+
11
+ def initialize(attrs = {})
12
+ @key = attrs[:key]
13
+ @secret = attrs[:secret]
14
+ end
15
+
16
+ def get(path, params = {}, headers = {})
17
+ nonce = Time.now.to_i
18
+ response = connection.get do |req|
19
+ url = "#{HOST}/#{path}"
20
+ req.params.merge!(params)
21
+ req.url(url)
22
+
23
+ if key
24
+ req.params[:apikey] = key
25
+ req.params[:nonce] = nonce
26
+ req.headers[:apisign] = signature(url, nonce)
27
+ end
28
+ end
29
+
30
+ JSON.parse(response.body)['result']
31
+ end
32
+
33
+ private
34
+
35
+ def signature(url, nonce)
36
+ OpenSSL::HMAC.hexdigest('sha512', secret, "#{url}?apikey=#{key}&nonce=#{nonce}")
37
+ end
38
+
39
+ def connection
40
+ @connection ||= Faraday.new(:url => HOST) do |faraday|
41
+ faraday.request :url_encoded
42
+ faraday.adapter Faraday.default_adapter
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,33 @@
1
+ require 'singleton'
2
+
3
+ module Vertpig
4
+ class Configuration
5
+ include Singleton
6
+
7
+ attr_accessor :key, :secret
8
+
9
+ @@defaults = {
10
+ key: ENV['vertpig_api_key'],
11
+ secret: ENV['vertpig_api_secret']
12
+ }
13
+
14
+ def self.defaults
15
+ @@defaults
16
+ end
17
+
18
+ def initialize
19
+ reset
20
+ end
21
+
22
+ def auth
23
+ {
24
+ key: key,
25
+ secret: secret
26
+ }
27
+ end
28
+
29
+ def reset
30
+ @@defaults.each_pair { |k, v| send("#{k}=", v) }
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,27 @@
1
+ module Vertpig
2
+ class Currency
3
+ attr_reader :name, :abbreviation, :minimum_confirmation, :transaction_fee, :active, :raw
4
+
5
+ alias_method :min_confirmation, :minimum_confirmation
6
+ alias_method :fee, :transaction_fee
7
+
8
+ def initialize(attrs = {})
9
+ @name = attrs['CurrencyLong']
10
+ @abbreviation = attrs['Currency']
11
+ @transaction_fee = attrs['TxFee']
12
+ @minimum_confirmation = attrs['MinConfirmation']
13
+ @active = attrs['IsActive']
14
+ @raw = attrs
15
+ end
16
+
17
+ def self.all
18
+ client.get('public/getcurrencies').map{|data| new(data) }
19
+ end
20
+
21
+ private
22
+
23
+ def self.client
24
+ @client ||= Vertpig.client
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,29 @@
1
+ module Vertpig
2
+ class Deposit
3
+ include Helpers
4
+
5
+ attr_reader :id, :transaction_id, :address, :quantity, :currency, :confirmations, :executed_at
6
+ attr_reader :raw
7
+
8
+ def initialize(attrs = {})
9
+ @id = attrs['Id']
10
+ @transaction_id = attrs['TxId']
11
+ @address = attrs['CryptoAddress']
12
+ @quantity = attrs['Amount']
13
+ @currency = attrs['Currency']
14
+ @confirmations = attrs['Confirmations']
15
+ @executed_at = extract_timestamp(attrs['LastUpdated'])
16
+ @raw = attrs
17
+ end
18
+
19
+ def self.all
20
+ client.get('account/getdeposithistory').map{|data| new(data) }
21
+ end
22
+
23
+ private
24
+
25
+ def self.client
26
+ @client ||= Vertpig.client
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,10 @@
1
+ require 'date'
2
+
3
+ module Vertpig
4
+ module Helpers
5
+ def extract_timestamp(value)
6
+ return if value.nil? or value.strip.empty?
7
+ DateTime.parse value
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,31 @@
1
+ require 'time'
2
+
3
+ module Vertpig
4
+ class Market
5
+ include Helpers
6
+
7
+ attr_reader :name, :currency, :base, :currency_name, :base_name, :minimum_trade, :active, :created_at, :raw
8
+
9
+ def initialize(attrs = {})
10
+ @name = attrs['MarketName']
11
+ @currency = attrs['MarketCurrency']
12
+ @base = attrs['BaseCurrency']
13
+ @currency_name = attrs['MarketCurrencyLong']
14
+ @base_name = attrs['BaseCurrencyLong']
15
+ @minimum_trade = attrs['MinTradeSize']
16
+ @active = attrs['IsActive']
17
+ @created_at = extract_timestamp(attrs['Created'])
18
+ @raw = attrs
19
+ end
20
+
21
+ def self.all
22
+ client.get('public/getmarkets').map{|data| new(data) }
23
+ end
24
+
25
+ private
26
+
27
+ def self.client
28
+ @client ||= Vertpig.client
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,66 @@
1
+ module Vertpig
2
+ class Order
3
+ include Helpers
4
+
5
+ attr_reader :type, :id, :limit, :opened_at, :closed_at,
6
+ :exchange, :price, :quantity, :remaining, :commission,
7
+ :total, :fill, :executed_at, :raw
8
+
9
+ def initialize(attrs = {})
10
+ @id = attrs['Id'] || attrs['OrderUuid']
11
+ @type = (attrs['Type'] || attrs['OrderType']).to_s.capitalize
12
+ @exchange = attrs['Exchange']
13
+ @quantity = attrs['Quantity']
14
+ @remaining = attrs['QuantityRemaining']
15
+ @price = attrs['Rate'] || attrs['Price']
16
+ @total = attrs['Total']
17
+ @fill = attrs['FillType']
18
+ @limit = attrs['Limit']
19
+ @commission = (attrs['Commission'] || attrs['CommissionPaid']).to_f
20
+ @raw = attrs
21
+ @opened_at = extract_timestamp(attrs['Opened'])
22
+ @executed_at = extract_timestamp(attrs['TimeStamp'])
23
+ @closed_at = extract_timestamp(attrs['Closed'])
24
+ end
25
+
26
+ def self.book(market, type, depth = 50)
27
+ orders = []
28
+
29
+ if type.to_sym == :both
30
+ orderbook(market, type.downcase, depth).each_pair do |type, values|
31
+ values.each do |data|
32
+ orders << new(data.merge('Type' => type))
33
+ end
34
+ end
35
+ else
36
+ orderbook(market, type.downcase, depth).each do |data|
37
+ orders << new(data.merge('Type' => type))
38
+ end
39
+ end
40
+
41
+ orders
42
+ end
43
+
44
+ def self.open
45
+ client.get('market/getopenorders').map{|data| new(data) }
46
+ end
47
+
48
+ def self.history
49
+ client.get('account/getorderhistory').map{|data| new(data) }
50
+ end
51
+
52
+ private
53
+
54
+ def self.orderbook(market, type, depth)
55
+ client.get('public/getorderbook', {
56
+ market: market,
57
+ type: type,
58
+ depth: depth
59
+ })
60
+ end
61
+
62
+ def self.client
63
+ @client ||= Vertpig.client
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,26 @@
1
+ module Vertpig
2
+ class Quote
3
+ attr_reader :market, :bid, :ask, :last, :raw
4
+
5
+ def initialize(market, attrs = {})
6
+ @market = market
7
+ return if attrs.nil?
8
+ @bid = attrs['Bid']
9
+ @ask = attrs['Ask']
10
+ @last = attrs['Last']
11
+ @raw = attrs
12
+ end
13
+
14
+ # Example:
15
+ # Vertpig::Quote.current('BTC-HPY')
16
+ def self.current(market)
17
+ new(market, client.get('public/getticker', market: market))
18
+ end
19
+
20
+ private
21
+
22
+ def self.client
23
+ @client ||= Vertpig.client
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,38 @@
1
+ module Vertpig
2
+ class Summary
3
+ include Helpers
4
+
5
+ attr_reader :name, :high, :low, :volume, :last, :base_volume, :raw, :created_at
6
+ attr_reader :bid, :ask, :open_buy_orders, :open_sell_orders, :previous_day, :updated_at
7
+
8
+ alias_method :vol, :volume
9
+ alias_method :base_vol, :base_volume
10
+
11
+ def initialize(attrs = {})
12
+ @name = attrs['MarketName']
13
+ @high = attrs['High']
14
+ @low = attrs['Low']
15
+ @volume = attrs['Volume']
16
+ @last = attrs['Last']
17
+ @base_volume = attrs['BaseVolume']
18
+ @bid = attrs['Bid']
19
+ @ask = attrs['Ask']
20
+ @open_buy_orders = attrs['OpenBuyOrders']
21
+ @open_sell_orders = attrs['OpenSellOrders']
22
+ @previous_day = attrs['PrevDay']
23
+ @updated_at = extract_timestamp(attrs['TimeStamp'])
24
+ @created_at = extract_timestamp(attrs['Created'])
25
+ @raw = attrs
26
+ end
27
+
28
+ def self.all
29
+ client.get('public/getmarketsummaries').map{|data| new(data) }
30
+ end
31
+
32
+ private
33
+
34
+ def self.client
35
+ @client ||= Vertpig.client
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,3 @@
1
+ module Vertpig
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1,26 @@
1
+ module Vertpig
2
+ class Wallet
3
+ attr_reader :id, :currency, :balance, :available, :pending, :address, :requested, :raw
4
+
5
+ def initialize(attrs = {})
6
+ @id = attrs['Uuid'].to_s
7
+ @address = attrs['CryptoAddress']
8
+ @currency = attrs['Currency']
9
+ @balance = attrs['Balance']
10
+ @available = attrs['Available']
11
+ @pending = attrs['Pending']
12
+ @raw = attrs
13
+ @requested = attrs['Requested']
14
+ end
15
+
16
+ def self.all
17
+ client.get('account/getbalances').map{|data| new(data) }
18
+ end
19
+
20
+ private
21
+
22
+ def self.client
23
+ @client ||= Vertpig.client
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,34 @@
1
+ module Vertpig
2
+ class Withdrawal
3
+ include Helpers
4
+
5
+ attr_reader :id, :currency, :quantity, :address, :authorized,
6
+ :pending, :canceled, :invalid_address,
7
+ :transaction_cost, :transaction_id, :executed_at, :raw
8
+
9
+ def initialize(attrs = {})
10
+ @id = attrs['PaymentUuid']
11
+ @currency = attrs['Currency']
12
+ @quantity = attrs['Amount']
13
+ @address = attrs['Address']
14
+ @authorized = attrs['Authorized']
15
+ @pending = attrs['PendingPayment']
16
+ @canceled = attrs['Canceled']
17
+ @invalid_address = attrs['Canceled']
18
+ @transaction_cost = attrs['TxCost']
19
+ @transaction_id = attrs['TxId']
20
+ @executed_at = extract_timestamp(attrs['Opened'])
21
+ @raw = attrs
22
+ end
23
+
24
+ def self.all
25
+ client.get('account/getwithdrawalhistory').map{|data| new(data) }
26
+ end
27
+
28
+ private
29
+
30
+ def self.client
31
+ @client ||= Vertpig.client
32
+ end
33
+ end
34
+ end
data/lib/vertpig.rb ADDED
@@ -0,0 +1,32 @@
1
+ require "vertpig/version"
2
+
3
+ module Vertpig
4
+ autoload :Helpers, 'vertpig/helpers'
5
+ autoload :Market, 'vertpig/market'
6
+ autoload :Client, 'vertpig/client'
7
+ autoload :Configuration, 'vertpig/configuration'
8
+ autoload :Currency, 'vertpig/currency'
9
+ autoload :Deposit, 'vertpig/deposit'
10
+ autoload :Order, 'vertpig/order'
11
+ autoload :Quote, 'vertpig/quote'
12
+ autoload :Summary, 'vertpig/summary'
13
+ autoload :Wallet, 'vertpig/wallet'
14
+ autoload :Withdrawal, 'vertpig/withdrawal'
15
+
16
+ def self.client
17
+ @client ||= Client.new(configuration.auth)
18
+ end
19
+
20
+ def self.config
21
+ yield configuration
22
+ @client = Client.new(configuration.auth)
23
+ end
24
+
25
+ def self.configuration
26
+ Configuration.instance
27
+ end
28
+
29
+ def self.root
30
+ File.expand_path('../..', __FILE__)
31
+ end
32
+ end
@@ -0,0 +1,7 @@
1
+ {
2
+ "CurrencyLong": "Bitcoin",
3
+ "Currency": "BTC",
4
+ "TxFee": 8.0e-08,
5
+ "MinConfirmation": 5,
6
+ "IsActive": true
7
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "Id": 2045339,
3
+ "Amount": 0.31074098,
4
+ "Currency": "BTC",
5
+ "Confirmations": 2,
6
+ "LastUpdated": "2014-06-16T22:57:17.457",
7
+ "TxId": "416ba84218c178e7befbe22b23bf1123a23ec2bc68678586a27cebdxxxb6",
8
+ "CryptoAddress": "17m3mcA3wo5kk637TgEysxxx2c89SDCRZDB"
9
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "MarketCurrency": "LTC",
3
+ "BaseCurrency": "BTC",
4
+ "MarketCurrencyLong": "Litecoin",
5
+ "BaseCurrencyLong": "Bitcoin",
6
+ "MinTradeSize": 0.01,
7
+ "MarketName": "BTC-LTC",
8
+ "IsActive": true,
9
+ "Created": "2014-02-13T00:00:00",
10
+ "DisplayMarketCurrency": null,
11
+ "DisplayMarketName": null
12
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "OrderUuid": "1af0399d-e845-4xxx-9d85-aa332d831e95",
3
+ "Exchange": "BTC-HPY",
4
+ "Opened": "2014-06-21T04:08:08.75",
5
+ "Closed": "2014-06-22T04:08:08.75",
6
+ "OrderType": "LIMIT_SELL",
7
+ "Limit": 1.6E-7,
8
+ "Quantity": 371810.26006413,
9
+ "QuantityRemaining": 371810.26006413,
10
+ "Price": 0.0,
11
+ "PricePerUnit": null,
12
+ "CancelInitiated": false,
13
+ "IsConditional": false,
14
+ "Condition": "NONE",
15
+ "ConditionTarget": null,
16
+ "ImmediateOrCancel": false
17
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "OrderUuid": "1af0399d-e845-4xxx-9d85-aa332d831e95",
3
+ "Exchange": "BTC-HPY",
4
+ "TimeStamp": "2014-06-21T04:08:08.75",
5
+ "OrderType": "LIMIT_SELL",
6
+ "Limit": 1.6E-7,
7
+ "Quantity": 371810.26006413,
8
+ "QuantityRemaining": 371810.26006413,
9
+ "Price": 0.0,
10
+ "PricePerUnit": null,
11
+ "CancelInitiated": false,
12
+ "IsConditional": false,
13
+ "Condition": "NONE",
14
+ "ConditionTarget": null,
15
+ "ImmediateOrCancel": false
16
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Bid": 0.01607601,
3
+ "Ask": 0.01633299,
4
+ "Last": 0.01635099
5
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "MarketName": "LTC-ZEIT",
3
+ "High": 2.3E-7,
4
+ "Low": 2.0E-7,
5
+ "Volume": 1406611.43827056,
6
+ "Last": 2.0E-7,
7
+ "BaseVolume": 0.30179011,
8
+ "TimeStamp": "2014-06-26T05:22:57.673",
9
+ "Bid": 2.0E-7,
10
+ "Ask": 2.3E-7,
11
+ "OpenBuyOrders": 7,
12
+ "OpenSellOrders": 8,
13
+ "PrevDay": 2.2E-7,
14
+ "Created": "2014-03-01T21:00:00",
15
+ "DisplayMarketName": null
16
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "Currency": "CRYPT",
3
+ "Balance": 115.0,
4
+ "Available": 0.0,
5
+ "Pending": 0.0,
6
+ "CryptoAddress": null,
7
+ "Requested": false,
8
+ "Uuid": "3dab465d-d0f2-4xxx-819f-aafad450f05b"
9
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "PaymentUuid": "c7f7b806-36cf-4xxx-b198-fcdeb1220762",
3
+ "Currency": "BTC",
4
+ "Amount": 0.0098,
5
+ "Address": "14UKkY9xxxvk79X7u1zYpxxxRUEQ8F7Lh5",
6
+ "Opened": "2014-06-26T05:37:55.083",
7
+ "Authorized": true,
8
+ "PendingPayment": false,
9
+ "TxCost": 0.0002,
10
+ "TxId": "0b34fc4xxx102d0f80efddafexxx6b77c6ce170100b2a579ab5b5f493a383392",
11
+ "Canceled": false,
12
+ "InvalidAddress": false
13
+ }
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Configuration do
4
+ context 'defaults' do
5
+ it 'is a hash of default configuration' do
6
+ expect(Vertpig::Configuration.defaults).to be_kind_of(Hash)
7
+ end
8
+ end
9
+
10
+ context 'access' do
11
+ it 'is callable from .config' do
12
+ Vertpig.config do |c|
13
+ expect(c).to be_kind_of(Vertpig::Configuration)
14
+ end
15
+ end
16
+
17
+ context 'options' do
18
+ let(:map) { { 'user' => { a: 1 } } }
19
+ let(:api_key) { 'my_special_key' }
20
+
21
+ it 'is able to set the options_key' do
22
+ Vertpig.config { |config| config.key = api_key }
23
+ expect(Vertpig.configuration.key).to eq(api_key)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Currency do
4
+ let(:data){ fixture(:currency) }
5
+ let(:subject){ Vertpig::Currency.new(data) }
6
+
7
+ describe '#initialization' do
8
+ it { should_assign_attribute(subject, :name, 'Bitcoin') }
9
+ it { should_assign_attribute(subject, :abbreviation, 'BTC') }
10
+ it { should_assign_attribute(subject, :transaction_fee, 0.00000008) }
11
+ it { should_assign_attribute(subject, :minimum_confirmation, 5) }
12
+ it { should_assign_attribute(subject, :active, true) }
13
+ end
14
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Deposit do
4
+ let(:data){ fixture(:deposit) }
5
+ let(:subject){ Vertpig::Deposit.new(data) }
6
+
7
+ describe '#initialization' do
8
+ it { should_assign_attribute(subject, :id, 2045339) }
9
+ it { should_assign_attribute(subject, :currency, 'BTC') }
10
+ it { should_assign_attribute(subject, :quantity, 0.31074098) }
11
+ it { should_assign_attribute(subject, :address, '17m3mcA3wo5kk637TgEysxxx2c89SDCRZDB') }
12
+ it { should_assign_attribute(subject, :transaction_id, '416ba84218c178e7befbe22b23bf1123a23ec2bc68678586a27cebdxxxb6') }
13
+ it { should_assign_attribute(subject, :confirmations, 2) }
14
+ it { should_assign_attribute(subject, :executed_at, DateTime.parse('2014-06-16T22:57:17.457')) }
15
+ end
16
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Helpers do
4
+ include Vertpig::Helpers
5
+ describe '#extract_timestamp' do
6
+ context 'when the argument is empty' do
7
+ it 'returns nil' do
8
+ expect(extract_timestamp(nil)).to be(nil)
9
+ end
10
+ end
11
+
12
+ context 'when the argument is an empty string' do
13
+ it 'returns nil' do
14
+ expect(extract_timestamp('')).to be(nil)
15
+ end
16
+ end
17
+
18
+ context 'when the argument is a string of spaces' do
19
+ it 'returns nil' do
20
+ expect(extract_timestamp(' ')).to be(nil)
21
+ end
22
+ end
23
+
24
+ context 'when the argument is datetime string' do
25
+ it 'returns a datetime object' do
26
+ expected_time_object = DateTime.now
27
+ time_string = expected_time_object.to_s
28
+ strftime_format = '%B %d, %Y %H %M %S'
29
+ expect(extract_timestamp(time_string).class).to eql(DateTime)
30
+ expect(
31
+ extract_timestamp(time_string).strftime(strftime_format)
32
+ ).to eql(expected_time_object.strftime(strftime_format))
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Market do
4
+ let(:data){ fixture(:market) }
5
+ let(:subject){ Vertpig::Market.new(data) }
6
+
7
+ describe '#initialization' do
8
+ it { should_assign_attribute(subject, :name, 'BTC-LTC') }
9
+ it { should_assign_attribute(subject, :currency, 'LTC') }
10
+ it { should_assign_attribute(subject, :base, 'BTC') }
11
+ it { should_assign_attribute(subject, :currency_name, 'Litecoin') }
12
+ it { should_assign_attribute(subject, :base_name, 'Bitcoin') }
13
+ it { should_assign_attribute(subject, :minimum_trade, 0.01) }
14
+ it { should_assign_attribute(subject, :active, true) }
15
+ it { should_assign_attribute(subject, :created_at, DateTime.parse('2014-02-13T00:00:00')) }
16
+ end
17
+ end
@@ -0,0 +1,45 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Order do
4
+ let(:data){ fixture(:order) }
5
+ let(:subject){ Vertpig::Order.new(data) }
6
+
7
+ attr_reader :type, :id, :quantity, :rate, :total, :fill, :raw, :executed_at, :commission, :opened_at, :closed_at
8
+
9
+ describe "closed order" do
10
+ context '#initialization' do
11
+ it { should_assign_attribute(subject, :id, '1af0399d-e845-4xxx-9d85-aa332d831e95') }
12
+ it { should_assign_attribute(subject, :type, 'Limit_sell') }
13
+ it { should_assign_attribute(subject, :exchange, 'BTC-HPY') }
14
+ it { should_assign_attribute(subject, :quantity, 371810.26006413) }
15
+ it { should_assign_attribute(subject, :remaining, 371810.26006413) }
16
+ it { should_assign_attribute(subject, :limit, 0.00000016) }
17
+ it { should_assign_attribute(subject, :price, 0.0) }
18
+ it { should_assign_attribute(subject, :total, nil) }
19
+ it { should_assign_attribute(subject, :fill, nil) }
20
+ it { should_assign_attribute(subject, :executed_at, DateTime.parse('2014-06-21T04:08:08.75')) }
21
+ it { should_assign_attribute(subject, :opened_at, nil) }
22
+ it { should_assign_attribute(subject, :closed_at, nil) }
23
+ end
24
+ end
25
+
26
+ describe "open order" do
27
+ let(:data) { fixture(:open_order) }
28
+
29
+ context '#initialization' do
30
+ it { should_assign_attribute(subject, :id, '1af0399d-e845-4xxx-9d85-aa332d831e95') }
31
+ it { should_assign_attribute(subject, :type, 'Limit_sell') }
32
+ it { should_assign_attribute(subject, :exchange, 'BTC-HPY') }
33
+ it { should_assign_attribute(subject, :quantity, 371810.26006413) }
34
+ it { should_assign_attribute(subject, :remaining, 371810.26006413) }
35
+ it { should_assign_attribute(subject, :limit, 0.00000016) }
36
+ it { should_assign_attribute(subject, :commission, 0.0) }
37
+ it { should_assign_attribute(subject, :price, 0.0) }
38
+ it { should_assign_attribute(subject, :total, nil) }
39
+ it { should_assign_attribute(subject, :fill, nil) }
40
+ it { should_assign_attribute(subject, :executed_at, nil) }
41
+ it { should_assign_attribute(subject, :opened_at, DateTime.parse('2014-06-21T04:08:08.75')) }
42
+ it { should_assign_attribute(subject, :closed_at, DateTime.parse('2014-06-22T04:08:08.75')) }
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Quote do
4
+ let(:data){ fixture(:quote) }
5
+ let(:subject){ Vertpig::Quote.new('BTC-HPY', data) }
6
+
7
+ describe '#initialization' do
8
+ it { should_assign_attribute(subject, :market, 'BTC-HPY') }
9
+ it { should_assign_attribute(subject, :bid, 0.01607601) }
10
+ it { should_assign_attribute(subject, :ask, 0.01633299) }
11
+ it { should_assign_attribute(subject, :last, 0.01635099) }
12
+ end
13
+ end
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Summary do
4
+ let(:data){ fixture(:summary) }
5
+ let(:subject){ Vertpig::Summary.new(data) }
6
+
7
+ describe '#initialization' do
8
+ it { should_assign_attribute(subject, :name, 'LTC-ZEIT') }
9
+ it { should_assign_attribute(subject, :high, 0.00000023) }
10
+ it { should_assign_attribute(subject, :low, 0.00000020) }
11
+ it { should_assign_attribute(subject, :volume, 1406611.43827056) }
12
+ it { should_assign_attribute(subject, :last, 0.00000020) }
13
+ it { should_assign_attribute(subject, :base_volume, 0.30179011) }
14
+ it { should_assign_attribute(subject, :ask, 2.3e-07) }
15
+ it { should_assign_attribute(subject, :bid, 2.0e-07) }
16
+ it { should_assign_attribute(subject, :open_buy_orders, 7) }
17
+ it { should_assign_attribute(subject, :open_sell_orders, 8) }
18
+ it { should_assign_attribute(subject, :previous_day, 2.2e-07) }
19
+ it { should_assign_attribute(subject, :updated_at, DateTime.parse('2014-06-26T05:22:57.673')) }
20
+ it { should_assign_attribute(subject, :created_at, DateTime.parse('2014-03-01T21:00:00.000')) }
21
+ end
22
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Wallet do
4
+ let(:data){ fixture(:wallet) }
5
+ let(:subject){ Vertpig::Wallet.new(data) }
6
+
7
+ describe '#initialization' do
8
+ it { should_assign_attribute(subject, :id, '3dab465d-d0f2-4xxx-819f-aafad450f05b') }
9
+ it { should_assign_attribute(subject, :currency, 'CRYPT') }
10
+ it { should_assign_attribute(subject, :balance, 115.0) }
11
+ it { should_assign_attribute(subject, :available, 0.0) }
12
+ it { should_assign_attribute(subject, :pending, 0.0) }
13
+ it { should_assign_attribute(subject, :address, nil) }
14
+ it { should_assign_attribute(subject, :requested, false) }
15
+ end
16
+ end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ describe Vertpig::Withdrawal do
4
+ let(:data){ fixture(:withdrawal) }
5
+ let(:subject){ Vertpig::Withdrawal.new(data) }
6
+
7
+ describe '#initialization' do
8
+ it { should_assign_attribute(subject, :id, 'c7f7b806-36cf-4xxx-b198-fcdeb1220762') }
9
+ it { should_assign_attribute(subject, :currency, 'BTC') }
10
+ it { should_assign_attribute(subject, :quantity, 0.0098) }
11
+ it { should_assign_attribute(subject, :address, '14UKkY9xxxvk79X7u1zYpxxxRUEQ8F7Lh5') }
12
+ it { should_assign_attribute(subject, :authorized, true) }
13
+ it { should_assign_attribute(subject, :pending, false) }
14
+ it { should_assign_attribute(subject, :canceled, false) }
15
+ it { should_assign_attribute(subject, :invalid_address, false) }
16
+ it { should_assign_attribute(subject, :transaction_cost, 0.0002) }
17
+ it { should_assign_attribute(subject, :transaction_id, '0b34fc4xxx102d0f80efddafexxx6b77c6ce170100b2a579ab5b5f493a383392') }
18
+ it { should_assign_attribute(subject, :executed_at, DateTime.parse('2014-06-26T05:37:55.083')) }
19
+ end
20
+ end
@@ -0,0 +1,24 @@
1
+ require 'json'
2
+ require 'simplecov'
3
+ SimpleCov.start
4
+
5
+ require 'rspec'
6
+ require 'vertpig'
7
+
8
+ Dir[File.join(Vertpig.root, 'spec/fixtures/**/*.rb')].each { |f| require f }
9
+ Dir[File.join(Vertpig.root, 'spec/support/**/*.rb')].each {|f| require f}
10
+
11
+ RSpec.configure do |config|
12
+ config.before(:each) do
13
+ allow(Vertpig).to receive(:client)
14
+ end
15
+ end
16
+
17
+ def fixture(resource)
18
+ path = File.join(Vertpig.root, "spec/fixtures/#{resource}.json")
19
+ JSON.parse File.read(path)
20
+ end
21
+
22
+ def should_assign_attribute(subject, method, value)
23
+ expect(subject.send(method)).to eq(value)
24
+ end
@@ -0,0 +1,9 @@
1
+ module APIHelper
2
+ def should_assign_attribute(subject, method, value)
3
+ subject.send(method).should eq(value)
4
+ end
5
+ end
6
+
7
+ RSpec.configure do |config|
8
+ config.extend APIHelper
9
+ end
data/vertpig.gemspec ADDED
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'vertpig/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "vertpig"
8
+ spec.version = Vertpig::VERSION
9
+ spec.authors = ["Vertbase"]
10
+ spec.email = ["dev@vertbase.com"]
11
+ spec.summary = %q{API Client for the Vertpig API}
12
+ spec.description = %q{API Client for the Vertpig API}
13
+ spec.homepage = "https://github.com/vertbase/vertpig"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency 'faraday', '>= 0.9.0'
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.6"
24
+ spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "rspec"
26
+ spec.add_development_dependency "rspec_junit_formatter"
27
+ spec.add_development_dependency "simplecov"
28
+ spec.add_development_dependency "mocha"
29
+ spec.add_development_dependency "figaro"
30
+ end
metadata ADDED
@@ -0,0 +1,220 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vertpig
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Vertbase
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-09-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.9.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.9.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec_junit_formatter
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: mocha
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: figaro
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: API Client for the Vertpig API
126
+ email:
127
+ - dev@vertbase.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".circleci/config.yml"
133
+ - ".gitignore"
134
+ - ".ruby-version"
135
+ - Gemfile
136
+ - LICENSE.txt
137
+ - README.md
138
+ - Rakefile
139
+ - config/application.yml.example
140
+ - lib/vertpig.rb
141
+ - lib/vertpig/client.rb
142
+ - lib/vertpig/configuration.rb
143
+ - lib/vertpig/currency.rb
144
+ - lib/vertpig/deposit.rb
145
+ - lib/vertpig/helpers.rb
146
+ - lib/vertpig/market.rb
147
+ - lib/vertpig/order.rb
148
+ - lib/vertpig/quote.rb
149
+ - lib/vertpig/summary.rb
150
+ - lib/vertpig/version.rb
151
+ - lib/vertpig/wallet.rb
152
+ - lib/vertpig/withdrawal.rb
153
+ - spec/fixtures/currency.json
154
+ - spec/fixtures/deposit.json
155
+ - spec/fixtures/market.json
156
+ - spec/fixtures/open_order.json
157
+ - spec/fixtures/order.json
158
+ - spec/fixtures/quote.json
159
+ - spec/fixtures/summary.json
160
+ - spec/fixtures/wallet.json
161
+ - spec/fixtures/withdrawal.json
162
+ - spec/models/configuration_spec.rb
163
+ - spec/models/currency_spec.rb
164
+ - spec/models/deposit_spec.rb
165
+ - spec/models/helper_spec.rb
166
+ - spec/models/market_spec.rb
167
+ - spec/models/order_spec.rb
168
+ - spec/models/quote_spec.rb
169
+ - spec/models/summary_spec.rb
170
+ - spec/models/wallet_spec.rb
171
+ - spec/models/withdrawal_spec.rb
172
+ - spec/spec_helper.rb
173
+ - spec/support/api_helper.rb
174
+ - vertpig.gemspec
175
+ homepage: https://github.com/vertbase/vertpig
176
+ licenses:
177
+ - MIT
178
+ metadata: {}
179
+ post_install_message:
180
+ rdoc_options: []
181
+ require_paths:
182
+ - lib
183
+ required_ruby_version: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ required_rubygems_version: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ requirements: []
194
+ rubyforge_project:
195
+ rubygems_version: 2.6.13
196
+ signing_key:
197
+ specification_version: 4
198
+ summary: API Client for the Vertpig API
199
+ test_files:
200
+ - spec/fixtures/currency.json
201
+ - spec/fixtures/deposit.json
202
+ - spec/fixtures/market.json
203
+ - spec/fixtures/open_order.json
204
+ - spec/fixtures/order.json
205
+ - spec/fixtures/quote.json
206
+ - spec/fixtures/summary.json
207
+ - spec/fixtures/wallet.json
208
+ - spec/fixtures/withdrawal.json
209
+ - spec/models/configuration_spec.rb
210
+ - spec/models/currency_spec.rb
211
+ - spec/models/deposit_spec.rb
212
+ - spec/models/helper_spec.rb
213
+ - spec/models/market_spec.rb
214
+ - spec/models/order_spec.rb
215
+ - spec/models/quote_spec.rb
216
+ - spec/models/summary_spec.rb
217
+ - spec/models/wallet_spec.rb
218
+ - spec/models/withdrawal_spec.rb
219
+ - spec/spec_helper.rb
220
+ - spec/support/api_helper.rb