Login Page - Create Account

Support Board


Date/Time: Sat, 27 Apr 2024 05:31:37 +0000



BitMex connectivity issues and questions

View Count: 2051

[2018-01-24 05:26:23]
onnb - Posts: 660
I have SC running connected to BitMex from a VPS (live trading using bitmextrade)


Summary
I noticed that sometimes SC loses connection and has a hard time recovering
It looks like the server is closing the connection
I have the message log with the disconnections. This happened more than once.
I have had similar connectivity issues from two separate computers.

1. My first question is does the bitmex server SC is connected to close the socket every once in a while? (from the log that would be bitmextrade.sierrachart.com?)
I see this message "DTC Client socket (6) | Socket gracefully closed by remote side. | 2018-01-23 04:40:33"
and its not clear why

2. After 1-2 reconnect attempts, I see this in the log: "BitMEX | Connection error: Username or Password is incorrect. | 2018-01-23 04:41:11"
That can't be right. Later I connect manually with the same user/pw and it connects ok

3. After 2-3 retries, SC stops attempting to connect again - is that expected?

4. In general, have you heard of issues keeping this connection running for days/weeks at a time?

5. Would it make sense to disconnect and reconnect once every X hours? Can that be done from ACSIL?
[2018-01-24 05:54:13]
Sierra Chart Engineering - Posts: 104368
1. When there is a software update or a software restart which was done yesterday and once prior because of a memory related issue which has been resolved. Further steps are being taken related to that to prevent this. And longer-term, more work will be done to provide redundancy.

2. Yes this does make sense because it takes time, about 5-15 seconds or so to discover the available trading accounts from BitMEX and allow the connections again.

3. No. We are looking into this.

4. Yes we know exactly why these occur as described above.

5. No need to do this. That accomplishes nothing.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-01-24 07:45:16
[2018-01-24 06:10:55]
onnb - Posts: 660
1. Are these restarts scheduled (known in advance)?
3. What is the expected behavior? How many times will SC try to reconnect before giving up?
Date Time Of Last Edit: 2018-01-24 06:13:24
[2018-01-24 07:42:51]
Sierra Chart Engineering - Posts: 104368
1. They are not normal, and not expected. It is done only for emergency reasons. The trading activity on BitMEX is extremely high and unusual and was causing a serious memory problem. We have never seen anything like this before. Also, because of 24-hour trading we simply have no chance to ever do this during downtime like we have in traditional markets.


3. We just reread what you wrote. Now we understand the nature of this. Since it is an invalid username and password error, that is the reason probably why there is not a retry. We will implement a solution for this now.

Now we understand the basis of of all of these questions. We are implementing solutions now.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-01-24 11:01:12
[2018-01-25 03:47:20]
onnb - Posts: 660
That is great - does this require us to update SC or is the work you are doing on the server only?
[2018-01-25 04:06:40]
Sierra Chart Engineering - Posts: 104368
There is nothing to do on the client-side.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-01-29 02:53:31]
onnb - Posts: 660
We also got this today - is this something you are aware of?

BitMEX order update (Order reject). Info: BitMEX Trading Master - DTC order update (Order reject). Info: (monitor.ml.Error (Failure "POST /api/v1/order/bulk: Service_unavailable")
("Raised at file \"pervasives.ml\", line 32, characters 17-33"
"Called from file \"src/deferred0.ml\", line 61, characters 64-69"
"Called from file \"src/job_queue.ml\", line 159, characters 6-47"
"Caught by monitor try_with_or_error")). Internal Order ID: 1892. Service Order ID: 1545154. Symbol: XBTUSD-BMEX | 2018-01-26 09:53:18 *
Order cancellation failed | BitMEX order update (Order cancel reject). Info: Order cancellation failed | Still awaiting acknowledgment of new order. Unable to cancel order.
[2018-01-29 05:56:43]
Sierra Chart Engineering - Posts: 104368
The first one is an error on the BitMEX side. You do need to contact them about that.

Order cancellation failed | BitMEX order update (Order cancel reject). Info: Order cancellation failed | Still awaiting acknowledgment of new order. Unable to cancel order.
This indicates the BitMEX server was nonresponsive for the new order. We cannot cancel an order that we do not even know the order ID of.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-01-29 05:57:04
[2018-01-29 17:27:44]
onnb - Posts: 660
Understood, I will check with BitMex on the error that they sent.

What is strange is that BitMex does return a service id for this order (I can see it in the trade activity log)
[2018-01-29 18:32:27]
Sierra Chart Engineering - Posts: 104368
That is not the Service ID that is needed. You are seeing the one from our server.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-01-29 19:14:24]
onnb - Posts: 660
Got it
[2018-01-31 18:11:02]
onnb - Posts: 660
fyi, been in contact with BitMex people regarding the errors

This is the latest response
"We have deployed an update to this system that should clear out some of the intermittent socket errors. However, the "Service Unavailable" messages correlate with system overload (you may have seen this on the frontend). This is due to very high load on the trading engine and we are working hard to increase capacity."
When SC gets a "service unavailable", does the BitMex server do any retries? Or is that something that the study should do?
Date Time Of Last Edit: 2018-01-31 18:11:22
[2018-01-31 18:27:10]
Sierra Chart Engineering - Posts: 104368
Oh no, there is never going to be an attempt to retry an order. That is out of the question.

The study would have to do this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-02-05 17:25:43]
onnb - Posts: 660
SierraChart is currently showing a position but the account is flat.
What is the best way to force SC to sync up with the account and be flat?
Date Time Of Last Edit: 2018-02-05 17:25:53
[2018-02-05 17:52:55]
Sierra Chart Engineering - Posts: 104368
There is no way from your side. Ultimately this problem should be resolved within about three weeks when we have our own direct connection to BitMEX rather than through this other software layer that is being used by BitMEX.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account