πŸ”„ Refreshing Accounts

The Basics

A Refresh refers to the act of pulling updated πŸ“± BettorAccount and πŸ’° BetSlip data from an authorized, linked account. Refreshes can be initiated through an API call initiated by a user, a pre-set Refresh Cadence set in the SharpSports dashboard, or by Sharpsports itself.

The result of a Refresh is a πŸ”„ Refresh Response, which is sent via webhook at the conclusion of a refresh, and can be fetched via the API.

Refresh TypeNotes
ManualThis is a refresh initiated via the API either via the πŸ”„ refresh bettor or πŸ”„ refresh bettorAccount calls.
CadenceThis is a refresh initiated by SharpSports on a cadence specified in the SharpSports dashboard settings.
GradeIf you've turned autograde on in the SharpSports dashboard, SharpSports will automatically grade pending πŸ’° BetSlips and send the result via a refreshResponse webhook.
SystemSharpSports will periodically execute refreshes on linked accounts to make sure the linked account data stays up to date.
🚧

For books that are marked as SDK Required, manual and grade refreshes are the only type that can be triggered. For manual refreshes, only the SDK Refresh method and parameters are supported.

Best Practices

Manual Refreshes

To create the optimal user experience, SharpSports recommends initiating a manual refresh when a user logs into their account or opens the app. SDK refreshes can only be initiated in the client, and only when the bettor is authenticated.

🚧

It's required that you notify users when a refresh on their account is being initiated.

Cadence Refreshes

For books where cadence refreshes are available, SharpSports recommends a once, or twice a day cadence.

🚧

Excessive refreshes on an account may result in overage charges and can create suboptimal bettor experience.

AutoGrade

When the Auto-Grade setting is turned on in the BetSync settings of the SharpSports dashboard, SharpSports will grade pending bets without requiring a refresh of the bettor's account.

Every 15 minutes, SharpSports checks whether any open bets in our system match a closed bet with the same 🏷️ MarketSelection and line. If so, we grade the bet and send a refreshresponse.created webhook. SharpSports also automatically grades player props, team props and straight bets for most leagues the morning after the event, when we collect player and team historic data.

When a bet is graded this way, the πŸ”„ Refresh Response has type = grade and the πŸ“ƒ Bet is marked autoGrade = true.

Because a bettor may have cashed out a bet before it was settled, SharpSports still updates autograded bets when the account is next refreshed. The refresh confirms that the bet was actually settled on the user's account, or marks it as cashout if that's what happened. Once the result is confirmed, autoGrade is set to false.

Hosting a Refresh Button

It can be helpful to offer bettors the ability to trigger a refresh on their own, if they want to update the data on their account. We recommend using the manual refresh calls and methods to add this ability to the UI.


Did this page help you?