How to use the betfairlightweight.apimethod.BettingRequest function in betfairlightweight

To help you get started, we’ve selected a few betfairlightweight examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liampauling / betfair / tests / test_apimethod.py View on Github external
def test_api_method_errors(logged_in_client):
    request = apimethod.APIMethod(logged_in_client, 'method', 'params', 'exchange')
    with pytest.raises(BetfairError):
        request()
    request = apimethod.BettingRequest(logged_in_client, 'method', 'params', 'exchange')
    with pytest.raises(BetfairError):
        request()
    request = apimethod.OrderRequest(logged_in_client, 'method', 'params', 'exchange')
    with pytest.raises(BetfairError):
        request()
    request = apimethod.BettingRequest(logged_in_client, 'method', 'params', 'exchange')
    with pytest.raises(BetfairError):
        request()
    request = apimethod.AccountRequest(logged_in_client, 'method', 'params', 'exchange')
    with pytest.raises(BetfairError):
        request()
    request = apimethod.ScoresRequest(logged_in_client, 'method', 'params', 'exchange')
    with pytest.raises(BetfairError):
        request()
    request = apimethod.NavigationRequest(logged_in_client, 'method', 'params', 'UK')
    with pytest.raises(BetfairError):
github liampauling / betfair / betfairlightweight / apirequest.py View on Github external
def list_competitions(api, params=None, session=None, exchange=None):
    request = BettingRequest(api, 'SportsAPING/v1.0/listCompetitions', params, exchange)
    (response, raw_response, sent) = request(session)
    return process_response(response, raw_response, sent, apiparsedata.CompetitionResult)
github liampauling / betfair / betfairlightweight / apirequest.py View on Github external
def list_market_book(api, params=None, session=None, exchange=None):
    request = BettingRequest(api, 'SportsAPING/v1.0/listMarketBook', params, exchange)
    (response, raw_response, sent) = request(session)
    return process_response(response, raw_response, sent, apiparsedata.MarketBook)
github liampauling / betfair / betfairlightweight / apirequest.py View on Github external
def list_market_catalogue(api, params=None, session=None, exchange=None):
    request = BettingRequest(api, 'SportsAPING/v1.0/listMarketCatalogue', params, exchange)
    (response, raw_response, sent) = request(session)
    return process_response(response, raw_response, sent, apiparsedata.MarketCatalogue)
github liampauling / betfair / betfairlightweight / apirequest.py View on Github external
def list_venues(api, params=None, session=None, exchange=None):
    request = BettingRequest(api, 'SportsAPING/v1.0/listVenues', params, exchange)
    (response, raw_response, sent) = request(session)
    return process_response(response, raw_response, sent, apiparsedata.VenueResult)
github liampauling / betfair / betfairlightweight / apirequest.py View on Github external
def list_current_orders(api, params=None, session=None, exchange=None):
    request = BettingRequest(api, 'SportsAPING/v1.0/listCurrentOrders', params, exchange)
    (response, raw_response, sent) = request(session)
    return process_response(response, raw_response, sent, apiparsedata.CurrentOrders)
github liampauling / betfair / betfairlightweight / apirequest.py View on Github external
def list_event_types(api, params=None, session=None, exchange=None):
    request = BettingRequest(api, 'SportsAPING/v1.0/listEventTypes', params, exchange)
    (response, raw_response, sent) = request(session)
    return process_response(response, raw_response, sent, apiparsedata.EventTypeResult)
github liampauling / betfair / betfairlightweight / apirequest.py View on Github external
def list_events(api, params=None, session=None, exchange=None):
    request = BettingRequest(api, 'SportsAPING/v1.0/listEvents', params, exchange)
    (response, raw_response, sent) = request(session)
    return process_response(response, raw_response, sent, apiparsedata.EventResult)
github liampauling / betfair / betfairlightweight / apirequest.py View on Github external
def list_market_types(api, params=None, session=None, exchange=None):
    request = BettingRequest(api, 'SportsAPING/v1.0/listMarketTypes', params, exchange)
    (response, raw_response, sent) = request(session)
    return process_response(response, raw_response, sent, apiparsedata.MarketTypeResult)