Missing races

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bendkjna
    Junior Member
    • Jul 2024
    • 1

    #1

    Missing races

    # Get all event types
    event_types = betfair_client.betting.list_event_types()
    # Find the horse racing event type
    horse_racing_event = next((event for event in event_types if event.event_type.name == 'Horse Racing'), None)
    if not horse_racing_event:
    raise Exception("Horse Racing event type not found")
    # Get today's date range
    now = datetime.utcnow()
    today = now.date()
    tomorrow = today + timedelta(days=1)
    # Get today's Australian horse racing events
    events = betfair_client.betting.list_events(
    filter=market_filter(
    text_quer=[horse_racing_event.event_type.id],
    market_countries=["AUS", 'AU']
    ),
    )​


    I can't figure oout what's wrong with my code.

    It is only finding 23 upcoming races for the entire next year. This is obviously incorrect. It only finds 75 races globally.
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    I'm certain that if you were to look at the dates of the races your query found, all would be in the next few days, perhaps with some important races appearing a little earlier than others. There's little point in Betfair adding races too far into the future when no runners have been declared for those races.

    Comment

    Working...
    X