coinfresh 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
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,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v1/markets/1/trades
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:53:18 GMT
19
+ Authorization:
20
+ - APIAuth dLXRyDy78ifx2robPiU5:+7gFLRgAE7HKeuAB0fYpaJqf2jY=
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
+ - '"85f05d989339bee6267a7e408593f2fd"'
45
+ Cache-Control:
46
+ - max-age=0, private, must-revalidate
47
+ Set-Cookie:
48
+ - XSRF-TOKEN=RW8jM%2B5k2IFVQ56nh4sxNUflq2YHN1t9JyL6LSpJOTs%3D; path=/
49
+ - _planetaltcoin_session=T0FGd0g1OU1aUTFKd3E1eW9UOWJ1WFFlVlgwR0x6bEk2a0w5OW83eWltVmZFOHZpNmFJdndYQmhzTWIrdkoxRHVtbytCaU1TSkE4ek16bHBkTEZIS3FUMDlFUVZLbVZSL0l3MW5SYXQxWUFsMVVxdE9yaEdLbEk2T2ovVDNhcmEwRW5qNm9Ga3pMSG9TdWl5M1E5bzBKVnFFWjBUaHdQaU9nTHgwQjFJRXd6ak1TTDBQVXdFbWIvZUFvTmVrN3RCLS1QenZROXJ4RE92aC9CYkRrSVNFd0JnPT0%3D--f0b1c1f45fc8dd62ff741cc835a0a9b97f7830a2;
50
+ path=/; HttpOnly
51
+ X-Request-Id:
52
+ - d2b8563c-8aa1-4326-a608-d1216ddbec78
53
+ X-Runtime:
54
+ - '1.740290'
55
+ Connection:
56
+ - close
57
+ Server:
58
+ - thin 1.5.1 codename Straight Razor
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"trades":[{"id":152871,"amount":3.0,"price":15.0,"created_at":"2014-06-23T11:31:30.480Z","buy_order_id":229505,"sell_order_id":229548},{"id":152879,"amount":2.0,"price":14.0,"created_at":"2014-06-23T11:31:37.795Z","buy_order_id":229453,"sell_order_id":229560},{"id":152880,"amount":1.0,"price":12.0,"created_at":"2014-06-23T11:31:37.985Z","buy_order_id":229479,"sell_order_id":229560},{"id":152897,"amount":6.0,"price":19.0,"created_at":"2014-06-23T11:31:59.942Z","buy_order_id":229567,"sell_order_id":229586},{"id":152907,"amount":4.0,"price":27.0,"created_at":"2014-06-23T11:32:10.246Z","buy_order_id":229603,"sell_order_id":229604},{"id":152908,"amount":1.0,"price":27.0,"created_at":"2014-06-23T11:32:10.478Z","buy_order_id":229603,"sell_order_id":229496},{"id":152909,"amount":2.0,"price":27.0,"created_at":"2014-06-23T11:32:10.688Z","buy_order_id":229603,"sell_order_id":228984},{"id":152910,"amount":1.0,"price":27.0,"created_at":"2014-06-23T11:32:10.878Z","buy_order_id":229603,"sell_order_id":229070},{"id":152919,"amount":1.0,"price":24.0,"created_at":"2014-06-23T11:32:18.431Z","buy_order_id":229613,"sell_order_id":229070},{"id":152929,"amount":2.0,"price":19.0,"created_at":"2014-06-23T11:32:26.521Z","buy_order_id":229567,"sell_order_id":229626},{"id":152930,"amount":2.0,"price":14.0,"created_at":"2014-06-23T11:32:26.760Z","buy_order_id":229625,"sell_order_id":229626},{"id":152933,"amount":8.0,"price":14.0,"created_at":"2014-06-23T11:32:34.529Z","buy_order_id":229625,"sell_order_id":229638},{"id":152934,"amount":2.0,"price":14.0,"created_at":"2014-06-23T11:32:34.702Z","buy_order_id":229637,"sell_order_id":229638},{"id":152944,"amount":2.0,"price":14.0,"created_at":"2014-06-23T11:32:43.413Z","buy_order_id":229637,"sell_order_id":229650},{"id":152945,"amount":1.0,"price":14.0,"created_at":"2014-06-23T11:32:43.655Z","buy_order_id":229649,"sell_order_id":229650},{"id":152953,"amount":3.0,"price":19.0,"created_at":"2014-06-23T11:32:51.172Z","buy_order_id":229661,"sell_order_id":229650},{"id":152962,"amount":1.0,"price":19.0,"created_at":"2014-06-23T11:33:00.657Z","buy_order_id":229661,"sell_order_id":229678},{"id":152974,"amount":2.0,"price":25.0,"created_at":"2014-06-23T11:33:10.835Z","buy_order_id":229689,"sell_order_id":229678},{"id":152975,"amount":1.0,"price":25.0,"created_at":"2014-06-23T11:33:11.030Z","buy_order_id":229689,"sell_order_id":229070},{"id":152976,"amount":5.0,"price":25.0,"created_at":"2014-06-23T11:33:11.222Z","buy_order_id":229689,"sell_order_id":229288},{"id":152981,"amount":4.0,"price":12.0,"created_at":"2014-06-23T11:33:17.688Z","buy_order_id":229479,"sell_order_id":229704},{"id":152982,"amount":2.0,"price":10.0,"created_at":"2014-06-23T11:33:17.851Z","buy_order_id":229547,"sell_order_id":229704},{"id":152984,"amount":1.0,"price":30.0,"created_at":"2014-06-23T11:33:25.800Z","buy_order_id":229715,"sell_order_id":229288},{"id":152985,"amount":3.0,"price":30.0,"created_at":"2014-06-23T11:33:25.966Z","buy_order_id":229715,"sell_order_id":229716},{"id":152986,"amount":2.0,"price":30.0,"created_at":"2014-06-23T11:33:26.138Z","buy_order_id":229715,"sell_order_id":229370},{"id":152987,"amount":8.0,"price":26.0,"created_at":"2014-06-23T11:33:31.994Z","buy_order_id":229719,"sell_order_id":229720},{"id":152997,"amount":4.0,"price":10.0,"created_at":"2014-06-23T11:33:41.430Z","buy_order_id":229547,"sell_order_id":229732},{"id":152998,"amount":2.0,"price":9.0,"created_at":"2014-06-23T11:33:41.753Z","buy_order_id":212937,"sell_order_id":229732},{"id":152999,"amount":2.0,"price":9.0,"created_at":"2014-06-23T11:33:41.974Z","buy_order_id":213457,"sell_order_id":229732},{"id":153000,"amount":1.0,"price":9.0,"created_at":"2014-06-23T11:33:42.272Z","buy_order_id":213599,"sell_order_id":229732},{"id":153008,"amount":5.0,"price":21.0,"created_at":"2014-06-23T11:33:49.390Z","buy_order_id":229747,"sell_order_id":229748},{"id":153009,"amount":2.0,"price":21.0,"created_at":"2014-06-23T11:33:49.764Z","buy_order_id":229747,"sell_order_id":229720},{"id":153010,"amount":3.0,"price":21.0,"created_at":"2014-06-23T11:33:50.007Z","buy_order_id":229747,"sell_order_id":229370},{"id":153016,"amount":9.0,"price":23.0,"created_at":"2014-06-23T11:33:58.287Z","buy_order_id":229761,"sell_order_id":229762},{"id":153024,"amount":1.0,"price":24.0,"created_at":"2014-06-23T11:34:06.606Z","buy_order_id":229773,"sell_order_id":229762},{"id":153025,"amount":4.0,"price":24.0,"created_at":"2014-06-23T11:34:06.904Z","buy_order_id":229773,"sell_order_id":218138},{"id":153032,"amount":6.0,"price":17.0,"created_at":"2014-06-23T11:34:15.424Z","buy_order_id":229787,"sell_order_id":229788},{"id":153038,"amount":1.0,"price":23.0,"created_at":"2014-06-23T11:34:23.277Z","buy_order_id":229799,"sell_order_id":229800},{"id":153039,"amount":1.0,"price":23.0,"created_at":"2014-06-23T11:34:23.443Z","buy_order_id":229799,"sell_order_id":229788},{"id":153040,"amount":4.0,"price":23.0,"created_at":"2014-06-23T11:34:23.587Z","buy_order_id":229799,"sell_order_id":218138},{"id":153041,"amount":4.0,"price":23.0,"created_at":"2014-06-23T11:34:23.879Z","buy_order_id":229799,"sell_order_id":218534},{"id":153060,"amount":4.0,"price":30.0,"created_at":"2014-06-23T11:34:45.027Z","buy_order_id":229825,"sell_order_id":229806},{"id":153061,"amount":1.0,"price":30.0,"created_at":"2014-06-23T11:34:45.359Z","buy_order_id":229825,"sell_order_id":229826},{"id":153071,"amount":6.0,"price":28.0,"created_at":"2014-06-23T11:34:53.814Z","buy_order_id":229839,"sell_order_id":229826},{"id":153072,"amount":2.0,"price":28.0,"created_at":"2014-06-23T11:34:54.416Z","buy_order_id":229839,"sell_order_id":229840},{"id":153073,"amount":2.0,"price":28.0,"created_at":"2014-06-23T11:34:54.663Z","buy_order_id":229839,"sell_order_id":218534},{"id":153098,"amount":9.0,"price":17.0,"created_at":"2014-06-23T11:35:18.566Z","buy_order_id":229873,"sell_order_id":229874},{"id":153107,"amount":1.0,"price":17.0,"created_at":"2014-06-23T11:35:27.615Z","buy_order_id":229873,"sell_order_id":229888},{"id":153108,"amount":5.0,"price":15.0,"created_at":"2014-06-23T11:35:27.831Z","buy_order_id":229815,"sell_order_id":229888},{"id":153119,"amount":2.0,"price":21.0,"created_at":"2014-06-23T11:35:44.317Z","buy_order_id":229899,"sell_order_id":229912}]}'
62
+ http_version:
63
+ recorded_at: Tue, 29 Jul 2014 02:53:20 GMT
64
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,65 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:3000/api/v1/orders/18/cancel
6
+ body:
7
+ encoding: UTF-8
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
+ Content-Type:
18
+ - application/json
19
+ Authorization:
20
+ - Token token=dLXRyDy78ifx2robPiU5
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Server:
27
+ - nginx/1.6.0
28
+ Date:
29
+ - Mon, 19 May 2014 15:09:14 GMT
30
+ Content-Type:
31
+ - application/json; charset=utf-8
32
+ Transfer-Encoding:
33
+ - chunked
34
+ Connection:
35
+ - keep-alive
36
+ Status:
37
+ - 200 OK
38
+ X-Frame-Options:
39
+ - DENY
40
+ X-Xss-Protection:
41
+ - 1; mode=block
42
+ X-Content-Type-Options:
43
+ - nosniff
44
+ X-Ua-Compatible:
45
+ - chrome=1
46
+ Content-Security-Policy-Report-Only:
47
+ - default-src 'self'; connect-src 'self' ws://localhost:9292 ws://testnet.planetaltcoin.com:9292
48
+ ws://plannetaltcoin.com:4443; font-src 'self'; frame-src 'self'; img-src 'self'
49
+ https://chart.googleapis.com data:; media-src 'self'; object-src 'self'; script-src
50
+ 'self' http://localhost:9292 http://localhost:3000/api/v1/orders:9292 https://plannetaltcoin.com:4443;
51
+ style-src 'self';
52
+ Etag:
53
+ - '"09fca85b141b71dfcdef69c58a854665"'
54
+ Cache-Control:
55
+ - max-age=0, private, must-revalidate
56
+ X-Request-Id:
57
+ - b34b017b-17d3-4152-b592-edce5c9611fb
58
+ X-Runtime:
59
+ - '0.332609'
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"order":{"id":18,"created_at":"2014-05-19T14:45:20.697Z","status":"cancelled","order_type":"buy","price":0.001,"amount":0.001,"filled_amount":0.0,"market_id":2},"meta":{}}'
63
+ http_version:
64
+ recorded_at: Mon, 19 May 2014 15:09:28 GMT
65
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:3000/api/v1/orders
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"order":{"order_type":"buy","amount":0.001,"price":0.001,"market_id":2}}'
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
+ Content-Type:
18
+ - application/json
19
+ Authorization:
20
+ - Token token=mbqjGte-A7p3m57sMhdN
21
+ response:
22
+ status:
23
+ code: 201
24
+ message: Created
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.planetaltcoin.com:9292
36
+ wss://planetaltcoin.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.planetaltcoin.com:9292
39
+ https://planetaltcoin.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
+ - '"453777ca409d65ca7a2e8da6eb200fce"'
45
+ Cache-Control:
46
+ - max-age=0, private, must-revalidate
47
+ Set-Cookie:
48
+ - XSRF-TOKEN=XMrl2Xar6s0%2FnsQezA9V3WUFb2Oz5rUhyMstKVgwJ8k%3D; path=/
49
+ - _planetaltcoin_session=dnIxRVdmU2tMNFJEUG9xdWdKUDJOZkdTdUhiWTBPTHYzVms4R1pZOU9NaU1aTmx4dmpJNUF3Ykx4NXVlNXFpVzNOdmVCbmQ1VUdldStpakR0VjR3TFlWcEpnRTVId2JZYTQvTVVTU2wxZXVxZjVvQVdHVkFkQVVzd1E5QVJYN09zdjI2NEo4NXZxZ3ZKengyMXVjZzFkUG1TZk55RnkrRDYyelpIOWlLSlJVcm95am0zK2FvVXJydm4xVVZwekVQLS1DWU1tb0dCMGgxb0ZGNlUzY1BVd3pRPT0%3D--5ff1a52d2ec6003d97558ffc659268013d9f6dbe;
50
+ path=/; HttpOnly
51
+ X-Request-Id:
52
+ - 66d49ff0-91d1-4734-b61e-05eb28352a7b
53
+ X-Runtime:
54
+ - '0.070172'
55
+ Connection:
56
+ - close
57
+ Server:
58
+ - thin 1.5.1 codename Straight Razor
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"order":{"id":79963,"status":"active","order_type":"buy","price":0.001,"amount":0.001,"filled_amount":0.0,"market_id":2,"created_at":"2014-06-19T01:38:26.239Z"},"meta":{}}'
62
+ http_version:
63
+ recorded_at: Thu, 19 Jun 2014 01:38:26 GMT
64
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,67 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v1/orders/my
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
+ Authorization:
18
+ - Token token=dLXRyDy78ifx2robPiU5
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Server:
25
+ - nginx/1.6.0
26
+ Date:
27
+ - Mon, 19 May 2014 14:15:02 GMT
28
+ Content-Type:
29
+ - application/json; charset=utf-8
30
+ Transfer-Encoding:
31
+ - chunked
32
+ Connection:
33
+ - keep-alive
34
+ Status:
35
+ - 200 OK
36
+ X-Frame-Options:
37
+ - DENY
38
+ X-Xss-Protection:
39
+ - 1; mode=block
40
+ X-Content-Type-Options:
41
+ - nosniff
42
+ X-Ua-Compatible:
43
+ - chrome=1
44
+ Content-Security-Policy-Report-Only:
45
+ - default-src 'self'; connect-src 'self' ws://localhost:9292 ws://testnet.planetaltcoin.com:9292
46
+ ws://plannetaltcoin.com:4443; font-src 'self'; frame-src 'self'; img-src 'self'
47
+ https://chart.googleapis.com data:; media-src 'self'; object-src 'self'; script-src
48
+ 'self' http://localhost:9292 http://localhost:3000/api/v1/orders:9292 https://plannetaltcoin.com:4443;
49
+ style-src 'self';
50
+ Etag:
51
+ - '"d9e85842d2ba63aed945591684939d43"'
52
+ Cache-Control:
53
+ - max-age=0, private, must-revalidate
54
+ Set-Cookie:
55
+ - XSRF-TOKEN=sBlgKzthG91kScgf8U3PH1AoEB42ROfacyh41dWIAWg%3D; path=/
56
+ - _planetaltcoin_session=R1NJWHlsL3AvWSs3NnlxVzZmcGNvUTVhSTNZckh6U0JNbzFuendtUnlSbkdtMVgwa0ZqOEEzWVFoem50aXdwcEVFdjJucWQwZE1JY1krTkwxMlAydkJJTjZyMzJOTXdUUGVldWtLVEZlTTJmMVJsdnYxeXRsZHZESjdCU1d2MTl5ZGRjSENmT0tWZi8za2tGLy9ubWRUVkxHcmk2KytHZm1TMVZSUGl6T1pub1A4UDA0R2RITFV4V3htNjlLZmJYLS1VeG5lbm1BRFhuUndtTWsvOXlPY3dnPT0%3D--995ebee902698b288812bbdd2d6364adb72b44a5;
57
+ path=/; HttpOnly
58
+ X-Request-Id:
59
+ - de82d02a-6fa6-4dfa-b4fa-5e9e4b173f26
60
+ X-Runtime:
61
+ - '0.268428'
62
+ body:
63
+ encoding: UTF-8
64
+ string: '{"orders":[{"id":1,"created_at":"2014-05-13T02:58:11.578Z","status":"active","order_type":"buy","price":0.001,"amount":10.0,"filled_amount":2.0,"market_id":1},{"id":2,"created_at":"2014-05-13T02:58:25.977Z","status":"active","order_type":"buy","price":0.0009,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":3,"created_at":"2014-05-13T02:58:30.311Z","status":"active","order_type":"buy","price":0.0008,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":4,"created_at":"2014-05-13T02:58:34.854Z","status":"active","order_type":"buy","price":0.0007,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":5,"created_at":"2014-05-13T02:58:40.368Z","status":"active","order_type":"buy","price":0.0006,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":6,"created_at":"2014-05-13T02:58:41.575Z","status":"cancelled","order_type":"buy","price":0.0006,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":7,"created_at":"2014-05-13T03:21:05.944Z","status":"active","order_type":"buy","price":0.0001,"amount":10.0,"filled_amount":0.0,"market_id":2},{"id":8,"created_at":"2014-05-13T03:21:10.879Z","status":"active","order_type":"buy","price":0.00008,"amount":10.0,"filled_amount":0.0,"market_id":2},{"id":9,"created_at":"2014-05-13T03:21:14.449Z","status":"active","order_type":"buy","price":0.00006,"amount":10.0,"filled_amount":0.0,"market_id":2},{"id":10,"created_at":"2014-05-13T03:21:31.055Z","status":"active","order_type":"buy","price":0.0001,"amount":10.0,"filled_amount":0.0,"market_id":3},{"id":11,"created_at":"2014-05-13T03:21:43.975Z","status":"active","order_type":"buy","price":0.00008,"amount":10.0,"filled_amount":0.0,"market_id":3},{"id":12,"created_at":"2014-05-13T03:21:47.645Z","status":"active","order_type":"buy","price":0.00006,"amount":10.0,"filled_amount":0.0,"market_id":3},{"id":13,"created_at":"2014-05-13T03:21:48.720Z","status":"cancelled","order_type":"buy","price":0.00006,"amount":10.0,"filled_amount":0.0,"market_id":3},{"id":14,"created_at":"2014-05-14T06:20:07.236Z","status":"filled","order_type":"sell","price":0.001,"amount":1.0,"filled_amount":1.0,"market_id":1},{"id":15,"created_at":"2014-05-14T06:27:20.859Z","status":"filled","order_type":"sell","price":0.0009,"amount":1.0,"filled_amount":1.0,"market_id":1},{"id":16,"created_at":"2014-05-17T06:32:38.909Z","status":"active","order_type":"buy","price":0.1,"amount":1.0,"filled_amount":0.0,"market_id":4},{"id":17,"created_at":"2014-05-17T06:33:05.815Z","status":"active","order_type":"buy","price":0.09,"amount":1.0,"filled_amount":0.0,"market_id":4}],"meta":{"total":17,"per_page":25,"order":"orders.id","order_dir":"asc","num_pages":1}}'
65
+ http_version:
66
+ recorded_at: Mon, 19 May 2014 14:15:16 GMT
67
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,67 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v1/orders/my
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
+ Authorization:
18
+ - Token token=dLXRyDy78ifx2robPiU5
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Server:
25
+ - nginx/1.6.0
26
+ Date:
27
+ - Mon, 19 May 2014 14:33:37 GMT
28
+ Content-Type:
29
+ - application/json; charset=utf-8
30
+ Transfer-Encoding:
31
+ - chunked
32
+ Connection:
33
+ - keep-alive
34
+ Status:
35
+ - 200 OK
36
+ X-Frame-Options:
37
+ - DENY
38
+ X-Xss-Protection:
39
+ - 1; mode=block
40
+ X-Content-Type-Options:
41
+ - nosniff
42
+ X-Ua-Compatible:
43
+ - chrome=1
44
+ Content-Security-Policy-Report-Only:
45
+ - default-src 'self'; connect-src 'self' ws://localhost:9292 ws://testnet.planetaltcoin.com:9292
46
+ ws://plannetaltcoin.com:4443; font-src 'self'; frame-src 'self'; img-src 'self'
47
+ https://chart.googleapis.com data:; media-src 'self'; object-src 'self'; script-src
48
+ 'self' http://localhost:9292 http://localhost:3000/api/v1/orders:9292 https://plannetaltcoin.com:4443;
49
+ style-src 'self';
50
+ Etag:
51
+ - '"d9e85842d2ba63aed945591684939d43"'
52
+ Cache-Control:
53
+ - max-age=0, private, must-revalidate
54
+ Set-Cookie:
55
+ - XSRF-TOKEN=yhS7rmpKspifcWC3688F67Ty9cVN32VEql4C5GKb82U%3D; path=/
56
+ - _planetaltcoin_session=RjdDRFY5TDFTYnJrcitVS1IySjIwMVh1T3JmZE1kcGROeHlseXpJV1ZHRWJiMGtqTjg3N2xna0E4WjhTT2pqOXJkdVREc2NRNURlTnVWamJDUmMxbEpuVzJmQmNlVTV0a1IxRCs3Zi8wenZ2VHUzQzJ1bkcrZWJPNTRPaFdia25seUh5bnVhd25ucllLZlBJREdsY3JoY1IwaTZPdnFLN1B2ZGl3YzdadjRoWWwwS1pzOGxjRmM3QTMxSWlnYzhpLS12dlBtNEVwOFNlWHZVNFpvcEJ2eENBPT0%3D--72786dba8390695c857ce1d6c56593f29b45b20d;
57
+ path=/; HttpOnly
58
+ X-Request-Id:
59
+ - 1ae591b0-10b2-49a8-8973-30fa21fbf36e
60
+ X-Runtime:
61
+ - '0.106232'
62
+ body:
63
+ encoding: UTF-8
64
+ string: '{"orders":[{"id":1,"created_at":"2014-05-13T02:58:11.578Z","status":"active","order_type":"buy","price":0.001,"amount":10.0,"filled_amount":2.0,"market_id":1},{"id":2,"created_at":"2014-05-13T02:58:25.977Z","status":"active","order_type":"buy","price":0.0009,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":3,"created_at":"2014-05-13T02:58:30.311Z","status":"active","order_type":"buy","price":0.0008,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":4,"created_at":"2014-05-13T02:58:34.854Z","status":"active","order_type":"buy","price":0.0007,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":5,"created_at":"2014-05-13T02:58:40.368Z","status":"active","order_type":"buy","price":0.0006,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":6,"created_at":"2014-05-13T02:58:41.575Z","status":"cancelled","order_type":"buy","price":0.0006,"amount":10.0,"filled_amount":0.0,"market_id":1},{"id":7,"created_at":"2014-05-13T03:21:05.944Z","status":"active","order_type":"buy","price":0.0001,"amount":10.0,"filled_amount":0.0,"market_id":2},{"id":8,"created_at":"2014-05-13T03:21:10.879Z","status":"active","order_type":"buy","price":0.00008,"amount":10.0,"filled_amount":0.0,"market_id":2},{"id":9,"created_at":"2014-05-13T03:21:14.449Z","status":"active","order_type":"buy","price":0.00006,"amount":10.0,"filled_amount":0.0,"market_id":2},{"id":10,"created_at":"2014-05-13T03:21:31.055Z","status":"active","order_type":"buy","price":0.0001,"amount":10.0,"filled_amount":0.0,"market_id":3},{"id":11,"created_at":"2014-05-13T03:21:43.975Z","status":"active","order_type":"buy","price":0.00008,"amount":10.0,"filled_amount":0.0,"market_id":3},{"id":12,"created_at":"2014-05-13T03:21:47.645Z","status":"active","order_type":"buy","price":0.00006,"amount":10.0,"filled_amount":0.0,"market_id":3},{"id":13,"created_at":"2014-05-13T03:21:48.720Z","status":"cancelled","order_type":"buy","price":0.00006,"amount":10.0,"filled_amount":0.0,"market_id":3},{"id":14,"created_at":"2014-05-14T06:20:07.236Z","status":"filled","order_type":"sell","price":0.001,"amount":1.0,"filled_amount":1.0,"market_id":1},{"id":15,"created_at":"2014-05-14T06:27:20.859Z","status":"filled","order_type":"sell","price":0.0009,"amount":1.0,"filled_amount":1.0,"market_id":1},{"id":16,"created_at":"2014-05-17T06:32:38.909Z","status":"active","order_type":"buy","price":0.1,"amount":1.0,"filled_amount":0.0,"market_id":4},{"id":17,"created_at":"2014-05-17T06:33:05.815Z","status":"active","order_type":"buy","price":0.09,"amount":1.0,"filled_amount":0.0,"market_id":4}],"meta":{"total":17,"per_page":25,"order":"orders.id","order_dir":"asc","num_pages":1}}'
65
+ http_version:
66
+ recorded_at: Mon, 19 May 2014 14:33:51 GMT
67
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:3000/api/v1/wallets
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"wallet":{"currency_id":4}}'
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
+ Content-Type:
18
+ - application/json
19
+ Content-Md5:
20
+ - H1UuCOjOesNYXpEl2wcggA==
21
+ Date:
22
+ - Tue, 29 Jul 2014 03:44:48 GMT
23
+ Authorization:
24
+ - APIAuth da5AgdjTchH4a5APfkBRVW8jQ6zdbiQPD2i3huaY:CpuRad+dQDRQH0pUH4A7ag1EUrc=
25
+ response:
26
+ status:
27
+ code: 201
28
+ message: Created
29
+ headers:
30
+ X-Frame-Options:
31
+ - DENY
32
+ X-Xss-Protection:
33
+ - 1; mode=block
34
+ X-Content-Type-Options:
35
+ - nosniff
36
+ X-Ua-Compatible:
37
+ - chrome=1
38
+ Content-Security-Policy-Report-Only:
39
+ - default-src 'self'; connect-src 'self' ws://localhost:9292 ws://testnet.CoinFresh.com:9292
40
+ wss://CoinFresh.com:4443; font-src 'self'; frame-src 'self'; img-src 'self'
41
+ https://www.google-analytics.com/ data:; media-src 'self'; object-src 'self';
42
+ script-src 'self' http://localhost:9292 http://testnet.CoinFresh.com:9292
43
+ https://CoinFresh.com:4443 https://ssl.google-analytics.com/ https://www.google-analytics.com/;
44
+ style-src 'self' 'unsafe-inline';
45
+ Content-Type:
46
+ - application/json; charset=utf-8
47
+ Etag:
48
+ - '"b0cc2ed76c0c26f8a0accb4cf9147e28"'
49
+ Cache-Control:
50
+ - max-age=0, private, must-revalidate
51
+ X-Request-Id:
52
+ - bbb40561-b944-486b-8b45-54f1f190945c
53
+ X-Runtime:
54
+ - '0.219336'
55
+ Connection:
56
+ - close
57
+ Server:
58
+ - thin 1.5.1 codename Straight Razor
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"wallet":{"id":11,"balance":0.0,"deposit_address":"mxcA1w3sEfWUjjRYSUozFxzdiiHwK4dptF","in_escrow":0.0,"total_deposit":0.0,"total_withdraw":0.0,"unconfirmed_deposit":0.0,"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 03:44:48 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/wallets
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 03:19:53 GMT
19
+ Authorization:
20
+ - APIAuth da5AgdjTchH4a5APfkBRVW8jQ6zdbiQPD2i3huaY:aW21SZTbgry3cvHfF6X1d55Fg30=
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
+ - '"9eeb7af5f6de058651f2083b49a1cac3"'
45
+ Cache-Control:
46
+ - max-age=0, private, must-revalidate
47
+ Set-Cookie:
48
+ - XSRF-TOKEN=NGS3Ec1xFrdQv7Vb0EUGOqSWn60IQDoYNwcRlm0lMEY%3D; path=/
49
+ - _planetaltcoin_session=eHVHRmxveFh2QWlaWUozSVNucDZBeHZjOFFiTFFySkFQQUJ2Mk9seEcrckdRM3lkRFIzbHhwQjNIajNWMC9GL0FQUjkxbFkyVWx6cmthaUFha2hmZUhWNEk3S1M3YXB0YkNRQVpqbTgxLzFGVTBsTTB3NFNiRnpSTFBkRFp5dGZGN2pUS0VRQWNPRFJmQU8zMk1lWmQ5REowc0p6c2tha0czUzhkOW01YVJwa0twUllnWEh0SDYrc1ZXbGt4YzZVLS05Y0RMdGNTVXFGK0xGU25NQThia1pRPT0%3D--89f916bcb815ec27ca3e668aaa0c1309a0cc04f0;
50
+ path=/; HttpOnly
51
+ X-Request-Id:
52
+ - b549059d-30a1-4efd-a12f-3cc513ec70a8
53
+ X-Runtime:
54
+ - '0.150415'
55
+ Connection:
56
+ - close
57
+ Server:
58
+ - thin 1.5.1 codename Straight Razor
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"wallets":[{"id":2,"balance":321.90948,"deposit_address":"mxcA1w3sEfWUjjRYSUozFxzdiiHwK4dptF","in_escrow":184736.71552,"total_deposit":1123800.0,"total_withdraw":0.0,"unconfirmed_deposit":0.0,"currency":{"id":1,"name":"Bitcoin","ticker":"BTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":3}},{"id":4,"balance":256.5125,"deposit_address":"mxcA1w3sEfWUjjRYSUozFxzdiiHwK4dptF","in_escrow":136792.4425,"total_deposit":763200.0,"total_withdraw":0.0,"unconfirmed_deposit":0.0,"currency":{"id":2,"name":"Litecoin","ticker":"LTC","withdraw_transaction_fee":0.0001,"deposit_confirmations":6}},{"id":6,"balance":428.6,"deposit_address":"mxcA1w3sEfWUjjRYSUozFxzdiiHwK4dptF","in_escrow":90794.52,"total_deposit":421500.0,"total_withdraw":0.0,"unconfirmed_deposit":0.0,"currency":{"id":3,"name":"Dogecoin","ticker":"DOGE","withdraw_transaction_fee":0.0001,"deposit_confirmations":12}},{"id":8,"balance":524.0,"deposit_address":"mxcA1w3sEfWUjjRYSUozFxzdiiHwK4dptF","in_escrow":40717.0,"total_deposit":39600.0,"total_withdraw":0.0,"unconfirmed_deposit":0.0,"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 03:19:53 GMT
64
+ recorded_with: VCR 2.9.2