diff options
| author | Adam Soltys <[email protected]> | 2018-03-20 14:58:45 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2018-03-20 14:58:45 -0700 |
| commit | c68fc448147858dcb93d4be2197b35244f42ae91 (patch) | |
| tree | bd9057c146f21e4c2ffc0dce1b99e27e7eb69a72 /test.js | |
| parent | 27cba8e4b054b6dde5b399e201d52b77b11a9a8a (diff) | |
| download | coinos-server-c68fc448147858dcb93d4be2197b35244f42ae91.tar.gz coinos-server-c68fc448147858dcb93d4be2197b35244f42ae91.zip | |
get data from quadriga, fix meta reference
Diffstat (limited to 'test.js')
| -rw-r--r-- | test.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test.js b/test.js new file mode 100644 index 00000000..2df8ba3a --- /dev/null +++ b/test.js @@ -0,0 +1,17 @@ +import request from 'request' +import crypto from 'crypto-js' +import config from './config' + +const nonce = Date.now().toString() +const conf = config.quad +const signature = crypto.HmacSHA256( + nonce + conf.client_id + conf.key, + conf.secret +).toString() + +request('https://api.quadrigacx.com/v2/order_book', (error, response, body) => { + let data = JSON.parse(body) + let quadriga_ask = data.asks[0][0] + let amount = data.asks[0][1] + console.log('Quadriga ask price: ' + quadriga_ask) +}) |
