https://github.com/pagepro/js-ajax-excercise
https://github.com/pagepro/js-ajax-excercise
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pagepro/js-ajax-excercise
- Owner: Pagepro
- Created: 2017-07-09T17:00:47.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-03T12:37:59.000Z (almost 8 years ago)
- Last Synced: 2025-03-22T06:01:44.377Z (2 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JavaScript Ajax Excercise
- Script needs to calculate arbitrage opportunity between two bitcoin exchanges
## What is arbitrage?
`A situation in which dealers can make a profit because of the temporary difference in the value between two currencies in relation to a third currency.`
Source: http://lexicon.ft.com/Term?term=exchange-arbitrage## What to do?
- Fetch BTC Buy and Sell prices from BitBay exchange: https://bitbay.net/API/Public/BTCPLN/ticker.json
- Fetch BTC Buy and Sell prices from BitMarket exchange: https://www.bitmarket.pl/market.php?market=BTCPLN
- Check if it is worth to buy BTC on one exchange and sell on another.
- Check where we should to buy and where to sell.
- If you are buying BTC - you need to check `ASK` price, when you are selling `BID` price.## Layout:
- when you are loading the data - display `loading` infromation (using CSS Spinner)
- when you have the data, display Buy and Sell price from both exchanges
- as the last step, display where it is worth to buy and where to sell BTC
- Example interface: https://docs.google.com/spreadsheets/d/176E423tTNTje7oIZP8Ekwq1AQAwr5hYQECDxdZ78qSw/edit?usp=sharing## Technical options
- Level easy: jQuery
- Level medium: ES6
- Level hard: VanilaJS