Skip to content

Commit

Permalink
authentication rb
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvisLYC committed May 8, 2019
1 parent a706f87 commit 8d25522
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/cryptoexchange/exchanges/uniswap/authentication.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Cryptoexchange::Exchanges
module Uniswap
class Authentication < Cryptoexchange::Services::Authentication
def headers
api_key = HashHelper.dig(Cryptoexchange::Credentials.get(@exchange), 'api_key')
end
end
end
end
9 changes: 8 additions & 1 deletion lib/cryptoexchange/exchanges/uniswap/market.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ module Uniswap
class Market < Cryptoexchange::Models::Market
NAME = 'uniswap'
API_URL = "https://api-test-238309.appspot.com/v0/exchanges?key"
API_KEY = HashHelper.dig(Cryptoexchange::Credentials.get(@exchange), 'api_key')

# Read the API key here
authentication = Cryptoexchange::Exchanges::Uniswap::Authentication.new(
:market,
Cryptoexchange::Exchanges::Uniswap::Market::NAME
)

API_KEY = authentication.headers
end
end
end

0 comments on commit 8d25522

Please sign in to comment.