Skip to content

Help pulling market prices #60

@samgledhill

Description

@samgledhill

Hi team - apologies in advance for logging an issue if this is not the right place to put it - but I wasn't sure how else to ask for help.

I'm attempting to build a betting bot and I'm keen to try and find market value amongst bookies, using the betfair lay markets as a guide close to jump time.

Abettor is magical in granting rapid, reliable access to the Betfair API - thanks so much for building it! My troubles start in the data-wrangling after executing a "listMarketBook" call. Essentially, I'm really struggling using any of the base or tidyverse methods to be able to pull the "availableToLay" list up to a level that also includes the marketId and SelectionId variables. ie - what I'd like to end up with is a long list of selectionId's (runner name would be even better, but let's start with what we've got first!) and prices - but I have to traverse through the "ex" list and that seems to be breaking every single time.

I've tried unnest(), unnest_longer() and unnest_wider(), hoist(), pluck() and flatten() but nothing seems to run without error!

Any tips or pointers that might help push me in the right direction?

I've tried all sorts of documentation for the tidyverse and this doesn't seem to be something that anyone on StackOverrflow has face either!

Again - apologies if this isn't the right forum - but I'm running out of ideas to get help!

Cheers,

Sam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions