Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@api_request
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)
@api_request
def list_race_status(api, params=None, session=None, exchange=None):
request = ScoresRequest(api, 'ScoresAPING/v1.0/listRaceDetails', params)
(response, raw_response, sent) = request(session)
return process_response(response, raw_response, sent, apiparsescores.RaceStatus)
@api_request
def place_orders(api, params=None, session=None, exchange=None): # atomic
request = OrderRequest(api, 'SportsAPING/v1.0/placeOrders', params, exchange)
(response, raw_response, sent) = request(session)
return process_response(response, raw_response, sent, apiparsebetting.PlaceOrder)
@api_request
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)
@api_request
def list_cleared_orders(api, params=None, session=None, exchange=None):
request = BettingRequest(api, 'SportsAPING/v1.0/listClearedOrders', params, exchange)
(response, raw_response, sent) = request(session)
return process_response(response, raw_response, sent, apiparsedata.ClearedOrders)
@api_request
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)
@api_request
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)
@api_request
def replace_orders(api, params=None, session=None, exchange=None):
request = OrderRequest(api, 'SportsAPING/v1.0/replaceOrders', params, exchange)
(response, raw_response, sent) = request(session)
return process_response(response, raw_response, sent, apiparsebetting.ReplaceOrder)
@api_request
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)
@api_request
def get_account_funds(api, params=None, session=None, exchange=None):
request = AccountRequest(api, 'AccountAPING/v1.0/getAccountFunds', params, exchange)
(response, raw_response, sent) = request(session)
return process_response(response, raw_response, sent, apiparseaccount.AccountFunds)