Open koentjeappel opened 4 years ago
Is this true or am i just doing something wrong?
Can you please help me @uaktags ?
Hey, using v3 definitely will need a recode. I started looking into this but haven't gotten far yet. I should have a solution today, but their way of dealing with access keys is a PITA
So i'm not sure how cleanly this will work with Iquidus, but it atleast works using the test.js. My guess is there will probably be issues with settings from the market itself. Still a little more to test out.
Thanks for looking into this!
will wait until you think its all good :)
Okay, so it appears, until we get i18 added into official, some edits are needed to the pugs. I'll use gist for now until i rework this repo. I have it working on my end with official iquidus master.
https://gist.github.com/uaktags/12bb37b098a6e08413dbe3fe7ce8ec1c
That should get you going. That's v2. I'll look into v3 soon.
So if i add the graviex.js and add it the required to the database.js and change the settings.json it should work?
Correct,
add graviex.js, graviex.pug, add the snippet to database.js, and add in the graviex_* fields to settings.json. Then you can do node scripts/sync.js market
and you'll be off to the races (knock on wood)
Thanks will try it later, somehow im my latest restart i removed the data from the richlist or something. but i see that the sync.js index update is running so im guessing its pulling the data for the rich list now https://eu.pacglobalexplorer.com/richlist
It works :) the info gets pulled and shown in the price tab. But the market tab shows this:
/root/explorer/views/markets/graviex.pug:8 6| .card.card-default 7| .card-header > 8| strong= t('market.market_title',{market : t('exchange.graviex'),coin : marketdata.coin, exchange : marketdata.exchange }) 9| a(href='#') 10| span.fa.fa-line-chart.pull-right.view-chart-disabled.iquidus.market-toggle(data-toggle='tooltip', data-placement='bottom', title= t('market.no_chart')) 11| table.table.table-bordered.summary-table t is not a function
So i will disable the markets tab
Hello,
I have been using just the price on our explorer. pacglobalexplorer.com
But it started erroring when doing nodejs scripts/sync.js market
This is the error: root@Explorergood:~/explorer# nodejs scripts/sync.js market script launched with pid: 5742 send request to - https://graviex.net/api/v2/order_book.json?access_key=KEYHIDDEN&market=pacbtc&signature=099908f0eea50718fc367bb1db230ce8cba1ed260dac3f29cd8b9a7be877d131&tonce=1599921378214 error code: 1020 /root/explorer/lib/markets/graviex.js:82 if (buyorders.length > 0){ ^
TypeError: Cannot read property 'length' of undefined
at Request._callback (/root/explorer/lib/markets/graviex.js:82:25)
at Request.self.callback (/root/explorer/node_modules/request/request.js:185:22)
at Request.emit (events.js:315:20)
at Request.
Do you know what the problem is?
It's saying that but orders doesn't exist. So check if body contains any bids:
buyorders = body['bids']; So if buyorders is undefined, something isn't returning from that api correctly
Hi @uaktags ,
I'm looking for the modification for the explorer, work with graviex.net v2.
Follow your instruction (https://gist.github.com/uaktags/12bb37b098a6e08413dbe3fe7ce8ec1c) I've already added :
graviex.js to lib/markets/ ;
graviex.pug to views/markets/ .
and setting.json-snippet .
add to lib/database.js
, graviex = require('./markets/graviex')
When I run to update : nodejs scripts/sync.js market
, I met an error message:
`nodejs scripts/sync.js market
script launched with pid: 842
events.js:183
throw er; // Unhandled 'error' event
^
TypeError: coin.concat is not a function at get_summary (/home/exp/explorer/lib/markets/graviex.js:6:33) at Object.get_data (/home/exp/explorer/lib/markets/graviex.js:47:9) at get_market_data (/home/exp/explorer/lib/database.js:167:14) at Object.update_markets_db (/home/exp/explorer/lib/database.js:658:5) at /home/exp/explorer/scripts/sync.js:239:20 at /home/exp/explorer/lib/database.js:474:16 ` Please help me, Thanks
If you're getting coin.concat
is not a function then that's telling me that "coin" is undefined.
You shouldn't need the graviex = require(
if you're on the latest version of iquidus. As we use https://github.com/iquidus/explorer/blob/5f33fea620701db019f4bd4dae28bc0e28a53a67/lib/database.js#L163-L172
The gist itself, too, is out of date. Change these lines: https://gist.github.com/uaktags/12bb37b098a6e08413dbe3fe7ce8ec1c#file-graviex-js-L117-L130 to be similar to whats in the markets currently on iquidus: https://github.com/iquidus/explorer/blob/5f33fea620701db019f4bd4dae28bc0e28a53a67/lib/markets/ccex.js#L122-L134
It should look SOMETHING (not tested) like this:
get_data: function(settings, cb) {
var error = null;
get_orders(settings.coin, settings.exchange, function(err, buys, sells) {
if (err) { error = err; }
get_trades(settings.coin, settings.exchange, function(err, trades) {
if (err) { error = err; }
get_summary(settings.coin, settings.exchange, function(err, stats) {
if (err) { error = err; }
//return cb(error, {buys: buys, sells: sells, chartdata: [], trades: trades, stats: stats});
return cb(error, {buys: buys, sells: sells, chartdata: [], trades: trades, stats: stats});
});
});
});
}
see how that fairs for you if you're on the latest version
Thank you @uaktags , It works perfectly with graviex v2 api
I believe this is outdated since this api call: function get_orders(coin, exchange, cb) { var req_url = base_url + '/order_book.json?market=' + coin.concat(exchange).toLowerCase();
this link as example: https://graviex.net/api/v3/order_book.json?market=pacbtc gives:{"error":{"code":1001,"message":"access_key is missing, tonce is missing, signature is missing"}}
I believe this is because when it was created it didnt require access key and tonce etc.
Is this correct or am i just doing something wrong?