Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Java Final Project Using the MVC pattern submit a Cryptocurrency viewer. The source of the data should be using the endpoints under HistoMinute, HistoHour and HistoDay from cryptocompare Minute:...

1 answer below »
Java Final Project
Using the MVC pattern submit a Cryptocu
ency viewer.
The source of the data should be using the endpoints under HistoMinute, HistoHour and HistoDay from cryptocompare
Minute: https:
min-api.cryptocompare.com/data/histominute?aggregate=1&e=CCCAGG&extraParams=CryptoCompare&fsym=BTC&limit=10&tryConversion=false&tsym=USD
Hour: https:
min-api.cryptocompare.com/data/histohour?aggregate=1&e=CCCAGG&extraParams=CryptoCompare&fsym=BTC&limit=10&tryConversion=false&tsym=USD
Day: https:
min-api.cryptocompare.com/data/histoday?aggregate=1&e=CCCAGG&extraParams=CryptoCompare&fsym=BTC&limit=10&tryConversion=false&tsym=USD
The UI should look like the following (minus the purple lines):
The items between two of the dotted black vertical lines represents a sample. On Purple we are highlighting the high, low point, the opening and closing points.
These endpoints should be changed when the respective button is pressed and display the right values
The points that make up the full amount of points is:
1. UI displays all the elements shown in the prototype
2. Switching endpoints when displaying the co
ect button
3. Usage of data structures and asynchronous calls
4. Using co
ectly the MVC pattern
5. Works co
ectly
Answered 1 days After Aug 29, 2021

Solution

Breeze Prakash answered on Aug 30 2021
143 Votes
Java Final Project
Using the MVC pattern submit a Cryptocu
ency viewer.
The source of the data should be using the endpoints under HistoMinute, HistoHour and HistoDay from cryptocompare
Minute: https:
min-api.cryptocompare.com/data/histominute?aggregate=1&e=CCCAGG&extraParams=CryptoCompare&fsym=BTC&limit=10&tryConversion=false&tsym=USD
Hour: https:
min-api.cryptocompare.com/data/histohour?aggregate=1&e=CCCAGG&extraParams=CryptoCompare&fsym=BTC&limit=10&tryConversion=false&tsym=USD
Day: https:
min-api.cryptocompare.com/data/histoday?aggregate=1&e=CCCAGG&extraParams=CryptoCompare&fsym=BTC&limit=10&tryConversion=false&tsym=USD
The UI should look like the following (minus the purple lines):
The items between two of the dotted black vertical lines represents a sample. On Purple we are highlighting the high, low point, the opening and closing points.
These endpoints should be changed when the respective button is pressed and display the right values
The points that make up the full amount of points is:
1. UI displays all the elements shown in the prototype
2. Switching endpoints when displaying the co
ect button
3. Usage of data structures and asynchronous calls
4. Using co
ectly the MVC pattern
5. Works co
ectly
Answer:
const cc = require('cryptocompare')
cc.setApiKey('')
Usage:
cc.coinList()
.then(coinList => {
console.log(coinList)

-

{

BTC: {

Id: "1182",

Url: "/coins
tc/overview",

ImageUrl: "/media/19633
tc.png",

Name: "BTC",

Symbol: "BTC",

CoinName: "Bitcoin",

FullName: "Bitcoin (BTC)",

Algorithm: "SHA256",

ProofType: "PoW",

FullyPremined: "0",

TotalCoinSupply: "21000000",

PreMinedValue: "N/A",

TotalCoinsFreeFloat: "N/A",

SortOrder: "1",

Sponsored: false

},

ETH: {...},

}
})
.catch(console.e
or)
exchangeList()
Returns all the exchanges that CryptoCompare has integrated with.
exchangeList()
· No parameters
· Returns (Object)
const cc = require('cryptocompare')
cc.setApiKey('')
Usage:
cc.exchangeList()
.then(exchangeList => {
console.log(exchangeList)

{

"Cryptsy":

{

"42":["BTC","XRP"],

"EMC2":["BTC","XRP"],

"POINTS":["BTC"],

"VTC":["BTC","LTC","XRP"]

...

}

...

}
})
.catch(console.e
or)
price()
Get the cu
ent price of any cryptocu
ency in any other cu
ency.
price(fsym, tsyms[, options])
fsym (String) From Symbol
tsyms (A
ay of Strings | String) To Symbol(s)
options (Object)
tryConversion (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set tryConversion to false to disable using BTC for conversion.
exchanges (A
ay of Strings | A
ay) Exchanges to get price data from. By default, average data is used. (You can get a list of top exchanges for a given pair with topExchanges().)
const cc = require('cryptocompare')
cc.setApiKey('')
Basic Usage:
cc.price('BTC', ['USD', 'EUR'])
.then(prices => {
console.log(prices)

-> { USD: 1100.24, EUR: 1039.63 }
})
.catch(console.e
or)
Passing a single pair of cu
encies:
cc.price('BTC', 'USD')
.then(prices => {
console.log(prices)

-> { USD: 1100.24 }
})
.catch(console.e
or)
priceMulti()
Works like price(), except it allows you to specify a matrix of From Symbols.
priceMulti(fsyms, tsyms[, options])
fsyms (A
ay of Strings | String) From Symbol(s)
tsyms (A
ay of Strings | String) To Symbol(s)
options (Object)
tryConversion (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set tryConversion to false to disable using BTC for conversion.
exchanges (A
ay of Strings | A
ay) Exchanges to get price data from. By default, average data is used. (You can get a list of top exchanges for a given pair with topExchanges().)
const cc = require('cryptocompare')
cc.setApiKey('')
Basic Usage:
cc.priceMulti(['BTC', 'ETH'], ['USD', 'EUR'])
.then(prices => {
console.log(prices)

-> { BTC: { USD: 1114.63, EUR: 1055.82 },

ETH: { USD: 12.74, EUR: 12.06 } }
})
.catch(console.e
or)
Passing a single pair of cu
encies:
cc.priceMulti('BTC', 'USD')
.then(prices => {
console.log(prices)

-> { BTC: { USD: 1114.63 } }
})
.catch(console.e
or)
priceFull()
Get all the cu
ent trading info (price, vol, open, high, low, etc.) of any list of cryptocu
encies in any other cu
ency.
priceFull(fsyms, tsyms[, options])
fsyms (A
ay of Strings | String) From Symbol(s)
tsyms (A
ay of Strings | String) To Symbol(s)
options (Object)
tryConversion (Boolean) By default, if the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Set tryConversion to false to disable using BTC for conversion.
exchanges (A
ay of Strings | A
ay) Exchanges to get price data from. By default, average data is used. (You can get a list of top exchanges for a given pair with topExchanges().)
const cc = require('cryptocompare')
cc.setApiKey('')
cc.priceFull(['BTC', 'ETH'], ['USD', 'EUR'])
.then(prices => {
console.log(prices)

{

BTC: {

USD: {

TYPE: '5',

MARKET: 'CCCAGG',

FROMSYMBOL: 'BTC',

TOSYMBOL: 'USD',

FLAGS: '4',

PRICE: 1152.42,

LASTUPDATE: 1487865689,

LASTVOLUME: 0.21,

LASTVOLUMETO: 242.20349999999996,

LASTTRADEID: 1224703,

VOLUME24HOUR: 53435.45299122338,

VOLUME24HOURTO: 60671593.843186244,

OPEN24HOUR: 1119.31,

HIGH24HOUR: 1170,

LOW24HOUR: 1086.641,

LASTMARKET: 'itBit',

CHANGE24HOUR: 33.11000000000013,

CHANGEPCT24HOUR: 2.958072383879366,

SUPPLY: 16177825,

MKTCAP: 18643649086.5

},

EUR: ...

},

ETH: ...

}
})
.catch(console.e
or)
priceHistorical()
Get the price of any cryptocu
ency in any other cu
ency at a given timestamp. The price comes from the daily info - so...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here