mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 08:18:07 +00:00
commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>CCXT Basic example for the browser</title>
|
||||
<script type="text/javascript" src="https://unpkg.com/ccxt"></script>
|
||||
<script>
|
||||
|
||||
document.addEventListener ("DOMContentLoaded", function () {
|
||||
|
||||
alert ('CCXT' + (ccxt.isBrowser ? ' browser' : '') + ' version ' + ccxt.version);
|
||||
|
||||
const exchange = new ccxt.coinbasepro ({ enableRateLimit: true })
|
||||
const symbol = 'ETH/BTC'
|
||||
|
||||
exchange.fetchTicker (symbol).then (ticker => {
|
||||
|
||||
const text = [
|
||||
exchange.id,
|
||||
symbol,
|
||||
JSON.stringify (ticker, undefined, '\n\t')
|
||||
]
|
||||
|
||||
document.getElementById ('content').innerHTML = text.join (' ')
|
||||
|
||||
}).catch (e => {
|
||||
|
||||
const text = [
|
||||
e.constructor.name,
|
||||
e.message,
|
||||
]
|
||||
|
||||
document.getElementById ('content').innerHTML = text.join (' ')
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello, CCXT!</h1>
|
||||
<pre id="content"></pre>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user