Login Page - Create Account

DTC Protocol Discussion Forum


Date/Time: Wed, 22 Jan 2020 21:42:06 +0000


[Announcement] BitMEX testnet and mainnet trading

[2015-10-08 19:31:30]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Hi all,

We have completed support for BitMEX DTC data and trading (both testnet and production mainnet).

To use the service, register at http://www.bitsouk.com, then register your BitMEX API key(s).

Please report any issue with the service on this thread.

OKCoin support is almost done and could be released shortly if there is a strong demand for it. BitMEX was much easier to bind due to the superior design of their API.

Edit: The Sierra Chart team kindly agreed to provide Sierra Chart for free to use those services!

- Reddit post: https://redd.it/3obvw7
- Bitcointalk thread: https://bitcointalk.org/index.php?topic=1205877.0
Date Time Of Last Edit: 2015-10-11 19:44:17
[2015-10-11 03:52:48]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Feel free to make a posting on the Sierra Chart Support Board about this.

Also it is important to let everyone know, that Sierra Chart can be used for free with your service.
Date Time Of Last Edit: 2015-10-11 03:58:23
[2015-10-11 07:23:56]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Right! Thanks. Will do.
[2015-10-19 05:43:45]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
We would like to maintain historical price data for BitMEX DTC.

Do we need a BitMEX API key for this?

Once this is set up, we will point Sierra Chart to use our own historical data server for BitMEX.
Date Time Of Last Edit: 2015-10-19 05:44:33
[2015-10-19 06:44:50]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
No you don't need one.
[2015-10-19 13:26:24]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Hey. Since you're at it, is there a way so that all bitcoin symbol data you handle could be provided for Bitsouk ?

So I could focus on implementing trading support for additional exchanges. It would be great.
[2015-10-19 13:41:38]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
https://redd.it/3ovs0t

BFX just added websocket. I'm keen on adding it to Bitsouk. Would be great that you handle the data feed so that I can focus on trading! :)
[2015-10-19 13:52:29]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
The thing you have to know is that settlements at BitMEX happen at 12 UTC.
[2015-10-19 18:01:10]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Hey. Since you're at it, is there a way so that all bitcoin symbol data you handle could be provided for Bitsouk ?
Not right now if we are required to program to the different data feeds rather than using DTC.
[2015-10-20 09:00:39]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
But for "Bitcoin Services" you use DTC internally anyway, right?
[2015-10-20 09:03:24]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Yes we do. So certainly we can interface to a Bitcoin data feed that uses DTC.
[2015-10-20 09:05:30]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
I was talking about data you already have, i.e. bitfinex data. Basically I'd like to provide trading support for services you _already_ have in Bitcoin services. The data would be the one you serve in bitcoin services, and I would handle the trading part. Can we do this?
Date Time Of Last Edit: 2015-10-20 09:05:45
[2015-10-20 09:07:27]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Yes of course. This is no problem.

This is one nice thing about DTC, it is so flexible with what we can do with it.
[2015-10-20 09:22:34]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Great. So how could we proceed with this?

If you really plan to integrate BitMEX data into Bitcoin Services, then we could just use Bitcoin Services for the BitSouk data feed and I handle the trading part.
[2015-10-20 09:27:33]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Just simply let us know when you are done with the trading part and we will set it all up on our side.

We can first start with BitMEX.
[2015-10-20 09:35:28]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Ok, so here is what I suggest: You integrate BitMEX in Bitcoin Services and as soon as it is done, you switch the data feed of Bitsouk to use Bitcoin Data services.

For my side I start adding the bitfinex trading funtionality.

Is there a way for me to have the address of the bitcoin data services to develop?
Date Time Of Last Edit: 2015-10-20 12:19:41
[2015-10-20 23:34:54]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Use the DTC Protocol server:
https://www.sierrachart.com/index.php?page=doc/doc_DTCServer.php

You also need to keep in mind you will need to do some symbol mapping for the Bitcoin symbols because the Sierra Chart Bitcoin symbols have the exchange name added at the end of the Symbol.
[2016-01-01 17:01:42]
Rico - Posts: 2 | Ending Date: 2016-11-11 [Expired]
Hi,

I just registered for the private beta invitation in the hope of using this to get the Kraken feed into my Sierra Chart. I read a post here on the Sierra forum, or somewhere on the web that this is in the works. Well, please consider this as an upvote for supporting that exchange as I didn't see that option available in the Exchange section of the bitsouk.com site.

Rico Jansen
Date Time Of Last Edit: 2016-01-01 17:01:57
[2016-01-01 17:17:00]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Hi Rico,

If it's just the datafeed that you want it might be not too hard to get it working. Trading is more tricky since Kraken don't support websocket.

I'll see with SC if we can provide Kraken data.

Happy new year!
Best,
Vincent
[2016-01-03 20:48:14]
Rico - Posts: 2 | Ending Date: 2016-11-11 [Expired]
At the moment I do not want to trade with Sierra yet. I'm only interested with charting it for the sake of researching. The Kraken website is perfect for my trading needs.

Thanks for considering.
[2016-03-19 01:07:58]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
I'm resuming the work on Bitsouk. Only BitMEX will be supported (others are trickier to implement and I prefer achieving perfect success on one that partial support of several), new BitMEX order types will be added.
[2016-03-19 01:25:21]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Sounds good. Just let us know when we can start market data collection so that Sierra Chart can serve the real-time data and maintain historical data.
Date Time Of Last Edit: 2016-03-19 01:25:36
[2016-03-19 01:31:54]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Good. I'm working on this now and I'll make you know when it's done.
[2016-03-19 03:43:20]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
DTC: Do you think we need the indices or just the traded instruments? So far I also downloaded data for the indices (i.e. BitMEX do settlements against the TradeBlock XBX index which indexes major Bitcoin exchanges).

I think I should keep them and provide data through SC. Your thoughts?
[2016-03-19 03:48:57]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Yes. Both.
[2016-03-23 03:40:49]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Ok, you can go ahead for storing data from BitMEX data from my connector, please use "Bitsouk" (real data) and tell me if you have any problem with it. The symbols prefixed by . are indices, others are tradable symbols.
[2016-03-23 03:47:54]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
OK we will set this up.
[2016-03-23 17:55:28]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
When we tried to connect we got an "internal error" returned from the server in the logon response.
[2016-03-24 04:04:33]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Fixed, I've revamped my auth process, if you just need data (the case here), please use an empty username.
BTW, SC freezes some seconds during the auth process, I'm wondering what happens there, I don't think it's my code since in empty username mode I reply immediately, if you have any idea…
Date Time Of Last Edit: 2016-03-24 04:12:47
[2016-03-26 06:19:57]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
We suspect the freezing is related to the insertion of Symbol Settings when the server is sending back security definitions for the symbols.

Make sure you are on the current version of Sierra Chart and clear out existing settings through Global Settings >> Symbol Settings >> Full Reset. This will make it much faster.

We still cannot connect using an empty username:
Bitsouk | Connecting to the server 37.187.116.20. Port 5569 | 2016-03-26 01:02:52
Socket (6) | Receive buffer size: 524288 | 2016-03-26 01:02:52
Socket (6) | Send buffer size: 32768 | 2016-03-26 01:02:52
Socket (6) | Connected. | 2016-03-26 01:02:52
Socket (6) | Starting TLS 1.2 connection. | 2016-03-26 01:02:52
Socket (6) | SSL connection established. | 2016-03-26 01:02:53
Socket (6) | Receive buffer size: 1048576 | 2016-03-26 01:02:53
Socket (6) | Send buffer size: 65536 | 2016-03-26 01:02:53
Bitsouk | Connected to server. | 2016-03-26 01:02:53
Bitsouk | Sending logon request message. | 2016-03-26 01:02:53
Bitsouk | Received logon response. | 2016-03-26 01:02:54
Bitsouk | Server Name: Bitsouk. | 2016-03-26 01:02:54
Bitsouk | Server protocol version: 7. Client protocol version: 7 | 2016-03-26 01:02:54
Bitsouk | Connection error: Internal error. | 2016-03-26 01:02:54

[2016-03-27 17:28:02]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Done what you suggested, indeed it works much faster.
As for the unable to connect issue, I'm unable to reproduce. For me I have no problem logging in without login. Are you 100% sure that you did not send an username, like maybe an empty string or something?

Let me look at the logs.
[2016-03-27 17:32:05]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Ok, finally seen your connection traces.
When you do connect, I have this:

{ Dtc_intf.Logon.Request.protocol_version = 7l;
username = "\000\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254";
password = <opaque>;
general_text_data = "\000\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\25
4\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254";
integer_1 = 0l; integer_2 = 0l; heartbeat_interval = 20l;
trade_mode = `Live;
trade_account = "\000\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254";
hardware_id = "\000\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\
254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254";
client_name = "Sierra Chart\000\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254\254" }

When I connect with my SC, I have this:

{ Dtc_intf.Logon.Request.protocol_version = 7l; username = "";
password = <opaque>; general_text_data = ""; integer_1 = 0l;
integer_2 = 0l; heartbeat_interval = 20l; trade_mode = `Live;
trade_account = ""; hardware_id = ""; client_name = "Sierra Chart" }

Any explanation?
[2016-03-27 17:37:31]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Ok, so this is a "bug" in the way I extract strings from the datastructure. I require that all data after the first \000 should be \000. I'm gonna lift this restriction. It is however strange that your client sends a different msg than my client (latest SC prerelease 1388).
Date Time Of Last Edit: 2016-03-27 17:38:22
[2016-03-27 18:17:52]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
I require that all data after the first \000 should be \000

This could be because we use a debug build, but we will set all of the remaining bytes to zero after the first null terminator in a DTC message string.
[2016-03-28 01:50:41]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Anyway this is definitely more "my" bug than yours. Fixing this.
[2016-03-28 01:55:17]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Letting you know we can connect now.
[2016-04-02 22:57:49]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
We connected to Bitsouk without a username and made a market data request for all symbols but no market data is been received other than a small amount of data for .FCTXBT-PLNX on March 31.
[2016-04-02 22:58:37]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
We tried reconnecting just now and we cannot connect:
Bitsouk | Connecting to the server 37.187.116.20. Port 5569 | 2016-04-02 18:57:59
Socket (6078) | Receive buffer size: 524288 | 2016-04-02 18:57:59
Socket (6078) | Send buffer size: 32768 | 2016-04-02 18:57:59
Socket (6078) | Connected. | 2016-04-02 18:58:00
Socket (6078) | Starting TLS 1.2 connection. | 2016-04-02 18:58:00
Socket (6078) | SSL connection timed out. | 2016-04-02 18:58:10
Socket (6078) | SSL connection failed. | 2016-04-02 18:58:10
Socket (6078) | SSL object has been freed. SSL state is now disconnected. | 2016-04-02 18:58:10
Socket (6078) | Shutdown and closed. | 2016-04-02 18:58:10

[2016-04-03 00:08:12]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Have an ugly issue of fd leak apparently… will keep you posted, sorry for this.
[2016-04-03 08:26:40]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
What is "fd"?
[2016-04-03 09:54:56]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
File descriptor
[2016-04-03 14:27:13]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Ok, I think I fixed it, please try again when you have time.
EDIT: My data is corrupted in some way, let me fix it first.
Date Time Of Last Edit: 2016-04-03 14:44:29
[2016-04-03 15:34:08]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Ok, try to go ahead :)
One day I hope I will manage to get this correctly!
[2016-04-05 03:54:01]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Apparently not fixed yet.

I have now an error when trying to use SSL with SC, not sure what it is:

Socket (85) | Error reading. SSL Error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number | 2016-04-05 11:50:52 *

[2016-04-05 03:57:26]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
This is from Open SSL.

So you can run an Internet search for it:
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

Sierra Chart uses TLS version 1.2. So it seems as though this relates to the particular TLS version your server is running.
[2016-04-05 04:04:00]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Yeah, I think it's my issue, let me fix…
[2016-04-05 04:20:03]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Fixed, another really stupid bug introduced when trying to fix something else :/
[2016-04-10 04:43:40]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Can you retry now?
[2016-04-10 23:42:06]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Yes we are able to connect to the Bitsouk data feed. We are recording data for all of the symbols.

We will monitor this over the next couple of days.

Which one is the most active symbol?
[2016-04-11 01:04:00]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
The most liquid contracts are:

- ETH7D (7 days ethereum futures contracts)
- XBT42H XBT7D (resp. 1 day and 7 day quanto bitcoin futures contracts)

Probably the single most active one is ETH7D.
Date Time Of Last Edit: 2016-04-11 01:04:21
[2016-04-12 21:18:53]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
Since the last connection which is still maintained to the Bitsouk server, we have not received any market data for any of the symbols.
Date Time Of Last Edit: 2016-04-12 21:19:14
[2016-04-13 01:00:00]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
I've looked at the logs, all happens as if BitMEX did not send me any trade updates. I will see them tomorrow and investigate with them!
[2016-04-13 04:33:31]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Turned on more logging, I'll see if I see big phases where there is no price updates.
[2016-07-17 21:10:34]
User679195 - Posts: 2 | Ending Date: 2016-08-01 [Expired]
can view charts but unable to start any trades keep getting error

BitMEX (Testnet) order update (Order reject). Info: Unknown exchange. Internal Order ID: 2501. Service Order ID: (none). Symbol: XBTUSD-BMEX | 2016-07-17 21:09:08 *

I have tried resetting symbols
[2016-07-17 21:48:33]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Do you have a positive balance at bitmex testnet?
[2017-02-14 02:24:00]
User549046 - Posts: 3 | Ending Date: 2017-02-14 [Expired]
Hi I have a question. If I was using bitsok.com and sierra chart and set a trade trigger on the chart (not an exchange order). Then I turn off my computer and sierra chart is off, is the order still triggered? If not have can I do this.
[2017-02-14 04:08:35]
DTC Engineering - Posts: 282 | Ending Date: 2015-09-08 [Expired]
No. Sierra Chart will have to be running in this case.

There is no other way.
[2017-05-01 12:04:08]
Napoleon Dynamite - Posts: 54 Invalid SC Account Name.
@vbmithr

Any plans to add more exchanges, especially Poloniex and Bittrex ? including historical/real-time data & trading support

Thanks for considering
[2017-05-01 13:55:55]
vbmithr - Posts: 204 | Ending Date: 2020-09-26
Poloniex data is already included in Sierra Chart (real time data only).

Actually, I'm going to close Bitsouk soon. BitMEX real time data and trading is already in prod directly from Sierra Chart.

I could possibly add Poloniex trading if there was a real demand for it (actually, it was almost working, but I have no time to finish it). No plans for Bittrex so far, they don't have a streaming API for data which makes it not so nice to work with.

Best,
[2017-05-23 20:34:58]
Napoleon Dynamite - Posts: 54 Invalid SC Account Name.
Hi vbmithr,

I have now looked at the overall trading fees from BitMEX and they are double than the ones at Poloniex. Hopefully people will realize there's a need to count on the largest exchanges to trade the blockchain : Poloniex, Bittrex, Bitstamp, Kraken, etc

All the best

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

Login

Login Page - Create Account