I have worked through BTCChina's FIX APi (using their java example). Creating a subscription request message such as:

public static Message marketDataIncrementalRequest(String symbol) {
    quickfix.fix44.MarketDataRequest tickerRequest = new quickfix.fix44.MarketDataRequest();

    quickfix.fix44.MarketDataRequest.NoRelatedSym noRelatedSym = new quickfix.fix44.MarketDataRequest.NoRelatedSym();
    noRelatedSym.set(new Symbol(symbol));

    tickerRequest.set(new MDReqID("123"));      
    tickerRequest.set(new SubscriptionRequestType('1'));
    tickerRequest.set(new MarketDepth(0));

    addMDType(tickerRequest, '0');
    addMDType(tickerRequest, '1');
    addMDType(tickerRequest, '2');

    return tickerRequest;

The above message request is documented to provide full orderbook + trades snapshot + incremental refresh. Unfortunately it just provides top-of-book with no sizes + trades with no size. I suspect their FIX server implementation is not complete. The same standard FIX message on OKCoin, works fine, providing full book.

The alternative API via websockets provides a call to get depth of book, however, according to documentation only provides 5 levels.

Various real-time OB viewers are showing deeper-than-5 depth, so assume there is an API for this. Can anyone point me in the right direction?

  • Have you got this to work using FIX? I have the same problem. Feb 18 '15 at 18:39
  • No, unfortunately not. BTC China seems to be ignoring it. Their web socket API may provide a reasonable alternative. I have not looked at it yet. Feb 18 '15 at 22:19
  • 1
    Ended up using their REST API and polling periodically (why do bitcoin exchanges use something so inefficient, very poor design). Mar 2 '15 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.