iquidus / explorer

An open source block explorer
BSD 3-Clause "New" or "Revised" License
748 stars 1.33k forks source link

CCEX Market Sporadically Working #114

Closed togosh closed 5 years ago

togosh commented 6 years ago

I have Markets enabled and CCEX set as the Market, with my CCEX API KEY added https://coinigy.freshdesk.com/support/solutions/articles/1000203427-how-do-i-find-my-api-key-on-the-c-cex-exchange-

But it seems to only work for a little while and then not work for a long while and maybe sometimes work sporadically

My Settings:

  // menu settings
  "display": {
    "markets": true,
  },
  // market settings
  //supported markets: bittrex, poloniex, yobit, empoex, bleutrade, cryptopia, ccex
  "markets": {
    "coin": "XXX",
    "exchange": "BTC",
    "enabled": ["ccex"],
    "cryptopia_id": "",
    "ccex_key" : "XXXXXXXX",
    "default": "ccex"
  },

When I go to the /markets/ccex link I will see an error like this a lot: in console

{ _id: 5a14dd4bab8fb28522f9ce53,
  market: 'ccex',
  __v: 0,
  history: null,
  sells: [],
  buys: [],
  chartdata: [ '[]' ],
  summary: null }
GET /markets/ccex 500 1042ms - 6.47kb

And on the Web Page UI I will see these errors:

/home/xxxxx/explorer/views/markets/ccex.jade:23 21| tbody 22| tr > 23| td #{marketdata.data.summary.high} 24| td #{marketdata.data.summary.low} 25| td.hidden-xs #{marketdata.data.summary.bid} 26| td.hidden-xs #{marketdata.data.summary.ask} Cannot read property 'high' of null

/home/xxxxx/explorer/views/markets/ccex.jade:84 82| th.hidden-xs #{settings.locale.mkt_time_stamp} 83| tbody > 84| each order in marketdata.data.history 85| if order.ordertype == 'Buy' 86| tr.success 87| td.hidden-xs Cannot read property 'length' of null

When I run the markets script it says it updates successfully:

sudo node scripts/sync.js market
script launched with pid: 12035
ccex market data updated successfully.

Or I see an error like this:

xxxx@xxxx:~/explorer$ sudo node scripts/sync.js market
script launched with pid: 12373
/home/ubuntu/explorer/lib/database.js:589
              last_price: obj.stats.last,
                                   ^

TypeError: Cannot read property 'last' of null
    at /home/ubuntu/explorer/lib/database.js:589:36
    at Query.callback (/home/ubuntu/explorer/node_modules/mongoose/lib/query.js:2008:7)
    at /home/ubuntu/explorer/node_modules/kareem/index.js:177:19
    at /home/ubuntu/explorer/node_modules/kareem/index.js:109:16
    at nextTickCallbackWith0Args (node.js:419:9)
    at process._tickCallback (node.js:348:13)

Is the C-CEX API fragile/wonky? Or is there a bug in Iquidus?

This isnt a big deal since users can just go to the actual exchange website to see buy and sell orders, but I think this is a cool feature. Also, the Market Price still updates correctly so thats good and a very useful feature.

thesnat21 commented 5 years ago

I think this can be closed since the exchange is gone.

uaktags commented 5 years ago

Good point. It's a shame exchanges can't seem to stand the test of time.