Skip to content
This repository was archived by the owner on Jun 22, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ Or install it yourself as:
| CCex | Y | | | | Y | | ccex | |
| Ccx | Y | | | | Y | Y | ccx | |
| Cex | Y | Y [x] | Y | | Y | | cex | |
| Cezex | Y | N | N | | Y | Y | cezex | |
| Cfinex | Y | Y | Y | | Y | Y | cfinex | |
| Chaince | Y | | | | Y | Y | chaince | |
| Chainrift | Y | Y [x] | Y | | Y | | chainrift | |
Expand Down Expand Up @@ -341,6 +340,7 @@ Or install it yourself as:
| Livecoin | Y | Y [x] | | | Y | | livecoin | |
| LocalBitcoins | Y | N | Y [limit: 500]| | Y | | localbitcoins | P2P |
| LocalTrade | Y | | | | Y | Y | localtrade | |
| Lucent | Y | N | N | | Y | Y | lucent | |
| Lukki | Y | Y [x] | | | Y | Y | lukki | |
| Luno | Y | | | | Y | Y | luno | |
| Lykke | Y | Y | N | | Y | | lykke | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Cryptoexchange::Exchanges
module Cezex
module Lucent
class Market < Cryptoexchange::Models::Market
NAME = 'cezex'
API_URL = 'https://beta.cezex.io/api/v2'
NAME = 'lucent'
API_URL = 'https://lucent.exchange/api/v2'
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Cryptoexchange::Exchanges
module Cezex
module Lucent
module Services
class Market < Cryptoexchange::Services::Market
class << self
Expand All @@ -15,15 +15,15 @@ def fetch(market_pair)

def ticker_url(market_pair)
market = "#{market_pair.base}#{market_pair.target}".downcase
"#{Cryptoexchange::Exchanges::Cezex::Market::API_URL}/tickers/#{market}.json"
"#{Cryptoexchange::Exchanges::Lucent::Market::API_URL}/tickers/#{market}.json"
end

def adapt(output, market_pair)
ticker = Cryptoexchange::Models::Ticker.new
ticker_json = output['ticker']
ticker.base = market_pair.base
ticker.target = market_pair.target
ticker.market = Cezex::Market::NAME
ticker.market = Lucent::Market::NAME
ticker.bid = NumericHelper.to_d(ticker_json['buy'])
ticker.ask = NumericHelper.to_d(ticker_json['sell'])
ticker.low = NumericHelper.to_d(ticker_json['low'])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Cryptoexchange::Exchanges
module Cezex
module Lucent
module Services
class Pairs < Cryptoexchange::Services::Pairs
PAIRS_URL = "#{Cryptoexchange::Exchanges::Cezex::Market::API_URL}/markets"
PAIRS_URL = "#{Cryptoexchange::Exchanges::Lucent::Market::API_URL}/markets"

def fetch
output = super
Expand All @@ -14,7 +14,7 @@ def adapt(output)
Cryptoexchange::Models::MarketPair.new({
base: market['name'].split("/")[0],
target: market['name'].split("/")[1],
market: Cezex::Market::NAME
market: Lucent::Market::NAME
})
end
end
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions spec/exchanges/cezex/market_spec.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
require 'spec_helper'

RSpec.describe 'Cezex integration specs' do
RSpec.describe 'Lucent integration specs' do
let(:client) { Cryptoexchange::Client.new }
let(:gio_btc_pair) { Cryptoexchange::Models::MarketPair.new(base: 'GIO', target: 'BTC', market: 'cezex') }
let(:gio_btc_pair) { Cryptoexchange::Models::MarketPair.new(base: 'GIO', target: 'BTC', market: 'lucent') }

it 'fetch pairs' do
pairs = client.pairs('cezex')
pairs = client.pairs('lucent')
expect(pairs).not_to be_empty

pair = pairs.first
expect(pair.base).not_to be_nil
expect(pair.target).not_to be_nil
expect(pair.market).to eq 'cezex'
expect(pair.market).to eq 'lucent'
end

it 'fetch ticker' do
ticker = client.ticker(gio_btc_pair)

expect(ticker.base).to eq 'GIO'
expect(ticker.target).to eq 'BTC'
expect(ticker.market).to eq 'cezex'
expect(ticker.market).to eq 'lucent'
expect(ticker.last).to be_a Numeric
expect(ticker.bid).to be_a Numeric
expect(ticker.ask).to be_a Numeric
Expand Down
7 changes: 7 additions & 0 deletions spec/exchanges/lucent/market_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'spec_helper'

RSpec.describe Cryptoexchange::Exchanges::Lucent::Market do
it { expect(described_class::NAME).to eq 'lucent' }
it { expect(described_class::API_URL).to eq 'https://lucent.exchange/api/v2' }
end