Pages:
Author

Topic: Margin Trading Exchange Software (Read 4200 times)

newbie
Activity: 41
Merit: 0
June 27, 2014, 06:17:18 PM
#36
Websocket API is now available.

Create a websocket variable in javascript and send messages in this format:

EKEY||||

IN this example, API_KEY = 1.


1). Request Orderbook:

Send this message to websocket server: EKEY|1|RFQ|XBT.USD|


And the response will be:


Acknowledged
{"XBT.USD":[{"sellOrder":[]},{"buyOrder":[]}]}



2). Request Account Snapshot:

Send this message to websocket server: EKEY|1|BALANCE|

And the response will be:


Acknowledged
{"account_snapshot":[{"gross_balance":"500"},{"profit_loss":"0"},{"total_fees":"0"},{"net_balance":"500"},{"used_margin":"0"},{"free_margin":"500"}]}



ORDER ENTRY MESSAGE FORMAT: EKEY|||||

3). Limit Buy Order Request:


Send this message to websocket server: EKEY|1|LIMITBUY|2.55|1|XBT.USD|

And the response will be:


Acknowledged
{"XBT.USD":[{"sellOrder":[]},{"buyOrder":[{"p":"2.55","q":"1"}]}]}
{"account_snapshot":[{"gross_balance":"500"},{"profit_loss":"0"},{"total_fees":"0"},{"net_balance":"500"},{"used_margin":"25"},
{"free_margin":"475"}]}





4). Limit Sell Order Request:

Send this message to websocket server  EKEY|1|LIMITSELL|2.65|1|XBT.USD|
The response will be:



Acknowledged
{"XBT.USD":[{"sellOrder":[{"p":"2.65","q":"1"}]},{"buyOrder":[{"p":"2.55","q":"1"}]}]}
{"account_snapshot":[{"gross_balance":"500"},{"profit_loss":"0"},{"total_fees":"0"},{"net_balance":"500"},{"used_margin":"0"},{"free_margin":"500"}]}




5). Stop Buy & Stop Sell Request: Similar to above, but replace with
The response will only include the account_snapshot response.


Now, in this example, lets say another trader put an offer below the current best. 2 contracts @ 2.64 (through the platform). The websocket will push this message to you when a limit orderbook has been modified.

{"XBT.USD":[{"sellOrder":[{"p":"2.64","q":"2"},{"p":"2.65","q":"1"}]},{"buyOrder":[{"p":"2.55","q":"1"}]}]}


6). Market Buy & Market Sell Request: Again, similar to above, replace with -- You must still include a price, quantity and symbol parameter. If the best market offer is 2.65 and you instead send "EKEY||MARKETBUY|7|1|XBT.USD| -- you will still be executed at 2.65. (ie. the price parameter is ignored, but MUST still be included).

So using the API key, you send an order to buy 1 lot at market.

EKEY|1|MARKETBUY|2.90|1|XBT.USD|

The response will be:

Acknowledged
{"last_trade":[{"execTime":"1403910347545"},{"productSymbol":"XBT.USD"},{"execSide":"true"},{"execPrice":"2.64"},{"execQty":"1"}]}
{"XBT.USD":[{"sellOrder":[{"p":"2.64","q":"1"},{"p":"2.65","q":"1"}]},{"buyOrder":[{"p":"2.55","q":"1"}]}]}


The socket does not push your position information to you. You must populate your position by requesting all executed transactions on your account by doing the following:

7). Viewing transaction history:
Send this message to websocket server  EKEY|1|FILLED|
The response will be:


Acknowledged
{"tx_filled":[{"4c1593f619fa259ceb517ccdcce1fd96":[{"entry_time":"1403910347545","productSymbol":"XBT.USD","exec_side":"true","exec_price":"2.64","exec_qty":"1","exec_margin":"25","exec_fee":"1"}]},{"4c1593f619fa259ceb517ccdcce1fd96":[{"entry_time":"1403917072567","productSymbol":"XBT.USD","exec_side":"true","exec_price":"2.64","exec_qty":"1","exec_margin":"25","exec_fee":"1"}]}]}



8 ). Viewing Pending Orders

Send this message to websocket server  EKEY|1|PENDING|
The response will be:



Acknowledged
{"tx_pending":[{"cc84f039526ac12fab12cc7d6c4577d7":[{"entry_time":"1403918865034","productSymbol":"XBT.USD","tx_side":"true","tx_price":"2.55","tx_qty":"1","tx_margin":"25","tx_fee":"1"}]},{"678d648f1b8b8c9b1fc28a6fc276ec1":[{"entry_time":"1403918867612","productSymbol":"XBT.USD","tx_side":"false","tx_price":"2.65","tx_qty":"1","tx_margin":"25","tx_fee":"1"}]}]}



9. Cancelling Orders

To cancel a single order you must pass the tx_id of the pending order

EKEY|1|CANCEL_ID|f566025b38ac54b6dfa13d46f20d22c8|

The response will be:

Acknowledged
{"XBT.USD":[{"sellOrder":[{"p":"2.64","q":"1"}]},{"buyOrder":[{"p":"2.55","q":"1"}]}]}
{"account_snapshot":[{"gross_balance":"500"},{"profit_loss":"0"},{"total_fees":"1"},{"net_balance":"499"},{"used_margin":"25"},{"free_margin":"474"}]}


To cancel all orders, just pass this message:

EKEY|1|CANCEL_ALL|

The response will be:
Acknowledged
{"XBT.USD":[{"sellOrder":[{"p":"2.64","q":"1"}]},{"buyOrder":[]}]}
{"XBT.CAD":[{"sellOrder":[]},{"buyOrder":[]}]}
{"XBT.EUR":[{"sellOrder":[]},{"buyOrder":[]}]}
{"XBT.GBP":[{"sellOrder":[]},{"buyOrder":[]}]}
{"XBT.AUD":[{"sellOrder":[]},{"buyOrder":[]}]}
{"XBT.CHF":[{"sellOrder":[]},{"buyOrder":[]}]}
{"XBT.NZD":[{"sellOrder":[]},{"buyOrder":[]}]}
{"XBT.JPY":[{"sellOrder":[]},{"buyOrder":[]}]}
{"BTC.USD":[{"sellOrder":[]},{"buyOrder":[]}]}
{"account_snapshot":[{"gross_balance":"500"},{"profit_loss":"0"},{"total_fees":"1"},{"net_balance":"499"},{"used_margin":"25"},{"free_margin":"474"}]}


Keeping it very simple, all messages encrypted with SSL 128 bit encryption using TLS 1.2.

Let me know if you have questions!
newbie
Activity: 41
Merit: 0
June 26, 2014, 03:15:51 AM
#35
is this only for windows?


Java is platform independent; this means you don't need windows to operate Smiley. Any machine where you can install Java/JVM will work!

Let me know if you have any more questions
hero member
Activity: 882
Merit: 501
Ching-Chang;Ding-Dong
June 22, 2014, 02:04:19 PM
#34
is this only for windows?
full member
Activity: 238
Merit: 100
Stand on the shoulders of giants
June 10, 2014, 04:21:18 PM
#32
Gosh, I made acompliment to supporting the developer I have my post deleted .. if you check there is another post witch did the same .. I think it's getting personal ... I don't even not interested anymore .. I could be a client or new user, customer ... People should learn how to run a business..

PS-going to buy a voodoo doll just in case ...

Now this is off topic
newbie
Activity: 41
Merit: 0
June 10, 2014, 01:55:28 PM
#31
interesting

thank you; is there anything I can do to make it more interesting ? Smiley


Features of the Platform:

1). Web of Trust '2FA' - Link web of trust ID# to your exchange account, all trading and account functions are rejected unless you are currently verified with 'gribble' on web of trust.  Web of trust ID and exchange account ID do not need to be the same.

2). Every command (from buy, sell, view position, view pending orders) initiated through the platform triggers a handshake protocol with the server which is unique to that session. At every moment the server 'knows' what commands the client is able to send to the server; and thus attempts to circumvent the system is immediately detected and user punished swiftly.

3). Automated trading - if you don't want to use the platform and want to make your own, you can request API trading to be enabled for your account an API key will be issued which you can link via COINIGY and use their main trading API (which handles order execution for several crypto exchanges) to submit or cancel trades. You cant request withdraws using the key... only trade related functions and execution reports are allowed.

4). Very 'brand-able'; can plug in just about any crypto currency and enable margin trading. ( I plan to do the top 5 cryptos )


If anyone is interested in leasing the exchange for a particular *coin , let me know and we can work something out. I will also consider selling exclusive rights to software for the right price.
newbie
Activity: 41
Merit: 0
June 09, 2014, 08:41:02 PM
#30
Latest updates and screenshots on this project... i am planning on taking this live soon as i've gotten good feedback from the users who have demoed.

Below is the main dock window which fits in everything you would need to trade on one screen. Tabs on buttom (transfers, position, history, etc) cycle through the views ('position view' is selected in the screen shot). You can also 'popup' the transfer, position, history and pending views on their own separate windows, same with orderbooks. The data panel also shows the 24 hr average prices for BTC against 8 different currencies. These prices would used as settlement prices when contracts expire.

http://s27.postimg.org/9mvfjmm9v/main1.png


The un-docked orderbook has a time & sales window.

http://s28.postimg.org/g4s485y65/main2.png




comments / feedback appreicted
newbie
Activity: 41
Merit: 0
May 10, 2014, 05:57:29 PM
#29
slight update;

1). I intend to run a simulated version as well as a production version. both will be available soon. I am getting everything in order, (compliance, ddos-mitigation, etc).

2). Because the focus of this project was fast & reliable order matching. I've created a bare-bone java desktop application client to connect to the server for execution purposes only. and again there are no fancy bells and whistles, just basic account information and order execution. Charting and web execution (for the java paranoid) will be provided by coinigy; working with them currently to support the exchange feed. I believe they are launching the beta soon and are a exchange-neutral platform.

3). Because I am located in the USA, production version will require customer compliance with verification/KYC policies before account can be opened. In a nutshell: the information that will be required from a patron is basically the same information required to open a library card.
newbie
Activity: 41
Merit: 0
April 28, 2014, 04:01:57 AM
#28
Count me in hexs.

Will beta be with real funds we bring in or simulated funds?


simulated. no real funds at risk
full member
Activity: 198
Merit: 102
April 27, 2014, 07:16:56 AM
#27
Count me in hexs.

Will beta be with real funds we bring in or simulated funds?
newbie
Activity: 41
Merit: 0
April 12, 2014, 02:37:46 PM
#26
need 10 more testers. 40/50 filled and don't mind over filling

Finalized front-end GUI and now porting it back to the core exchange engine. notification for those who opt'ed in for beta will go out shortly. beta will run for 2 - 6 weeks to collect user-feed back which will be used to finalize the production version.

newbie
Activity: 41
Merit: 0
March 16, 2014, 10:09:45 PM
#25
bump

still looking for more testers, expecting beta to be running by next saturday. total 19 signed up so far, looking to have atleast 50. PM me for details! thx
newbie
Activity: 41
Merit: 0
March 09, 2014, 08:20:59 PM
#24
Are you still looking for testers? Do you have the updated screenshots?


Added you to the list. Screenshots coming soon...
hero member
Activity: 882
Merit: 501
Ching-Chang;Ding-Dong
March 09, 2014, 04:38:55 PM
#23
I'm down to help beta test, i think this could be useul.
newbie
Activity: 1
Merit: 0
March 09, 2014, 02:47:17 PM
#22
Are you still looking for testers? Do you have the updated screenshots?
newbie
Activity: 41
Merit: 0
March 06, 2014, 12:59:13 AM
#21
I have total of 11 people interested so far. I would like to reach minimum 50 testers, if possible, so let me know if you are interested. The new version will not be a tool bar anymore, and will be 1 window full screen application.

Functionality added/pending: (from feedback testing with friends and family):

1). Client Application is now a full-screen window with the option to show information in separate windows.
2). Master and sub accounts. \ seperate accounts by strategy, etc.
3). Market states (halted, trading, settled/expired)
4). YubiKEY integration (pending)
5). WoT gribble verification (optional setting)
6). Automated Trading System facility
7). Community generated news/research portal
Cool. Working on charting option with studies, may integrate chartiq (looking at options)


Screens coming soon  Smiley
newbie
Activity: 41
Merit: 0
March 03, 2014, 07:09:06 PM
#20
Since I am always struggled to understand what people label as "real time"...; and I really haven't seen the code yet, I apologize any inconvenience of my question... but Is it possible to add a timestamp in order to calculate the time I hit buy/sell on client and the time that server accept it ? also measure network Latency (lag - Round-trip latency) ?

I've done this and it's about 216 milliseconds.


Server side response has been significantly improved from 216 millisecond on average to roughly ~4 millisecond response. (be aware that both of these tests were run from a client on the local network (on one PC) testing the server (which is also on the local network, but separate PC).

Also, I am in the process of acquiring a dual-core XEON with 72Gb memory as 1-node of the exchange back-end with offline storage of private information.
sr. member
Activity: 300
Merit: 253
Ok Check!
March 02, 2014, 11:54:46 PM
#19
Hello again, I've made a lot of progress the last few days with further GUI tweaks to the client terminal and speeding up the server-side order handling. I believe the software is semi-production ready (exception: I need to still add charting functionality and create a automated trading facility-- other than that, the core functions are 100% operational). And thus, I am looking for beta testers (preferably traders) who are interested in testing and providing feedback for additional functionality. You may PM me or give a nod on the thread and I will get back to you with the details on how to get started Smiley



I can help you with beta testing. Real life trader.
newbie
Activity: 41
Merit: 0
February 27, 2014, 01:13:31 AM
#18
Hello again, I've made a lot of progress the last few days with further GUI tweaks to the client terminal and speeding up the server-side order handling. I believe the software is semi-production ready (exception: I need to still add charting functionality and create a automated trading facility-- other than that, the core functions are 100% operational). And thus, I am looking for beta testers (preferably traders) who are interested in testing and providing feedback for additional functionality. You may PM me or give a nod on the thread and I will get back to you with the details on how to get started Smiley

newbie
Activity: 41
Merit: 0
February 23, 2014, 12:33:13 AM
#17
Since I am always struggled to understand what people label as "real time"...; and I really haven't seen the code yet, I apologize any inconvenience of my question... but Is it possible to add a timestamp in order to calculate the time I hit buy/sell on client and the time that server accept it ? also measure network Latency (lag - Round-trip latency) ?

I've done this and it's about 216 milliseconds.
Pages:
Jump to: