ListMarketBook

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EKK
    Junior Member
    • Aug 2010
    • 38

    #1

    ListMarketBook

    Hi,

    I am trying the new API - and I am struggling to get the Prices from the exchange (everything else seems to work okay - I managed to place a bet - so I have my app key and session token).

    I am using the java example code from git.
    The following code assumes you already have a marketCatalogueResult, app key and session token - and it returns a List<MarketBook> which seems to be populated fine with several runners - each runner has the lastPriceTraded, selectionId, status, total matched etc... except the Prices from the exchange - which I assume must be located in "ex" ( I can not access the documentation section for the API-NG for some reasons).

    Do you know what I am missing here?

    Thanks a lot for your help

    EKK

    String marketIdChosen = marketCatalogueResult.get(0).getMarketId();

    PriceProjection priceProjection = new PriceProjection();
    Set<PriceData> priceData = new HashSet<>();
    priceData.add(PriceData.EX_BEST_OFFERS);
    priceProjection.setPriceData(priceData);
    //In this case we don't need these objects so they are declared null
    OrderProjection orderProjection = OrderProjection.ALL;
    MatchProjection matchProjection = MatchProjection.NO_ROLLUP;
    String currencyCode = "GBP";

    List<String> marketIds = new ArrayList<>();
    marketIds.add(marketIdChosen);

    List<MarketBook> marketBookReturn = jsonOperations.listMarketBook(marketIds, priceProjection,
    orderProjection, matchProjection, currencyCode, applicationKey, sessionToken);
  • EKK
    Junior Member
    • Aug 2010
    • 38

    #2
    Also - I am able to see the prices via https://api-ng.betstores.com/betting/ - so my setup is correct -

    so it must be the code i am using - most likely the params are wrong.

    Any help appreciated.

    Comment

    Working...
    X