Is there a way to get the amount of a partial fill for an open order? The 'filled' attribute is merely a boolean rather than the amount filled thus far.
I have not used it, but you might try order.net ??
this also adds a new layer of issue if you use market orders (which do not get entirely filled).
you want to market sell 5 BTC, but only 4 get filled.
the strategy will then (since "filled" is boolean and in this case "False") place another market sell order for 5 BTC.
This can easily repeat several times.
As market orders (if at all) are used in situations of high volatility, you should not use them unless you want to go "all in" or "all out" anyway, as this is not unlikely to happen.
So do take care with market orders.
Yea, this is but one of several severe limitations of this platform [and the reports of which to the author/maintainer went unanswered] which has motivated me to implement the platform locally (in ClojureScript actually). I'm now no longer using this platform and it is awesome having full control locally.
imho it really depends on what you want to do.
I really appreciate the fact, that you get your strategies hosted and you can very easy write your first bots and backtest them.
Also so far the tradewave team has been unusually responsive and people in the community (yes that is especially you @litepresence) are being extremely helpful and also share their insights and solutions and lend a helping hand to unnumbered newbies.
in the long run though you will probably want something "more" in one way or another as python is probably not the best choice for writing trade strategies (very slow in backtesting) and reliability concerning the connections to okcoin has room for improvement (we did talk about adding huobi once upon a time, didn´t we?) or you simply want your own vps or homebase server.
All in all, I owe tradewave for introducing me to the world of trading algorhythms and I hope and believe they can and will do that for many others after me too.
concerning your original problem:
you could just query your portfolio.btc again after your order has been executed and deduct the "fill status" from that.
Like I said, they actually have not been very responsive at all regarding at least 2 blocking limitations of their platform for me. And the sad part is, both of them are easy fixes on their side. It's clear that some of the limitations are just sloppy coding on their end (e.g., limit orders not working during backtesting). And, I am much happier now not being at the mercy of someone else and being in full control.
How about we add a enum that will describe the order status and also keep the existing
filled as is. I am thinking a
status field with possibilities of
One other thing we found is that some of exchanges don't offer order info consistently and also have IP based rate limit.
We update orders on every ticks so I presume we can update the status at that time.