Hacker News new | ask | show | jobs
by minimax 4371 days ago
For more lols check out the trading API. There is no TIF for orders and there isn't any obvious way to get fills as they occur. I guess you just poll the api to check for fills but they also say they'll ban your IP if you poll too often. Nice. Also no mechanism for cancel on disconnect or whatever the HTTP equivalent of that would be.

Maybe there is some money to be made there, but it's hard to imagine trading with that kind of tech.

https://www.bitstamp.net/api/

2 comments

The btc-e API is far far worse. Some of the messages are in Russian and some are in English (randomly). Even worse (and a deal breaker for me) is that the order id can change underneath you if your transaction is split to fill the order, so there is no way to tell if your order completed or not. I've talked to people on Reddit who say they've made it work, but I'd never trust a bot spending money against an API like that. It's amateur hour when it comes to these exchanges and their API designs.
That's the same (almost) issue that Mt.Gox supposedly famously had with the actual blockchain, transaction malleability. I've read that Mt.Gox actually lost tens of Bitcoins in this way and it was a red herring for the whole actual giant scam that was perpetrated, but it was still a real vulnerability that needed patching or working around.
Most of the exchange APIs are pretty dreadful to work with. Shameless plug, but I've had to a build a unified library to deal with this at Tradewave[1] and it has been challenging.

Some of the newer, more professionally managed exchanges support FIX but those are at very low volumes right now.

[1] https://tradewave.net

Cool idea!

Some questions/thoughts:

Do you provide any access to raw tick-by-tick event data or just bars?

How do you secure your users' scripts so they don't worry about you stealing their ideas or front-running them?

It might be useful to provide FX rates as a feed so users could come up with a synthetic price for non-USD pairs.

For guys who want to work passive orders, an API where they can pass a dictionary of prices/sizes they're willing to buy/sell at into a goal seeking algorithm that handles canceling/placing individual orders might be a better match and more convenient.

Thanks.

> Do you provide any access to raw tick-by-tick event data or just bars?

The minimum granularity is 1-minute candles, where the latest candle becomes available at the close of each clock minute (e.g. 02:00:01 if we're fast enough).

> How do you secure your users' scripts so they don't worry about you stealing their ideas or front-running them?

There's certainly an element of trust here. There's a clause in our license agreement stating that we'll never access user strategies unless you ask us to, or it's needed for some kind of maintenance.

We don't trade on user strategies. That's not the model here.

>It might be useful to provide FX rates as a feed so users could come up with a synthetic price for non-USD pairs.

More generally I'll be adding a way to load in arbitrary data via HTTP requests within a strategy.

> For guys who want to work passive orders, an API where they can pass a dictionary of prices/sizes they're willing to buy/sell at into a goal seeking algorithm that handles canceling/placing individual orders might be a better match and more convenient.

These kinds of features (e.g. VWAP orders) are in the pipeline. There's certainly a need for tools like that.