Hacker News new | ask | show | jobs
by Cloud9Trader 4331 days ago
Please let me know if you're continuing to have issues. All seems fine my end.

You can stick the following in your browser console to log server latency stamps on incoming market data:

require(["registry"], function (registry) { var instrument = registry.get("instruments").get("EUR/USD"); instrument.on("tick", function (data) { console.log("Server latency (ms):", data.get("serverLatency")); }); });

Of course replace "EUR/USD" for whichever instrument you want to monitor. 10-20ms is typical for comms between our instances and the brokers (we get similar results for outgoing trade execution requests, factoring in the round trip).

Our stack is largely JavaScript. We've found NodeJS to be blisteringly fast and lending itself perfectly for this kind of application (low memory, high throughput, heavy processing).

We have a backesting framework for running against historical data. Do you have a requirement for pulling historical data into an algorithm during live trading? We haven't included this in out API, though it would be fairly trivial to implement. It's key though that algos run with as little in memory data as possible. We also include a framework for writing your own custom technical indicators. These are naturally set up to pull historical data so may be what you're after. These and the built in indicators can be used in your script by just calling e.g. sma(10)

1 comments

Works after a re-login. Very nice!! Two final questions:

1. Does the API allow writing an algorithm that deals with more than one instrument?

2. Thought about including Bitcoin?

Thanks!

Currently the API doesn't support multiple instruments though an individual trading session already pulls in whatever currency pairs are required to convert from term currency to your account currency to calculate unrealized profit and to allow you to set quantity in as a risk percentage of account balance... basically not much work involved in supporting. Will get it prioritised.

Definitely would like to include Bitcoin and are looking into our options at the moment.