coinfresh 0.0.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.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +1 -0
  7. data/coinfresh.gemspec +27 -0
  8. data/lib/coinfresh.rb +59 -0
  9. data/lib/coinfresh/api/base.rb +18 -0
  10. data/lib/coinfresh/api/cash_flow.rb +20 -0
  11. data/lib/coinfresh/api/currency.rb +19 -0
  12. data/lib/coinfresh/api/market.rb +25 -0
  13. data/lib/coinfresh/api/order.rb +43 -0
  14. data/lib/coinfresh/api/wallet.rb +21 -0
  15. data/lib/coinfresh/api/withdraw.rb +21 -0
  16. data/lib/coinfresh/api_operation/create.rb +12 -0
  17. data/lib/coinfresh/api_operation/destroy.rb +11 -0
  18. data/lib/coinfresh/api_operation/find.rb +16 -0
  19. data/lib/coinfresh/api_operation/list.rb +13 -0
  20. data/lib/coinfresh/api_operation/new.rb +11 -0
  21. data/lib/coinfresh/api_operation/update.rb +12 -0
  22. data/lib/coinfresh/client.rb +39 -0
  23. data/lib/coinfresh/http.rb +106 -0
  24. data/lib/coinfresh/model/base.rb +175 -0
  25. data/lib/coinfresh/model/cash_flow.rb +17 -0
  26. data/lib/coinfresh/model/currency.rb +18 -0
  27. data/lib/coinfresh/model/market.rb +18 -0
  28. data/lib/coinfresh/model/order.rb +22 -0
  29. data/lib/coinfresh/model/trade.rb +18 -0
  30. data/lib/coinfresh/model/wallet.rb +22 -0
  31. data/lib/coinfresh/model/withdraw.rb +21 -0
  32. data/lib/coinfresh/version.rb +3 -0
  33. data/spec/api/cash_flow_spec.rb +23 -0
  34. data/spec/api/currency_spec.rb +24 -0
  35. data/spec/api/market_spec.rb +52 -0
  36. data/spec/api/order_spec.rb +55 -0
  37. data/spec/api/wallet_spec.rb +40 -0
  38. data/spec/api/withdraw_spec.rb +43 -0
  39. data/spec/cassettes/Coinfresh_Api_CashFlow/_list/gets_all_the_cashflows_for_currency.yml +64 -0
  40. data/spec/cassettes/Coinfresh_Api_Currency/_list/gets_all_the_currencies.yml +64 -0
  41. data/spec/cassettes/Coinfresh_Api_Market/_find/gets_a_market_with_the_given_id.yml +64 -0
  42. data/spec/cassettes/Coinfresh_Api_Market/_list/gets_all_the_markets.yml +64 -0
  43. data/spec/cassettes/Coinfresh_Api_Market/_trades/gets_all_trades_for_a_market.yml +64 -0
  44. data/spec/cassettes/Coinfresh_Api_Order/_cancel/cancels_an_order.yml +65 -0
  45. data/spec/cassettes/Coinfresh_Api_Order/_create/creates_an_order.yml +64 -0
  46. data/spec/cassettes/Coinfresh_Api_Order/_list/gets_all_the_orders.yml +67 -0
  47. data/spec/cassettes/Coinfresh_Api_Order/_my/gets_all_the_orders.yml +67 -0
  48. data/spec/cassettes/Coinfresh_Api_Wallet/_create/creates_a_wallet_with_the_given_id.yml +64 -0
  49. data/spec/cassettes/Coinfresh_Api_Wallet/_list/gets_all_the_wallets.yml +64 -0
  50. data/spec/cassettes/Coinfresh_Api_Withdraw/_create/creates_a_wallet_with_the_given_id.yml +64 -0
  51. data/spec/cassettes/Coinfresh_Api_Withdraw/_list/gets_all_the_wallets.yml +64 -0
  52. data/spec/spec_helper.rb +22 -0
  53. data/spec/support/common_let_helpers.rb +62 -0
  54. data/spec/support/json_api_helpers.rb +5 -0
  55. metadata +190 -0
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+
3
+ module Coinfresh
4
+ module Api
5
+ describe Currency, :vcr do
6
+
7
+ describe "#list" do
8
+ it "gets all the currencies" do
9
+ currencies = client.currencies.list
10
+ expect(currencies.count).to be > 0
11
+ currency = currencies.first
12
+ expect(currency.id).not_to be_nil
13
+ expect(currency.name).not_to be_nil
14
+ expect(currency.ticker).not_to be_nil
15
+ expect(currency.withdraw_transaction_fee).not_to be_nil
16
+ expect(currency.deposit_confirmations).not_to be_nil
17
+ end
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+
24
+ end
@@ -0,0 +1,52 @@
1
+ require 'spec_helper'
2
+
3
+ module Coinfresh
4
+ module Api
5
+ describe Market, :vcr do
6
+
7
+ describe "#list" do
8
+ it "gets all the markets" do
9
+ markets = client.markets.list
10
+ expect(markets.count).to be > 0
11
+ market = markets.first
12
+ expect(market.id).not_to be_nil
13
+ expect(market.last_price).not_to be_nil
14
+ expect(market.name).not_to be_nil
15
+ expect(market.currency).not_to be_nil
16
+ expect(market.base_currency).not_to be_nil
17
+ expect(market.currency.ticker).not_to be_nil
18
+ expect(market.base_currency.ticker).not_to be_nil
19
+ end
20
+ end
21
+
22
+ describe "#find" do
23
+ it "gets a market with the given id" do
24
+ market = client.markets.find(1)
25
+ expect(market.id).not_to be_nil
26
+ expect(market.last_price).not_to be_nil
27
+ expect(market.name).not_to be_nil
28
+ expect(market.currency).not_to be_nil
29
+ expect(market.base_currency).not_to be_nil
30
+ expect(market.currency.ticker).not_to be_nil
31
+ expect(market.base_currency.ticker).not_to be_nil
32
+ end
33
+ end
34
+
35
+ describe "#trades" do
36
+ it "gets all trades for a market" do
37
+ trades = client.markets.trades(1)
38
+ trade = trades.first
39
+ expect(trade.id).not_to be_nil
40
+ expect(trade.created_at).not_to be_nil
41
+ expect(trade.amount).not_to be_nil
42
+ expect(trade.price).not_to be_nil
43
+ expect(trade.buy_order_id).not_to be_nil
44
+ expect(trade.sell_order_id).not_to be_nil
45
+ end
46
+ end
47
+
48
+ end
49
+
50
+ end
51
+
52
+ end
@@ -0,0 +1,55 @@
1
+ require 'spec_helper'
2
+
3
+ module Coinfresh
4
+ module Api
5
+ describe Order, :vcr do
6
+
7
+ describe "#my" do
8
+ it "gets all the orders" do
9
+ my_orders = client.orders.my
10
+ expect(my_orders.count).to be > 0
11
+ order = my_orders.first
12
+ expect(order.order_type).not_to be_nil
13
+ expect(order.amount).not_to be_nil
14
+ expect(order.price).not_to be_nil
15
+ expect(order.market_id).not_to be_nil
16
+ expect(order.filled_amount).not_to be_nil
17
+ expect(order.status).not_to be_nil
18
+ end
19
+ end
20
+
21
+ describe "#create" do
22
+ let(:order_param){
23
+ {
24
+ 'order_type' => "buy",
25
+ 'amount' => 0.001,
26
+ 'price' => 0.001,
27
+ 'market_id' => 2
28
+ }
29
+ }
30
+ it "creates an order" do
31
+ order = client.orders.new(order_param)
32
+ returned_order = order.save
33
+ expect(returned_order.id).not_to be_nil
34
+ expect(returned_order.order_type).to eql order_param['order_type']
35
+ expect(returned_order.amount).to eql order_param['amount']
36
+ expect(returned_order.price).to eql order_param['price']
37
+ expect(returned_order.market_id).to eql order_param['market_id']
38
+ expect(returned_order.filled_amount).to eql 0.0
39
+ expect(returned_order.status).to eql "active"
40
+ end
41
+ end
42
+
43
+ describe "#cancel" do
44
+ it "cancels an order" do
45
+ returned_order = client.orders.cancel(18)
46
+ expect(returned_order.id).not_to be_nil
47
+ expect(returned_order.status).to eql "cancelled"
48
+ end
49
+ end
50
+
51
+ end
52
+
53
+ end
54
+
55
+ end
@@ -0,0 +1,40 @@
1
+ require 'spec_helper'
2
+
3
+ module Coinfresh
4
+ module Api
5
+ describe Wallet, :vcr do
6
+
7
+ describe "#list" do
8
+ it "gets all the wallets" do
9
+ wallets = client.wallets.list
10
+ expect(wallets.count).to be > 0
11
+ wallet = wallets.first
12
+ expect(wallet.id).not_to be_nil
13
+ expect(wallet.balance).not_to be_nil
14
+ expect(wallet.deposit_address).not_to be_nil
15
+ expect(wallet.in_escrow).not_to be_nil
16
+ expect(wallet.total_withdraw).not_to be_nil
17
+ expect(wallet.unconfirmed_deposit).not_to be_nil
18
+ expect(wallet.currency).not_to be_nil
19
+ end
20
+ end
21
+
22
+ describe "#create" do
23
+ it "creates a wallet with the given id" do
24
+ wallet = client.wallets.create(currency_id: 4)
25
+ expect(wallet.id).not_to be_nil
26
+ expect(wallet.balance).not_to be_nil
27
+ expect(wallet.deposit_address).not_to be_nil
28
+ expect(wallet.in_escrow).not_to be_nil
29
+ expect(wallet.total_withdraw).not_to be_nil
30
+ expect(wallet.unconfirmed_deposit).not_to be_nil
31
+ expect(wallet.currency).not_to be_nil
32
+ end
33
+ end
34
+
35
+
36
+ end
37
+
38
+ end
39
+
40
+ end
@@ -0,0 +1,43 @@
1
+ require 'spec_helper'
2
+
3
+ module Coinfresh
4
+ module Api
5
+ describe Withdraw, :vcr do
6
+
7
+ describe "#list" do
8
+ it "gets all the wallets" do
9
+ withdraws = client.withdraws.list(wallet_id: 2)
10
+ expect(withdraws.count).to be > 0
11
+ withdraw = withdraws.first
12
+ expect(withdraw.id).not_to be_nil
13
+ expect(withdraw.created_at).not_to be_nil
14
+ expect(withdraw.address).not_to be_nil
15
+ expect(withdraw.amount).not_to be_nil
16
+ expect(withdraw.status).not_to be_nil
17
+ expect(withdraw.txid).not_to be_nil
18
+ expect(withdraw.wallet).not_to be_nil
19
+ end
20
+ end
21
+
22
+ describe "#create" do
23
+ it "creates a wallet with the given id" do
24
+ withdraw = client.withdraws.create(
25
+ {address: "mxcA1w3sEfWUjjRYSUozFxzdiiHwK4dptF", amount: 0.001},
26
+ {password: "password", wallet_id: 2}
27
+ )
28
+
29
+ expect(withdraw.id).not_to be_nil
30
+ expect(withdraw.created_at).not_to be_nil
31
+ expect(withdraw.address).not_to be_nil
32
+ expect(withdraw.amount).not_to be_nil
33
+ expect(withdraw.status).not_to be_nil
34
+ expect(withdraw.wallet).not_to be_nil
35
+ end
36
+ end
37
+
38
+
39
+ end
40
+
41
+ end
42
+
43
+ end
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v1/cash_flows?currency=BTC&limit=2
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ - text/json
15
+ User-Agent:
16
+ - Ruby
17
+ Date:
18
+ - Tue, 29 Jul 2014 05:39:28 GMT
19
+ Authorization:
20
+ - APIAuth da5AgdjTchH4a5APfkBRVW8jQ6zdbiQPD2i3huaY:ofaQVitXJ55oZSF4JQbnlf3+Qsc=
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ X-Frame-Options:
27
+ - DENY
28
+ X-Xss-Protection:
29
+ - 1; mode=block
30
+ X-Content-Type-Options:
31
+ - nosniff
32
+ X-Ua-Compatible:
33
+ - chrome=1
34
+ Content-Security-Policy-Report-Only:
35
+ - default-src 'self'; connect-src 'self' ws://localhost:9292 ws://testnet.CoinFresh.com:9292
36
+ wss://CoinFresh.com:4443; font-src 'self'; frame-src 'self'; img-src 'self'
37
+ https://www.google-analytics.com/ data:; media-src 'self'; object-src 'self';
38
+ script-src 'self' http://localhost:9292 http://testnet.CoinFresh.com:9292
39
+ https://CoinFresh.com:4443 https://ssl.google-analytics.com/ https://www.google-analytics.com/;
40
+ style-src 'self' 'unsafe-inline';
41
+ Content-Type:
42
+ - application/json; charset=utf-8
43
+ Etag:
44
+ - '"09d33313419f568a8c552760ec08527b"'
45
+ Cache-Control:
46
+ - max-age=0, private, must-revalidate
47
+ Set-Cookie:
48
+ - XSRF-TOKEN=RbGxJxOTbbMg9Btp63TNAq4TVQC2WAHreQpD0P836ks%3D; path=/
49
+ - _planetaltcoin_session=S1k3T0h2QWdPUml0YURFQWxVWTJheVpNV2hzNmFXdmI2UlNSTmIrRlo0eExxREVXbXNWdGFYZ0ZKa2RCVVl1ajQya2ROM1pBbm1yWGwvLzVtVnRwdm95L2FuWVIxYnBHZEYzWUpkYU42WnhLb2p6Yk1ORmg5NGxmVXlvZ29VK3BkOG0vYUFvTVNiQnZkN0QrZXlnLzVaL3diWVRzTDg2VVVnYWh6Y25DL0xIRnY5T3AxSkw3cHEzdk1tMWNZMW90LS1GVXNseVBGWjJsN1lpbk0rNXUrdVZRPT0%3D--3151f41fd735a5419b8395bc3056d3cdb77b0460;
50
+ path=/; HttpOnly
51
+ X-Request-Id:
52
+ - 85248a48-598b-4828-8cee-1d945aeb7ea2
53
+ X-Runtime:
54
+ - '0.141131'
55
+ Connection:
56
+ - close
57
+ Server:
58
+ - thin 1.5.1 codename Straight Razor
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"cash_flows":[{"id":628048,"amount":300.0,"cash_type":"deposit","created_at":"2014-07-26T21:55:26.492Z"},{"id":628045,"amount":300.0,"cash_type":"deposit","created_at":"2014-07-26T21:54:55.616Z"},{"id":628042,"amount":300.0,"cash_type":"deposit","created_at":"2014-07-26T21:54:46.455Z"},{"id":628017,"amount":-30.15,"cash_type":"sell","created_at":"2014-06-23T11:35:50.638Z"},{"id":628016,"amount":33.83,"cash_type":"buy","created_at":"2014-06-23T11:35:50.378Z"},{"id":628001,"amount":-42.21,"cash_type":"sell","created_at":"2014-06-23T11:35:44.238Z"},{"id":627993,"amount":-17.085,"cash_type":"sell","created_at":"2014-06-23T11:35:42.902Z"},{"id":627981,"amount":-30.15,"cash_type":"sell","created_at":"2014-06-23T11:35:37.511Z"},{"id":627977,"amount":-128.64,"cash_type":"sell","created_at":"2014-06-23T11:35:37.342Z"},{"id":627959,"amount":74.625,"cash_type":"buy","created_at":"2014-06-23T11:35:27.785Z"},{"id":627955,"amount":14.925,"cash_type":"buy","created_at":"2014-06-23T11:35:27.552Z"},{"id":627952,"amount":-17.085,"cash_type":"sell","created_at":"2014-06-23T11:35:27.355Z"},{"id":627947,"amount":-63.315,"cash_type":"sell","created_at":"2014-06-23T11:35:26.523Z"},{"id":627922,"amount":50.745,"cash_type":"buy","created_at":"2014-06-23T11:35:19.278Z"},{"id":627919,"amount":-66.33,"cash_type":"sell","created_at":"2014-06-23T11:35:19.102Z"},{"id":627915,"amount":-153.765,"cash_type":"sell","created_at":"2014-06-23T11:35:18.475Z"},{"id":627914,"amount":131.34,"cash_type":"buy","created_at":"2014-06-23T11:35:13.661Z"},{"id":627882,"amount":-78.39,"cash_type":"sell","created_at":"2014-06-23T11:35:05.251Z"},{"id":627878,"amount":-56.28,"cash_type":"sell","created_at":"2014-06-23T11:35:05.078Z"},{"id":627853,"amount":6.965,"cash_type":"buy","created_at":"2014-06-23T11:35:02.451Z"},{"id":627850,"amount":-16.08,"cash_type":"sell","created_at":"2014-06-23T11:35:02.423Z"},{"id":627848,"amount":27.86,"cash_type":"buy","created_at":"2014-06-23T11:35:02.220Z"},{"id":627844,"amount":6.965,"cash_type":"buy","created_at":"2014-06-23T11:35:01.893Z"},{"id":627814,"amount":43.78,"cash_type":"buy","created_at":"2014-06-23T11:34:54.604Z"},{"id":627798,"amount":34.825,"cash_type":"buy","created_at":"2014-06-23T11:34:48.611Z"}],"meta":{"total":80275,"per_page":25,"order":"cash_flows.id","order_dir":"asc","num_pages":3211}}'
62
+ http_version:
63
+ recorded_at: Tue, 29 Jul 2014 05:39:28 GMT
64
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v1/currencies
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ - text/json
15
+ User-Agent:
16
+ - Ruby
17
+ Date:
18
+ - Tue, 29 Jul 2014 02:24:51 GMT
19
+ Authorization:
20
+ - APIAuth dLXRyDy78ifx2robPiU5:YvQQFk+mqTdk0Jb5iuFc04fbYtM=
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ X-Frame-Options:
27
+ - DENY
28
+ X-Xss-Protection:
29
+ - 1; mode=block
30
+ X-Content-Type-Options:
31
+ - nosniff
32
+ X-Ua-Compatible:
33
+ - chrome=1
34
+ Content-Security-Policy-Report-Only:
35
+ - default-src 'self'; connect-src 'self' ws://localhost:9292 ws://testnet.CoinFresh.com:9292
36
+ wss://CoinFresh.com:4443; font-src 'self'; frame-src 'self'; img-src 'self'
37
+ https://www.google-analytics.com/ data:; media-src 'self'; object-src 'self';
38
+ script-src 'self' http://localhost:9292 http://testnet.CoinFresh.com:9292
39
+ https://CoinFresh.com:4443 https://ssl.google-analytics.com/ https://www.google-analytics.com/;
40
+ style-src 'self' 'unsafe-inline';
41
+ Content-Type:
42
+ - application/json; charset=utf-8
43
+ Etag:
44
+ - '"00b3fc05bd837a5f61004f40bcbc4ebe"'
45
+ Cache-Control:
46
+ - max-age=0, private, must-revalidate
47
+ Set-Cookie:
48
+ - XSRF-TOKEN=wW83K6KP3UZk7xpCVaRPhBk6iOfxZeIil09QXU88T%2Bg%3D; path=/
49
+ - _planetaltcoin_session=NXZDZUl5NTBQRXVBWEo1YnJ4cjhVYmhwZHlHbzFFcDBORmZDc1VlWHFlQWI4QmM3OTBpS2tFL3ZTUzg5ZVZaWmdPbGJPeU9EalIwREo2SU1pYXEycWdNZzVydTJOUjhzM2hBd2w0RGp2QUVLWXhrQWYweEZTS1l6QjZqeGlSQ2F2aGd6Y3p1eWpLMS9qVElsMFlvMmlqb3R1S29QQ2k2UFlpbWp0aDhxd2JDcERtaXR1Rm0za3ZtT0lPWnA2ZEo4LS1nL2JGZW9FREk1dk83NDFkQWhDcW5RPT0%3D--eca8df279a045c54fb54907ac6aa289ad511f7e1;
50
+ path=/; HttpOnly
51
+ X-Request-Id:
52
+ - 8ebf03f7-e15b-4c41-8709-246255e64f6f
53
+ X-Runtime:
54
+ - '0.029091'
55
+ Connection:
56
+ - close
57
+ Server:
58
+ - thin 1.5.1 codename Straight Razor
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"currencies":[{"id":1,"name":"Bitcoin","ticker":"BTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3},{"id":2,"name":"Litecoin","ticker":"LTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":6},{"id":3,"name":"Dogecoin","ticker":"DOGE","withdraw_transaction_fee":0.0001,"deposit_confirmations":12},{"id":4,"name":"Namecoin","ticker":"NMC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3}],"meta":{"total":4,"per_page":25,"order":"currencies.id","order_dir":"asc","num_pages":1}}'
62
+ http_version:
63
+ recorded_at: Tue, 29 Jul 2014 02:24:51 GMT
64
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v1/markets/1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ - text/json
15
+ User-Agent:
16
+ - Ruby
17
+ Date:
18
+ - Tue, 29 Jul 2014 02:33:20 GMT
19
+ Authorization:
20
+ - APIAuth dLXRyDy78ifx2robPiU5:mCN/VOCc2h0Y6l8sHTTmkIhk9XY=
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ X-Frame-Options:
27
+ - DENY
28
+ X-Xss-Protection:
29
+ - 1; mode=block
30
+ X-Content-Type-Options:
31
+ - nosniff
32
+ X-Ua-Compatible:
33
+ - chrome=1
34
+ Content-Security-Policy-Report-Only:
35
+ - default-src 'self'; connect-src 'self' ws://localhost:9292 ws://testnet.CoinFresh.com:9292
36
+ wss://CoinFresh.com:4443; font-src 'self'; frame-src 'self'; img-src 'self'
37
+ https://www.google-analytics.com/ data:; media-src 'self'; object-src 'self';
38
+ script-src 'self' http://localhost:9292 http://testnet.CoinFresh.com:9292
39
+ https://CoinFresh.com:4443 https://ssl.google-analytics.com/ https://www.google-analytics.com/;
40
+ style-src 'self' 'unsafe-inline';
41
+ Content-Type:
42
+ - application/json; charset=utf-8
43
+ Etag:
44
+ - '"543098f6ff444866c455cea3ce2fa518"'
45
+ Cache-Control:
46
+ - max-age=0, private, must-revalidate
47
+ Set-Cookie:
48
+ - XSRF-TOKEN=OrpLeK5jqM5TZXaklNlOwxSeDsoALKxsGTdJ8IL%2B7GI%3D; path=/
49
+ - _planetaltcoin_session=ckVBWHkyZURYa1ErRkhHbkV6cXlMOERxOTJmZnorRDc4Sk45a082YjJlaVpicUFOaDQ5aHJ0dDRiZWtsWitQRWhDT3dyTnVPVC9GRWVXY1ZnYUQ0QTNYdkpaMTlDUDlqc3pZd0h3K0lKRWpubWYwMzE2RmhMRUhyU3hLbVMrZTRjNG41ZDF6b29qb1hEbHR5Tm1lNFpwVUhwYm9Id1BNTHR6Yyt2dmZxN3ZRNGdNOVlWVjh0REpjMGppdUdYaTJJLS1RMi81bkc2djdhRldsM2NsSFk4NlpBPT0%3D--7d8bcb24da0f794a50558f807d3bbb5a5ef86f1d;
50
+ path=/; HttpOnly
51
+ X-Request-Id:
52
+ - 422c2d4e-cb11-47ac-9e35-44ff4a060d95
53
+ X-Runtime:
54
+ - '0.031198'
55
+ Connection:
56
+ - close
57
+ Server:
58
+ - thin 1.5.1 codename Straight Razor
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"market":{"id":1,"name":"LTC/BTC","last_price":21.0,"currency":{"id":1,"name":"Bitcoin","ticker":"BTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3},"base_currency":{"id":2,"name":"Litecoin","ticker":"LTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":6}},"meta":{}}'
62
+ http_version:
63
+ recorded_at: Tue, 29 Jul 2014 02:33:20 GMT
64
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v1/markets
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ - text/json
15
+ User-Agent:
16
+ - Ruby
17
+ Date:
18
+ - Tue, 29 Jul 2014 02:26:54 GMT
19
+ Authorization:
20
+ - APIAuth dLXRyDy78ifx2robPiU5:9fDwNRMyQOQkRsAM9/EsJ4eXGsI=
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ X-Frame-Options:
27
+ - DENY
28
+ X-Xss-Protection:
29
+ - 1; mode=block
30
+ X-Content-Type-Options:
31
+ - nosniff
32
+ X-Ua-Compatible:
33
+ - chrome=1
34
+ Content-Security-Policy-Report-Only:
35
+ - default-src 'self'; connect-src 'self' ws://localhost:9292 ws://testnet.CoinFresh.com:9292
36
+ wss://CoinFresh.com:4443; font-src 'self'; frame-src 'self'; img-src 'self'
37
+ https://www.google-analytics.com/ data:; media-src 'self'; object-src 'self';
38
+ script-src 'self' http://localhost:9292 http://testnet.CoinFresh.com:9292
39
+ https://CoinFresh.com:4443 https://ssl.google-analytics.com/ https://www.google-analytics.com/;
40
+ style-src 'self' 'unsafe-inline';
41
+ Content-Type:
42
+ - application/json; charset=utf-8
43
+ Etag:
44
+ - '"4b0ec6cd8e3c36d66cee5b866717207f"'
45
+ Cache-Control:
46
+ - max-age=0, private, must-revalidate
47
+ Set-Cookie:
48
+ - XSRF-TOKEN=nG0ykR8dYbai9cnfCk5p2g0aQqSTmWIEW6yaDe8F5Ss%3D; path=/
49
+ - _planetaltcoin_session=b2wrQ3pGakU1dVM3aVE3NU1tUm1RUy9JaUFMUUNWV0lzOEEwM1VHdXRFRXkxU3BNaldQcEdTYTRVT01TV2NicWJuY1FOV1lrVVRNZzkwMGRqRCtOOXR1dnpwRFQ5QlFVeWZwN003UmZZQUdURGZHcTZTTlBlVkRWRTllRW5WT25MelJSNUJoMmhsbWRXUis1ZlpsQzZMWVFLSFh1WE5OVElKUVpLamthaDZ2aFNma2l4SFBodzMyemJOenVoM2UzLS1mdVdpNUFXTkJnVUVxT2Yxd0NFTGRnPT0%3D--10fb450ee3c90c96d98a480dd3090c2abf80428c;
50
+ path=/; HttpOnly
51
+ X-Request-Id:
52
+ - cbc4af28-8129-4d6d-bb9a-0943b53c1197
53
+ X-Runtime:
54
+ - '0.052625'
55
+ Connection:
56
+ - close
57
+ Server:
58
+ - thin 1.5.1 codename Straight Razor
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"markets":[{"id":1,"name":"LTC/BTC","last_price":21.0,"currency":{"id":1,"name":"Bitcoin","ticker":"BTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3},"base_currency":{"id":2,"name":"Litecoin","ticker":"LTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":6}},{"id":5,"name":"NMC/LTC","last_price":15.0,"currency":{"id":2,"name":"Litecoin","ticker":"LTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":6},"base_currency":{"id":4,"name":"Namecoin","ticker":"NMC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3}},{"id":6,"name":"NMC/DOGE","last_price":21.0,"currency":{"id":3,"name":"Dogecoin","ticker":"DOGE","withdraw_transaction_fee":0.0001,"deposit_confirmations":12},"base_currency":{"id":4,"name":"Namecoin","ticker":"NMC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3}},{"id":2,"name":"DOGE/BTC","last_price":12.0,"currency":{"id":1,"name":"Bitcoin","ticker":"BTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3},"base_currency":{"id":3,"name":"Dogecoin","ticker":"DOGE","withdraw_transaction_fee":0.0001,"deposit_confirmations":12}},{"id":4,"name":"DOGE/LTC","last_price":27.0,"currency":{"id":2,"name":"Litecoin","ticker":"LTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":6},"base_currency":{"id":3,"name":"Dogecoin","ticker":"DOGE","withdraw_transaction_fee":0.0001,"deposit_confirmations":12}},{"id":3,"name":"NMC/BTC","last_price":29.0,"currency":{"id":1,"name":"Bitcoin","ticker":"BTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3},"base_currency":{"id":4,"name":"Namecoin","ticker":"NMC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3}}],"meta":{}}'
62
+ http_version:
63
+ recorded_at: Tue, 29 Jul 2014 02:26:54 GMT
64
+ recorded_with: VCR 2.9.2