From a7182f783f7725797eba8f47d5a84721183b2eb6 Mon Sep 17 00:00:00 2001 From: Swingcloud Date: Wed, 9 Jan 2019 09:43:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BD=20update=20FEX=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/cryptoexchange/exchanges/fex/market.rb | 2 +- .../exchanges/fex/services/market.rb | 23 ++++++--------- .../Fex/integration_specs_fetch_pairs.yml | 28 +++++++++---------- .../Fex/integration_specs_fetch_ticker.yml | 28 +++++++++---------- spec/exchanges/fex/market_spec.rb | 2 +- 5 files changed, 39 insertions(+), 44 deletions(-) diff --git a/lib/cryptoexchange/exchanges/fex/market.rb b/lib/cryptoexchange/exchanges/fex/market.rb index dbdfd01d9..0c3a8e978 100644 --- a/lib/cryptoexchange/exchanges/fex/market.rb +++ b/lib/cryptoexchange/exchanges/fex/market.rb @@ -2,7 +2,7 @@ module Cryptoexchange::Exchanges module Fex class Market < Cryptoexchange::Models::Market NAME = 'fex' - API_URL = 'http://api.fexpro.io/api' + API_URL = 'http://api.fexhk.com/api' end end end diff --git a/lib/cryptoexchange/exchanges/fex/services/market.rb b/lib/cryptoexchange/exchanges/fex/services/market.rb index 4de70fb20..d9f0d8fcd 100644 --- a/lib/cryptoexchange/exchanges/fex/services/market.rb +++ b/lib/cryptoexchange/exchanges/fex/services/market.rb @@ -19,23 +19,18 @@ def ticker_url def adapt_all(output) output.map do |ticker| - base, target = ticker['symbol'].split("/") - market_pair = Cryptoexchange::Models::MarketPair.new( - base: base, - target: target, - market: Fex::Market::NAME - ) - adapt(ticker, market_pair) + adapt(ticker) end end - def adapt(output, market_pair) - ticker = Cryptoexchange::Models::Ticker.new - ticker.base = market_pair.base - ticker.target = market_pair.target - ticker.market = Fex::Market::NAME - ticker.ask = NumericHelper.to_d(output['sell']) - ticker.bid = NumericHelper.to_d(output['buy']) + def adapt(output) + base, target = output['symbol'].split('/') + ticker = Cryptoexchange::Models::Ticker.new + ticker.base = base + ticker.target = target + ticker.market = Fex::Market::NAME + ticker.ask = NumericHelper.to_d(output['sell']) + ticker.bid = NumericHelper.to_d(output['buy']) # this is their typo ticker.last = NumericHelper.to_d(output['colse']) ticker.volume = NumericHelper.to_d(output['volume']) diff --git a/spec/cassettes/vcr_cassettes/Fex/integration_specs_fetch_pairs.yml b/spec/cassettes/vcr_cassettes/Fex/integration_specs_fetch_pairs.yml index 84f5bdbb9..35d62d7d4 100644 --- a/spec/cassettes/vcr_cassettes/Fex/integration_specs_fetch_pairs.yml +++ b/spec/cassettes/vcr_cassettes/Fex/integration_specs_fetch_pairs.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://api.fexpro.io/api/market/ticker + uri: http://api.fexhk.com/api/market/ticker body: encoding: UTF-8 string: '' @@ -10,7 +10,7 @@ http_interactions: Connection: - close Host: - - api.fexpro.io + - api.fexhk.com User-Agent: - http.rb/3.0.0 response: @@ -18,29 +18,29 @@ http_interactions: code: 200 message: OK headers: + Server: + - nginx + Date: + - Wed, 09 Jan 2019 01:42:31 GMT + Content-Type: + - application/json; charset=utf-8 + Content-Length: + - '5437' + Connection: + - close Cache-Control: - no-cache Pragma: - no-cache - Content-Length: - - '5776' - Content-Type: - - application/json; charset=utf-8 Expires: - "-1" - Server: - - Microsoft-IIS/8.5 X-Aspnet-Version: - 4.0.30319 X-Powered-By: - ASP.NET - Date: - - Wed, 25 Apr 2018 06:37:23 GMT - Connection: - - close body: encoding: UTF-8 - string: '[{"symbol":"BCH/BTC","buy":0.14222100,"sell":0.14289800,"changePercentage":-10.000000000000000,"colse":0.14244000,"open":0.15826100,"low":0.13629200,"high":0.15945700,"volume":272.11293500,"name":"FEX"},{"symbol":"BCH/USDT","buy":1342.75000000,"sell":1349.69000000,"changePercentage":-9.240000000000000,"colse":1344.63000000,"open":1481.49000000,"low":1255.02000000,"high":1501.19000000,"volume":578.53809500,"name":"FEX"},{"symbol":"BTC/USDT","buy":9414.66000000,"sell":9454.90000000,"changePercentage":1.010000000000000,"colse":9423.48000000,"open":9329.47000000,"low":9182.46000000,"high":9756.68000000,"volume":119.55500000,"name":"FEX"},{"symbol":"DASH/BTC","buy":0.05214300,"sell":0.05251600,"changePercentage":-8.480000000000000,"colse":0.05229500,"open":0.05713900,"low":0.05038200,"high":0.05755400,"volume":721.01722500,"name":"FEX"},{"symbol":"DCR/BTC","buy":0.00917917,"sell":0.00931349,"changePercentage":15.710000000000000,"colse":0.00922670,"open":0.00797385,"low":0.00758230,"high":0.01060114,"volume":8429.57445467,"name":"FEX"},{"symbol":"DGD/ETH","buy":0.42783800,"sell":0.43345800,"changePercentage":2.660000000000000,"colse":0.43040600,"open":0.41924600,"low":0.40990800,"high":0.47164300,"volume":235.90127500,"name":"FEX"},{"symbol":"DOGE/BTC","buy":0.00000055,"sell":0.00000058,"changePercentage":-6.450000000000000,"colse":0.00000058,"open":0.00000062,"low":0.00000054,"high":0.00000064,"volume":3583901301.04214500,"name":"FEX"},{"symbol":"EOS/ETH","buy":0.02195783,"sell":0.02211885,"changePercentage":12.890000000000000,"colse":0.02196236,"open":0.01945425,"low":0.01929560,"high":0.02274515,"volume":31062.40300000,"name":"FEX"},{"symbol":"ETC/BTC","buy":0.00215900,"sell":0.00218500,"changePercentage":-5.620000000000000,"colse":0.00218200,"open":0.00231200,"low":0.00203300,"high":0.00242200,"volume":14577.91221500,"name":"FEX"},{"symbol":"ETC/USDT","buy":20.48000000,"sell":20.49000000,"changePercentage":-5.540000000000000,"colse":20.48000000,"open":21.68000000,"low":18.71000000,"high":32.47000000,"volume":12039.36165000,"name":"FEX"},{"symbol":"ETH/BTC","buy":0.07028100,"sell":0.07061900,"changePercentage":-6.000000000000000,"colse":0.07043500,"open":0.07492800,"low":0.06827200,"high":0.07558800,"volume":407.63227500,"name":"FEX"},{"symbol":"ETH/USDT","buy":662.86000000,"sell":665.67000000,"changePercentage":-5.060000000000000,"colse":663.92000000,"open":699.30000000,"low":426.04000000,"high":711.61000000,"volume":1223.80554500,"name":"FEX"},{"symbol":"FEX/BTC","buy":0.00004729,"sell":0.00005300,"changePercentage":2.910000000000000,"colse":0.00004738,"open":0.00004604,"low":0.00004600,"high":0.00005300,"volume":78434.00000000,"name":"FEX"},{"symbol":"FEX/ETH","buy":0.00067000,"sell":0.00070000,"changePercentage":-0.070000000000000,"colse":0.00067283,"open":0.00067331,"low":0.00067000,"high":0.00067668,"volume":103135.00000000,"name":"FEX"},{"symbol":"IOST/ETH","buy":0.00007386,"sell":0.00007492,"changePercentage":-2.770000000000000,"colse":0.00007467,"open":0.00007680,"low":0.00007029,"high":0.00008078,"volume":3130483.50450000,"name":"FEX"},{"symbol":"LTC/BTC","buy":0.01654100,"sell":0.01660600,"changePercentage":-4.210000000000000,"colse":0.01657500,"open":0.01730400,"low":0.01630000,"high":0.01759400,"volume":1848.28361500,"name":"FEX"},{"symbol":"LTC/USDT","buy":155.90000000,"sell":156.52000000,"changePercentage":-3.240000000000000,"colse":156.65000000,"open":161.90000000,"low":150.00000000,"high":166.60000000,"volume":2744.67773500,"name":"FEX"},{"symbol":"PIVX/BTC","buy":0.00057860,"sell":0.00059242,"changePercentage":-8.150000000000000,"colse":0.00057957,"open":0.00063103,"low":0.00055847,"high":0.00064942,"volume":195498.50676975,"name":"FEX"},{"symbol":"RUFF/ETH","buy":0.00012292,"sell":0.00012459,"changePercentage":-16.150000000000000,"colse":0.00012439,"open":0.00014834,"low":0.00012292,"high":0.00016446,"volume":1432728.34650000,"name":"FEX"},{"symbol":"SC/BTC","buy":0.00000219,"sell":0.00000222,"changePercentage":-5.170000000000000,"colse":0.00000220,"open":0.00000232,"low":0.00000181,"high":0.00000240,"volume":129739178.78212500,"name":"FEX"},{"symbol":"SC/ETH","buy":0.00003108,"sell":0.00003165,"changePercentage":2.460000000000000,"colse":0.00003160,"open":0.00003084,"low":0.00003014,"high":0.00003200,"volume":134904486.87336500,"name":"FEX"},{"symbol":"SC/USDT","buy":0.02063742,"sell":0.02112618,"changePercentage":-3.610000000000000,"colse":0.02103459,"open":0.02182231,"low":0.01962457,"high":0.02276245,"volume":127894876.50366500,"name":"FEX"},{"symbol":"TNB/ETH","buy":0.00007536,"sell":0.00007789,"changePercentage":-6.270000000000000,"colse":0.00007592,"open":0.00008100,"low":0.00007082,"high":0.00008271,"volume":2797338.90000000,"name":"FEX"},{"symbol":"VIA/BTC","buy":0.00026706,"sell":0.00027122,"changePercentage":-1.250000000000000,"colse":0.00027112,"open":0.00027456,"low":0.00024741,"high":0.00028151,"volume":54829.33833476,"name":"FEX"},{"symbol":"XVG/BTC","buy":0.00000683,"sell":0.00000692,"changePercentage":-7.150000000000000,"colse":0.00000688,"open":0.00000741,"low":0.00000648,"high":0.00000745,"volume":19355346.22285585,"name":"FEX"},{"symbol":"XVG/USDT","buy":0.06486836,"sell":0.06545764,"changePercentage":-4.980000000000000,"colse":0.06522025,"open":0.06863561,"low":0.05996367,"high":0.06958407,"volume":5355744.46727120,"name":"FEX"},{"symbol":"ZIL/ETH","buy":0.00013418,"sell":0.00013578,"changePercentage":-2.630000000000000,"colse":0.00013497,"open":0.00013861,"low":0.00012139,"high":0.00014366,"volume":873851.99600000,"name":"FEX"},{"symbol":"ZIL/USDT","buy":0.08915000,"sell":0.08967800,"changePercentage":-7.740000000000000,"colse":0.08947300,"open":0.09697800,"low":0.05611400,"high":0.10016800,"volume":2345290.61300000,"name":"FEX"}]' + string: '[{"symbol":"DLB/ETH","buy":0.00012000,"sell":0.00012400,"changePercentage":-0.13,"colse":0.00012144,"open":0.00012160,"low":0.00012040,"high":0.00012196,"volume":4089598.0,"name":"FEX"},{"symbol":"XVG/BTC","buy":0.00000175,"sell":0.00000182,"changePercentage":1.14,"colse":0.00000178,"open":0.00000176,"low":0.00000174,"high":0.00000180,"volume":11394409.0,"name":"FEX"},{"symbol":"XVG/USDT","buy":0.00696709,"sell":0.00720389,"changePercentage":-1.29,"colse":0.00707129,"open":0.00716392,"low":0.00690441,"high":0.00717036,"volume":7548476.0,"name":"FEX"},{"symbol":"SC/BTC","buy":0.00000069,"sell":0.00000073,"changePercentage":2.99,"colse":0.00000069,"open":0.00000067,"low":0.00000067,"high":0.00000071,"volume":262660214.0,"name":"FEX"},{"symbol":"SC/USDT","buy":0.00273702,"sell":0.00278871,"changePercentage":-0.02,"colse":0.00276578,"open":0.00276641,"low":0.00271956,"high":0.00279861,"volume":13070340.0,"name":"FEX"},{"symbol":"VIA/BTC","buy":0.00008074,"sell":0.00008201,"changePercentage":0.48,"colse":0.00008130,"open":0.00008091,"low":0.00008014,"high":0.00008178,"volume":103869.0,"name":"FEX"},{"symbol":"BTC/USDT","buy":3952.31,"sell":3992.25,"changePercentage":-0.78,"colse":3971.71,"open":4003.09,"low":3935.08,"high":4003.09,"volume":526.0,"name":"FEX"},{"symbol":"DASH/BTC","buy":0.019991,"sell":0.020230,"changePercentage":-1.14,"colse":0.020015,"open":0.020245,"low":0.019807,"high":0.020245,"volume":2344.0,"name":"FEX"},{"symbol":"ETH/USDT","buy":147.77,"sell":149.29,"changePercentage":-0.56,"colse":148.14,"open":148.97,"low":146.62,"high":148.97,"volume":6306.0,"name":"FEX"},{"symbol":"BCH/USDT","buy":157.03,"sell":158.76,"changePercentage":-0.19,"colse":157.42,"open":157.72,"low":155.94,"high":159.75,"volume":3971.0,"name":"FEX"},{"symbol":"ETC/USDT","buy":4.8830,"sell":4.9378,"changePercentage":-0.96,"colse":4.8896,"open":4.9372,"low":4.8039,"high":4.9428,"volume":56826.0,"name":"FEX"},{"symbol":"LTC/USDT","buy":39.15,"sell":39.56,"changePercentage":-0.81,"colse":39.23,"open":39.55,"low":38.38,"high":39.62,"volume":25555.0,"name":"FEX"},{"symbol":"ZIL/USDT","buy":0.023731,"sell":0.023987,"changePercentage":0.68,"colse":0.023815,"open":0.023654,"low":0.023009,"high":0.023982,"volume":2964770.0,"name":"FEX"},{"symbol":"XDAG/USDT","buy":0.0086,"sell":0.0185,"changePercentage":0.0,"colse":0.0215,"open":0.0215,"low":0.0215,"high":0.0215,"volume":0.0,"name":"FEX"},{"symbol":"PIVX/BTC","buy":0.00022626,"sell":0.00023176,"changePercentage":5.61,"colse":0.00022824,"open":0.00021612,"low":0.00021201,"high":0.00023090,"volume":30787.0,"name":"FEX"},{"symbol":"DCR/BTC","buy":0.00452934,"sell":0.00455455,"changePercentage":-3.22,"colse":0.00454216,"open":0.00469348,"low":0.00452929,"high":0.00471318,"volume":131688.0,"name":"FEX"},{"symbol":"ETH/BTC","buy":0.037192,"sell":0.037582,"changePercentage":0.41,"colse":0.037309,"open":0.037155,"low":0.037045,"high":0.037446,"volume":2851.0,"name":"FEX"},{"symbol":"FEX/BTC","buy":0.00001015,"sell":0.00001044,"changePercentage":0.0,"colse":0.0000104,"open":0.0000104,"low":0.0000104,"high":0.0000104,"volume":8000.0,"name":"FEX"},{"symbol":"LTC/BTC","buy":0.009860,"sell":0.009962,"changePercentage":-0.01,"colse":0.009884,"open":0.009885,"low":0.009673,"high":0.009908,"volume":5800.0,"name":"FEX"},{"symbol":"BCH/BTC","buy":0.0397,"sell":0.039967,"changePercentage":1.10,"colse":0.039801,"open":0.039367,"low":0.039193,"high":0.040271,"volume":2037.0,"name":"FEX"},{"symbol":"ETC/BTC","buy":0.001228,"sell":0.001243,"changePercentage":-0.08,"colse":0.001235,"open":0.001236,"low":0.001212,"high":0.001241,"volume":98566.0,"name":"FEX"},{"symbol":"DOGE/BTC","buy":0.00000053,"sell":0.00000058,"changePercentage":1.82,"colse":0.00000056,"open":0.00000055,"low":0.00000053,"high":0.00000056,"volume":476896819.0,"name":"FEX"},{"symbol":"XZC/BTC","buy":0.00145101,"sell":0.00147234,"changePercentage":0.28,"colse":0.00145954,"open":0.00145548,"low":0.00141675,"high":0.00146581,"volume":17528.0,"name":"FEX"},{"symbol":"SC/ETH","buy":0.00001849,"sell":0.00001904,"changePercentage":1.03,"colse":0.00001867,"open":0.00001848,"low":0.00001839,"high":0.00001880,"volume":2794491.0,"name":"FEX"},{"symbol":"FEX/ETH","buy":0.00027658,"sell":0.0002899,"changePercentage":0.0,"colse":0.00028,"open":0.00028,"low":0.00028,"high":0.00028,"volume":5605.0,"name":"FEX"},{"symbol":"EOS/ETH","buy":0.01849743,"sell":0.01871953,"changePercentage":0.58,"colse":0.01857295,"open":0.01846646,"low":0.01832464,"high":0.01864940,"volume":86812.0,"name":"FEX"},{"symbol":"IOST/ETH","buy":0.00004817,"sell":0.00004885,"changePercentage":6.32,"colse":0.00004831,"open":0.00004544,"low":0.00004502,"high":0.00004906,"volume":2181578.0,"name":"FEX"},{"symbol":"DGD/ETH","buy":0.134495,"sell":0.137707,"changePercentage":-0.65,"colse":0.135266,"open":0.136153,"low":0.133143,"high":0.137976,"volume":1119.0,"name":"FEX"},{"symbol":"TNB/ETH","buy":0.00002121,"sell":0.00002172,"changePercentage":-0.47,"colse":0.00002128,"open":0.00002138,"low":0.00002097,"high":0.00002154,"volume":2466711.0,"name":"FEX"},{"symbol":"RUFF/ETH","buy":0.00006112,"sell":0.00006260,"changePercentage":-0.50,"colse":0.00006151,"open":0.00006182,"low":0.00005976,"high":0.00006320,"volume":2756039.0,"name":"FEX"},{"symbol":"ZIL/ETH","buy":0.00015978,"sell":0.00016199,"changePercentage":1.19,"colse":0.00016040,"open":0.00015852,"low":0.00015538,"high":0.00016121,"volume":2668445.0,"name":"FEX"}]' http_version: - recorded_at: Wed, 25 Apr 2018 06:37:23 GMT + recorded_at: Wed, 09 Jan 2019 01:42:31 GMT recorded_with: VCR 4.0.0 diff --git a/spec/cassettes/vcr_cassettes/Fex/integration_specs_fetch_ticker.yml b/spec/cassettes/vcr_cassettes/Fex/integration_specs_fetch_ticker.yml index 83ac92da7..35d62d7d4 100644 --- a/spec/cassettes/vcr_cassettes/Fex/integration_specs_fetch_ticker.yml +++ b/spec/cassettes/vcr_cassettes/Fex/integration_specs_fetch_ticker.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://api.fexpro.io/api/market/ticker + uri: http://api.fexhk.com/api/market/ticker body: encoding: UTF-8 string: '' @@ -10,7 +10,7 @@ http_interactions: Connection: - close Host: - - api.fexpro.io + - api.fexhk.com User-Agent: - http.rb/3.0.0 response: @@ -18,29 +18,29 @@ http_interactions: code: 200 message: OK headers: + Server: + - nginx + Date: + - Wed, 09 Jan 2019 01:42:31 GMT + Content-Type: + - application/json; charset=utf-8 + Content-Length: + - '5437' + Connection: + - close Cache-Control: - no-cache Pragma: - no-cache - Content-Length: - - '5776' - Content-Type: - - application/json; charset=utf-8 Expires: - "-1" - Server: - - Microsoft-IIS/8.5 X-Aspnet-Version: - 4.0.30319 X-Powered-By: - ASP.NET - Date: - - Wed, 25 Apr 2018 06:37:23 GMT - Connection: - - close body: encoding: UTF-8 - string: '[{"symbol":"BCH/BTC","buy":0.14222100,"sell":0.14289800,"changePercentage":-10.000000000000000,"colse":0.14244000,"open":0.15826100,"low":0.13629200,"high":0.15945700,"volume":272.11293500,"name":"FEX"},{"symbol":"BCH/USDT","buy":1342.75000000,"sell":1349.69000000,"changePercentage":-9.240000000000000,"colse":1344.63000000,"open":1481.49000000,"low":1255.02000000,"high":1501.19000000,"volume":578.53376500,"name":"FEX"},{"symbol":"BTC/USDT","buy":9414.66000000,"sell":9454.90000000,"changePercentage":1.010000000000000,"colse":9423.48000000,"open":9329.47000000,"low":9182.46000000,"high":9756.68000000,"volume":119.55500000,"name":"FEX"},{"symbol":"DASH/BTC","buy":0.05214300,"sell":0.05251600,"changePercentage":-8.480000000000000,"colse":0.05229500,"open":0.05713900,"low":0.05038200,"high":0.05755400,"volume":721.01722500,"name":"FEX"},{"symbol":"DCR/BTC","buy":0.00917917,"sell":0.00931860,"changePercentage":15.710000000000000,"colse":0.00922670,"open":0.00797385,"low":0.00758230,"high":0.01060114,"volume":8429.57445467,"name":"FEX"},{"symbol":"DGD/ETH","buy":0.42783800,"sell":0.43345800,"changePercentage":2.660000000000000,"colse":0.43040600,"open":0.41924600,"low":0.40990800,"high":0.47164300,"volume":235.90127500,"name":"FEX"},{"symbol":"DOGE/BTC","buy":0.00000055,"sell":0.00000058,"changePercentage":-6.450000000000000,"colse":0.00000058,"open":0.00000062,"low":0.00000054,"high":0.00000064,"volume":3583901301.04214500,"name":"FEX"},{"symbol":"EOS/ETH","buy":0.02195783,"sell":0.02211885,"changePercentage":12.890000000000000,"colse":0.02196236,"open":0.01945425,"low":0.01929560,"high":0.02274515,"volume":31062.40300000,"name":"FEX"},{"symbol":"ETC/BTC","buy":0.00215900,"sell":0.00218500,"changePercentage":-6.570000000000000,"colse":0.00216000,"open":0.00231200,"low":0.00203300,"high":0.00242200,"volume":14577.91221500,"name":"FEX"},{"symbol":"ETC/USDT","buy":20.48000000,"sell":20.49000000,"changePercentage":-5.540000000000000,"colse":20.48000000,"open":21.68000000,"low":18.71000000,"high":32.47000000,"volume":12039.36165000,"name":"FEX"},{"symbol":"ETH/BTC","buy":0.07028100,"sell":0.07061900,"changePercentage":-6.000000000000000,"colse":0.07043500,"open":0.07492800,"low":0.06827200,"high":0.07558800,"volume":407.63227500,"name":"FEX"},{"symbol":"ETH/USDT","buy":662.86000000,"sell":665.67000000,"changePercentage":-5.060000000000000,"colse":663.92000000,"open":699.30000000,"low":426.04000000,"high":711.61000000,"volume":1223.80554500,"name":"FEX"},{"symbol":"FEX/BTC","buy":0.00004729,"sell":0.00005300,"changePercentage":2.910000000000000,"colse":0.00004738,"open":0.00004604,"low":0.00004600,"high":0.00005300,"volume":78434.00000000,"name":"FEX"},{"symbol":"FEX/ETH","buy":0.00067000,"sell":0.00070000,"changePercentage":-0.070000000000000,"colse":0.00067283,"open":0.00067331,"low":0.00067000,"high":0.00067668,"volume":103135.00000000,"name":"FEX"},{"symbol":"IOST/ETH","buy":0.00007386,"sell":0.00007492,"changePercentage":-2.770000000000000,"colse":0.00007467,"open":0.00007680,"low":0.00007029,"high":0.00008078,"volume":3131382.82000000,"name":"FEX"},{"symbol":"LTC/BTC","buy":0.01654100,"sell":0.01660600,"changePercentage":-4.210000000000000,"colse":0.01657500,"open":0.01730400,"low":0.01630000,"high":0.01759400,"volume":1848.28361500,"name":"FEX"},{"symbol":"LTC/USDT","buy":155.90000000,"sell":156.52000000,"changePercentage":-3.240000000000000,"colse":156.65000000,"open":161.90000000,"low":150.00000000,"high":166.60000000,"volume":2744.67773500,"name":"FEX"},{"symbol":"PIVX/BTC","buy":0.00057860,"sell":0.00059242,"changePercentage":-8.150000000000000,"colse":0.00057957,"open":0.00063103,"low":0.00055847,"high":0.00064942,"volume":195498.50676975,"name":"FEX"},{"symbol":"RUFF/ETH","buy":0.00012292,"sell":0.00012459,"changePercentage":-16.150000000000000,"colse":0.00012439,"open":0.00014834,"low":0.00012292,"high":0.00016446,"volume":1432728.34650000,"name":"FEX"},{"symbol":"SC/BTC","buy":0.00000219,"sell":0.00000222,"changePercentage":-5.170000000000000,"colse":0.00000220,"open":0.00000232,"low":0.00000181,"high":0.00000240,"volume":129739178.78212500,"name":"FEX"},{"symbol":"SC/ETH","buy":0.00003108,"sell":0.00003165,"changePercentage":2.460000000000000,"colse":0.00003160,"open":0.00003084,"low":0.00003014,"high":0.00003200,"volume":134904486.87336500,"name":"FEX"},{"symbol":"SC/USDT","buy":0.02063742,"sell":0.02112618,"changePercentage":-3.610000000000000,"colse":0.02103459,"open":0.02182231,"low":0.01962457,"high":0.02276245,"volume":127894876.50366500,"name":"FEX"},{"symbol":"TNB/ETH","buy":0.00007536,"sell":0.00007789,"changePercentage":-6.270000000000000,"colse":0.00007592,"open":0.00008100,"low":0.00007082,"high":0.00008271,"volume":2797338.90000000,"name":"FEX"},{"symbol":"VIA/BTC","buy":0.00026706,"sell":0.00027122,"changePercentage":-1.250000000000000,"colse":0.00027112,"open":0.00027456,"low":0.00024741,"high":0.00028151,"volume":54829.33833476,"name":"FEX"},{"symbol":"XVG/BTC","buy":0.00000683,"sell":0.00000695,"changePercentage":-7.150000000000000,"colse":0.00000688,"open":0.00000741,"low":0.00000648,"high":0.00000745,"volume":19355346.22285585,"name":"FEX"},{"symbol":"XVG/USDT","buy":0.06486836,"sell":0.06545764,"changePercentage":-4.980000000000000,"colse":0.06522025,"open":0.06863561,"low":0.05996367,"high":0.06958407,"volume":5355744.46727120,"name":"FEX"},{"symbol":"ZIL/ETH","buy":0.00013418,"sell":0.00013578,"changePercentage":-2.630000000000000,"colse":0.00013497,"open":0.00013861,"low":0.00012139,"high":0.00014366,"volume":873851.99600000,"name":"FEX"},{"symbol":"ZIL/USDT","buy":0.08915000,"sell":0.08967800,"changePercentage":-7.740000000000000,"colse":0.08947300,"open":0.09697800,"low":0.05611400,"high":0.10016800,"volume":2345290.61300000,"name":"FEX"}]' + string: '[{"symbol":"DLB/ETH","buy":0.00012000,"sell":0.00012400,"changePercentage":-0.13,"colse":0.00012144,"open":0.00012160,"low":0.00012040,"high":0.00012196,"volume":4089598.0,"name":"FEX"},{"symbol":"XVG/BTC","buy":0.00000175,"sell":0.00000182,"changePercentage":1.14,"colse":0.00000178,"open":0.00000176,"low":0.00000174,"high":0.00000180,"volume":11394409.0,"name":"FEX"},{"symbol":"XVG/USDT","buy":0.00696709,"sell":0.00720389,"changePercentage":-1.29,"colse":0.00707129,"open":0.00716392,"low":0.00690441,"high":0.00717036,"volume":7548476.0,"name":"FEX"},{"symbol":"SC/BTC","buy":0.00000069,"sell":0.00000073,"changePercentage":2.99,"colse":0.00000069,"open":0.00000067,"low":0.00000067,"high":0.00000071,"volume":262660214.0,"name":"FEX"},{"symbol":"SC/USDT","buy":0.00273702,"sell":0.00278871,"changePercentage":-0.02,"colse":0.00276578,"open":0.00276641,"low":0.00271956,"high":0.00279861,"volume":13070340.0,"name":"FEX"},{"symbol":"VIA/BTC","buy":0.00008074,"sell":0.00008201,"changePercentage":0.48,"colse":0.00008130,"open":0.00008091,"low":0.00008014,"high":0.00008178,"volume":103869.0,"name":"FEX"},{"symbol":"BTC/USDT","buy":3952.31,"sell":3992.25,"changePercentage":-0.78,"colse":3971.71,"open":4003.09,"low":3935.08,"high":4003.09,"volume":526.0,"name":"FEX"},{"symbol":"DASH/BTC","buy":0.019991,"sell":0.020230,"changePercentage":-1.14,"colse":0.020015,"open":0.020245,"low":0.019807,"high":0.020245,"volume":2344.0,"name":"FEX"},{"symbol":"ETH/USDT","buy":147.77,"sell":149.29,"changePercentage":-0.56,"colse":148.14,"open":148.97,"low":146.62,"high":148.97,"volume":6306.0,"name":"FEX"},{"symbol":"BCH/USDT","buy":157.03,"sell":158.76,"changePercentage":-0.19,"colse":157.42,"open":157.72,"low":155.94,"high":159.75,"volume":3971.0,"name":"FEX"},{"symbol":"ETC/USDT","buy":4.8830,"sell":4.9378,"changePercentage":-0.96,"colse":4.8896,"open":4.9372,"low":4.8039,"high":4.9428,"volume":56826.0,"name":"FEX"},{"symbol":"LTC/USDT","buy":39.15,"sell":39.56,"changePercentage":-0.81,"colse":39.23,"open":39.55,"low":38.38,"high":39.62,"volume":25555.0,"name":"FEX"},{"symbol":"ZIL/USDT","buy":0.023731,"sell":0.023987,"changePercentage":0.68,"colse":0.023815,"open":0.023654,"low":0.023009,"high":0.023982,"volume":2964770.0,"name":"FEX"},{"symbol":"XDAG/USDT","buy":0.0086,"sell":0.0185,"changePercentage":0.0,"colse":0.0215,"open":0.0215,"low":0.0215,"high":0.0215,"volume":0.0,"name":"FEX"},{"symbol":"PIVX/BTC","buy":0.00022626,"sell":0.00023176,"changePercentage":5.61,"colse":0.00022824,"open":0.00021612,"low":0.00021201,"high":0.00023090,"volume":30787.0,"name":"FEX"},{"symbol":"DCR/BTC","buy":0.00452934,"sell":0.00455455,"changePercentage":-3.22,"colse":0.00454216,"open":0.00469348,"low":0.00452929,"high":0.00471318,"volume":131688.0,"name":"FEX"},{"symbol":"ETH/BTC","buy":0.037192,"sell":0.037582,"changePercentage":0.41,"colse":0.037309,"open":0.037155,"low":0.037045,"high":0.037446,"volume":2851.0,"name":"FEX"},{"symbol":"FEX/BTC","buy":0.00001015,"sell":0.00001044,"changePercentage":0.0,"colse":0.0000104,"open":0.0000104,"low":0.0000104,"high":0.0000104,"volume":8000.0,"name":"FEX"},{"symbol":"LTC/BTC","buy":0.009860,"sell":0.009962,"changePercentage":-0.01,"colse":0.009884,"open":0.009885,"low":0.009673,"high":0.009908,"volume":5800.0,"name":"FEX"},{"symbol":"BCH/BTC","buy":0.0397,"sell":0.039967,"changePercentage":1.10,"colse":0.039801,"open":0.039367,"low":0.039193,"high":0.040271,"volume":2037.0,"name":"FEX"},{"symbol":"ETC/BTC","buy":0.001228,"sell":0.001243,"changePercentage":-0.08,"colse":0.001235,"open":0.001236,"low":0.001212,"high":0.001241,"volume":98566.0,"name":"FEX"},{"symbol":"DOGE/BTC","buy":0.00000053,"sell":0.00000058,"changePercentage":1.82,"colse":0.00000056,"open":0.00000055,"low":0.00000053,"high":0.00000056,"volume":476896819.0,"name":"FEX"},{"symbol":"XZC/BTC","buy":0.00145101,"sell":0.00147234,"changePercentage":0.28,"colse":0.00145954,"open":0.00145548,"low":0.00141675,"high":0.00146581,"volume":17528.0,"name":"FEX"},{"symbol":"SC/ETH","buy":0.00001849,"sell":0.00001904,"changePercentage":1.03,"colse":0.00001867,"open":0.00001848,"low":0.00001839,"high":0.00001880,"volume":2794491.0,"name":"FEX"},{"symbol":"FEX/ETH","buy":0.00027658,"sell":0.0002899,"changePercentage":0.0,"colse":0.00028,"open":0.00028,"low":0.00028,"high":0.00028,"volume":5605.0,"name":"FEX"},{"symbol":"EOS/ETH","buy":0.01849743,"sell":0.01871953,"changePercentage":0.58,"colse":0.01857295,"open":0.01846646,"low":0.01832464,"high":0.01864940,"volume":86812.0,"name":"FEX"},{"symbol":"IOST/ETH","buy":0.00004817,"sell":0.00004885,"changePercentage":6.32,"colse":0.00004831,"open":0.00004544,"low":0.00004502,"high":0.00004906,"volume":2181578.0,"name":"FEX"},{"symbol":"DGD/ETH","buy":0.134495,"sell":0.137707,"changePercentage":-0.65,"colse":0.135266,"open":0.136153,"low":0.133143,"high":0.137976,"volume":1119.0,"name":"FEX"},{"symbol":"TNB/ETH","buy":0.00002121,"sell":0.00002172,"changePercentage":-0.47,"colse":0.00002128,"open":0.00002138,"low":0.00002097,"high":0.00002154,"volume":2466711.0,"name":"FEX"},{"symbol":"RUFF/ETH","buy":0.00006112,"sell":0.00006260,"changePercentage":-0.50,"colse":0.00006151,"open":0.00006182,"low":0.00005976,"high":0.00006320,"volume":2756039.0,"name":"FEX"},{"symbol":"ZIL/ETH","buy":0.00015978,"sell":0.00016199,"changePercentage":1.19,"colse":0.00016040,"open":0.00015852,"low":0.00015538,"high":0.00016121,"volume":2668445.0,"name":"FEX"}]' http_version: - recorded_at: Wed, 25 Apr 2018 06:37:23 GMT + recorded_at: Wed, 09 Jan 2019 01:42:31 GMT recorded_with: VCR 4.0.0 diff --git a/spec/exchanges/fex/market_spec.rb b/spec/exchanges/fex/market_spec.rb index e06c13669..8b42cf3cf 100644 --- a/spec/exchanges/fex/market_spec.rb +++ b/spec/exchanges/fex/market_spec.rb @@ -2,5 +2,5 @@ RSpec.describe Cryptoexchange::Exchanges::Fex::Market do it { expect(described_class::NAME).to eq 'fex' } - it { expect(described_class::API_URL).to eq 'http://api.fexpro.io/api' } + it { expect(described_class::API_URL).to eq 'http://api.fexhk.com/api' } end