Pages:
Author

Topic: Margin Trading Exchange Software - page 2. (Read 4200 times)

full member
Activity: 238
Merit: 100
Stand on the shoulders of giants
February 22, 2014, 10:48:52 PM
#16
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) ?
newbie
Activity: 41
Merit: 0
February 22, 2014, 05:48:40 PM
#15
Maybe, you would be interested in developing a good desktop client for margin trading of futures contracts at ICBIT?

Yea I would be interested, let me know the details by PM.
hero member
Activity: 674
Merit: 500
February 22, 2014, 04:34:51 PM
#14
Maybe, you would be interested in developing a good desktop client for margin trading of futures contracts at ICBIT?
member
Activity: 84
Merit: 10
February 22, 2014, 03:08:19 AM
#13
looks good, keep up good work!
newbie
Activity: 41
Merit: 0
February 22, 2014, 02:41:46 AM
#12
Quick update. Been working on user GUI and tweaking for performance. Here's a updated depth of order book ticket and a short Order matching example.

http://www.youtube.com/watch?v=IFuIJUbFsD4


Appreciate any and all feedback

Thanks
newbie
Activity: 41
Merit: 0
February 10, 2014, 06:03:50 PM
#11
In my opinion it is just a waste of ressources to write a client in Java (as most people around here expect to use a browser anyways to trade on an exchange platform) and a web frontend and stanradrd conform API would work much better.

If you use standards, you can use any FIX enabled client anyways and you would have a hard time to compete with these while also coding a high throughput exchange engine that has to match orders etc.

Also please publish some performance numbers and include load tests and simulations, since this is very often a problem with "homemade" exchange engines.

Why is it a waste of resource to provide a bare-bone client for users who want to point-and-click trade? Why is a browser better than a thin desktop client which would communicate with the server faster and more securely than a web-app using web-sockets which has poor user authentication?

Your stance is a little confusing to me because most of the vulnerabilities in java come from the web plugin.. yet the preference is on the web. Websockets by definition deal with untrusted clients... So what is more important? more security or easy to access and trade via a website?  I am not trying to "compete" in designing a front-end platform. Just bare-bone account statements, trading and handling withdraws. I'll happily provide other developers API access for market data (via websockets) to design custom charting software.


Feedback appreciated.
legendary
Activity: 2618
Merit: 1007
February 10, 2014, 05:26:07 PM
#10
In my opinion it is just a waste of ressources to write a client in Java (as most people around here expect to use a browser anyways to trade on an exchange platform) and a web frontend and stanradrd conform API would work much better.

If you use standards, you can use any FIX enabled client anyways and you would have a hard time to compete with these while also coding a high throughput exchange engine that has to match orders etc.

Also please publish some performance numbers and include load tests and simulations, since this is very often a problem with "homemade" exchange engines.
newbie
Activity: 41
Merit: 0
February 10, 2014, 05:19:11 PM
#9
Thank you for pointing out FIX adapter integration. I will look into it or create a FIX translator between the API that has naturally evolved from writing the software. I understand the developer point-of-view and I will cater to that. But is there anything wrong with a end-user java thin-client for point-and-click trading?

Feedback appreciated.
legendary
Activity: 2618
Merit: 1007
February 10, 2014, 05:07:50 PM
#8
I wouldn't use your client if it were hand optimized Assembler written directly on HDD with a magnetized needle! Wink
This is not against Java (you just happen to write your client in Java), but against another API reinventing the wheel again.

Fact is, most people want to use their established trading clients they already know. Realistically people who code these clients will NOT develop a connector to your software with the n-th reinvention of a custom market API any time soon and people trading on your platform also will not have the few thousand USD lying around that it costs to have such a connector built.

There are industry standards out there for market data and trading APIs. Use them.
newbie
Activity: 41
Merit: 0
February 10, 2014, 02:47:41 PM
#7
Make sure to implement an actually used API (not your own implementation) like Bloomberg, OpenMAMDA, FIX or the likes...
It is very unlikely that people will want to use your Java client to trade, no matter how well it is designed.


I don't quite understand the anti-java attitude... the largest derivatives platform in the world has a trader-facing java application as do some FX platforms (like Oanda). It would be no different than if I write a C# trader client. It would serve the same purpose. ie. The only function of the java client here is respond to challenge commands and reply and send one-way encrypted messages to the server.

My plan was to create a websocket API and create API keys such that traders could use the streaming websocket to execute/send/cancel orders as well as view balance information, etc. Kind of like REST without the callbacks and having to deal with http timeouts.

Appreciate the feedback and would like further insight on the anti-java attitude



legendary
Activity: 965
Merit: 1000
February 10, 2014, 12:14:00 PM
#6
But it's really tricky to implement FIX and bitcoin exchanges unlike like the gox streaming API in the same app, because the structures are quite different. I was asked to add FIX to my implementations and it's a major task now.
legendary
Activity: 2618
Merit: 1007
February 10, 2014, 11:49:37 AM
#5
Make sure to implement an actually used API (not your own implementation) like Bloomberg, OpenMAMDA, FIX or the likes...
It is very unlikely that people will want to use your Java client to trade, no matter how well it is designed.
legendary
Activity: 965
Merit: 1000
February 10, 2014, 11:11:15 AM
#4
I have to admit, that I don't really speak the language of the traders, but it seems we share quite some ideas. I welcome any other java coder anyway, so good luck with your project!
newbie
Activity: 41
Merit: 0
February 09, 2014, 07:47:28 PM
#3
Hello again, some updates on the GUI.

Thin tool bar with some options.

Account

- Settings (view address to deposit BTC (static), change withdrawl address/view currently set withdrawl address)
- Account History
- Transaction History


Trading

- Pending Orders
- Order Ticket

Data
-Charting

Research
(this is a work in progress, I was thinking linking to a collective blog where people put trade ideas)


Support

- Live Support (when support agent is available, the tool bar becomes a chat window)
- FAQ (link to FAQ, knowledge base, etc).

Time for some pics!

Main toolbar:
http://s9.postimg.org/fai5x481b/image.png

Main toolbar becoming a support window:
http://s14.postimg.org/6dlbz2bsx/image.png


Account History:
http://s17.postimg.org/o50g2tf6n/image.png

Transaction History
http://s1.postimg.org/mqp6v59rj/image.png


Order Ticket:
http://s12.postimg.org/9782y5pj1/image.png

The orderticket is dynamic, you can type a new symbol, hit enter, and the order book will reflect that market.

Pending Orders: basically same GUI and column headers as transaction history, minus the position summary, plus the ability to cancel individual orders or all orders.

(the reason the menu is different from the normal mode, and support mode is because i created the support mode in a new project and forgot to change the "markets" header into "data")

I welcome any and all feedback. If there is something not there that you believe is important, let me know!
full member
Activity: 227
Merit: 100
January 31, 2014, 10:25:46 AM
#2
Sounds promising so far. 

Following.
newbie
Activity: 41
Merit: 0
January 30, 2014, 12:03:17 PM
#1
Hello everyone, I’ve been working on creating software which can handle margin-trading of bitcoin-based derivatives. At this point I am not sure if I should try to operate the exchange or try to license the software out to those interested in running it. Nonetheless, I intend to use this thread as a way to get continuous feedback on the service/software. This includes any problems/bugs that may pop up and even requests for additional features and functionality.

Basics
The software is a bare-bone exchange simulator (no fancy user –interfaces). With a thin java desktop application which acts as the customer trading application.

ServerSide:
TreasuryEngine – Controls adding new customers, assigning new deposit address’ and checking balance, withdrawl, gross balance, debit/credits, profitloss, net balance, used margin and free margin for any customer.

MarginEngine – With the assistance of the TreasuryEngine commands, checks to see when free margin balance of any user equals to zero. When it sees that the free margin balance of a customer is equal to zero. The MarginEngine will force liquidate the trader out of any open position based on the current available quotes in the markets a customer holds a position during the margin call.
Margin engine is also called when new trades are being opened to ensure that the trader has enough free margin to open a trade.

OrderEngine – Is the first ‘gate’ when a BUY or SELL command is issued. And handles adding pending orders to the limit order book.

MatchingEngine – Is the second ‘gate’ when a BUY or SELL command is issued. It checks to see if the order being processed is a market order and acts as the primary match-maker for trades. When you buy or sell, matching engine determines which passive orders you get matched with. (as with most modern electronic trading venues, matching occurs in a first-in-first-out basis with price and time priority).

SecurityEngine – Is invoked anytime you do anything as a customer on the exchange. Security engine ensures that you are connected to the exchange with the java thin client using a continuous CRAM-SHA256 handshake. Every command has a unique handshake protocol. If a customer fails any step of the handshake process; the security engine will realize a circumvention attempt and dispose of the user immediately. Customers can also choose which IPs can be connected to the exchange for their desired username to prevent further unauthorized use.

Administrator can add new instruments/symbols, set/change margin requirements and fees per trade without having to reboot/restart the server. The software is also support capable and exchange administrator can hire support staff without needing to worry about any database or customer information breach.

Client Side:
Socket based java thin client which basically responds to the challenge handshake and send encrypted commands to the server.
Current GUI: (again, barebone, would like more feedback from the bitcoin community about this)

Settings View – Basic information about the customer, including name, address, deposit address, withdrawal address. And requesting withdrawals.

Balance view – Displays total deposit, total withdrawal, gross balance, total debit/credits, total profit loss, net balance, used margin and free margin.

Transaction View – displays all matched/filled trades of the customer.

Position View – aggregates all trades and shows a net position by instrument, including total buys and sells, average buy, average sell, closed profit loss and open profit loss.

Pending View – displays all pending/working orders by customer. With the ability to delete all working orders or delete all working on specific instrument.

OrderTicket– displays the 10 best available buy prices and sell prices. With buttons to buy at market, sell at market, buy at a limit price, sell at a limit price, and cancel all working orders. There is also fields where you can type a new symbol and hit enter, and the order book will refresh to show the best bid/ask of that market. (you don’t have to open 10 order books, you can change between order books by typing desired symbol)

I will post screen grabs shortly (as I am finishing up the initial GUI) of the client side GUI and look forward to the feedback.


Cheers!
Pages:
Jump to: