1

It would appear there is no way of obtaining fill notifications for active orders.

If I am mistaken, please enlighten me!

When orders are submitted to a BTC-e account, either via API or their website, and they are NOT instantly filled, they get assigned an OrderID integer. I can query the authenticated API for account info, which will give me back a list of all Active Orders and associated OIDs, but aside from having my program maintain a list of what it "thinks" are Active, versus what actually is active on the account by sending a query every X seconds, I do not know of a simpler/faster way to determine what orders got filled or when.

I also would like some clarification on the status field of the order response from API. it would appear 0 is active and 1 is filled. What are the values for partial fill and cancelled?

There is also a way to see All orders on the website by going to Finances->Orders History and then the drop down for Show All, is there a corresponding API call for that?

I need to be able to monitor for partial and complete fills.

1 Answer 1

1

It appears you are looking at "active orders" if you are seeing this status. As per BTC-e API documentation (found at: https://btc-e.com/api/documentation), you should be looking at trade history, which will show completed orders. Partial orders would show as individual trades on as the result e.g. if you place a sell/ask order 1 BTC @ $1000 and I were to place a buy/bid order of 0.1 BTC @ $1000 then you would see a trade of 0.1 BTC @ $1000 in your trade history, if I were to place the same order again against your 0.9 BTC remaining you would see two trades for 0.1 BTC @ $1000. This data is shown here for partial trades even if the order is still active.

Since the standard output is limited to the 1000 most recent transactions, I would recommend making use of the 'from' parameter when scraping trade data. You can increase the number of results but BTC-e will likely place a limit on how much data can be returned at some point in the future. You can also stagger API calls to get 1000 transactions at a time, however I would recommend putting this data in a table for better access.

1
  • Thanks for the quick response, Mark. So, in your example above, if my sell order got filled for only 0.1 and I immediately queried ActiveOrders afterwards, it would show me the same OID for the full 1BTC order, but the amount would now return back as 0.9? And to find that 0.1 fill, I need to constantly scrape the TradeHistory endpoint and compare for all trades with the same rates? Is the OID for the partial fills all the same? Or is that a completely new OID? Lastly, I need to use TradeHistory or TransHistory?
    – ACVentures
    Commented Jan 31, 2014 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.