BitMEX / api-connectors

Libraries for connecting to the BitMEX API.
https://www.bitmex.com/app/restAPI
910 stars 795 forks source link

DeltaServer Error on request position #310

Open Elglobo opened 5 years ago

Elglobo commented 5 years ago

Hello Bitmex Team !

I have an issue with DeltaServer. Everything work perfect since multiple days. I have a delta Server (last update) and I subscribe to position for ETHUSD and XBTUSD.

Suddenly since yesterday 16h UTC+0 until now I can't get position subscription and I get this error:

TypeError: Cannot read property 'XBTUSD' of undefined
    at BitMEXClient.getData (/var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/nodejs/index.js:84:32)
    at /var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/delta-server/lib/server.js:76:21
    at Layer.handle [as handle_request] (/var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/delta-server/node_modules/express/lib/router/layer.js:95:5)
    at next (/var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/delta-server/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/delta-server/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/delta-server/node_modules/express/lib/router/layer.js:95:5)
    at /var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/delta-server/node_modules/express/lib/router/index.js:281:22
    at param (/var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/delta-server/node_modules/express/lib/router/index.js:354:14)
    at param (/var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/delta-server/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/var/www/vhosts/myvhost.com/ai.myvhost.com/official-ws/delta-server/node_modules/express/lib/router/index.js:410:3)

I precise that everything work for quote, instrument and all public subscriptions. I contact Bitmex Support and I'm waiting a reply (ticket #187802) ​No bans appear to have been placed on my IP address according Bitmex support on ticket.

I also tried to reinstall a fresh install of DeltaServer on an another Server, to connect it to a different Bitmex account with a fresh API and same thing.

I found a similar thread on this issue without real fix or evolution: https://github.com/BitMEX/api-connectors/issues/139

Thanks for your help.

My simple config.js

// Sample configuration for BitMEX-Delta-Server.
// Copy me to config.js to use custom settings.

module.exports = {
  port: 4444,

  // If false, will connect to live exchange.
  // Testnet is https://testnet.bitmex.com
  testnet: false,

  // Symbols to watch. Add any/all symbols you are going to poll here.
  symbols: ['XBTUSD', 'ETHUSD'],

  // Available streams:
  // Public:
  // ["instrument","orderBookL2","quote","trade"]
  // Private:
  // ["execution","margin","order","position"]
  streams: ["instrument","position", "quote"],

  // If you want to use any of the above "private" streams, you must authenticate with an API Key.
  apiKeyID: 'API_ID',
  apiKeySecret: 'API_SECRET',

  // This prevents memory usage from getting out of control. Tweak to your needs.
  maxTableLen: 50000,
};
rick-sanchez-c137 commented 5 years ago

This issues goes permanent, and they don't care I guess.

ghost commented 5 years ago

+1