Developer Hub
🔮 For applications
Guides & Tutorials
Freebets
Data types

Data types

ℹ️

This diagram serves as a supplement to the api documentation. The up-to-date diagrams can be found in the documentation.

Development

https://dev-api.onchainfeed.org/api/v1/public/gateway/docs (opens in a new tab)

Production

https://api.onchainfeed.org/api/v1/public/gateway/docs (opens in a new tab)

Enums

BonusType

ValueDescription
FreeBetRepresents a free bet bonus type

BonusStatus

ValueDescription
UsedThe bonus has been used
AvailableThe bonus is available for use

FreebetBonusType

ValueDescription
OnlyWinThe bettor receives only the winnings; the stake amount is returned to the pool. isSponsoredBetReturnable = true
AllWinThe bettor receives both the full stake and the winnings; the stake amount is not returned to the pool. isSponsoredBetReturnable = false

BetRestrictionBetType

ValueDescription
AllAll bet types are allowed
OrdinarOnly ordinar bets are allowed
ComboOnly combo bets are allowed

EventRestrictionEventStatus

ValueDescription
AllAll event statuses are allowed
LiveOnly live events are allowed
PrematchOnly prematch events are allowed

Common types

FreebetSettings

FieldTypeDescriptionRequired
bonusTypeFreebetBonusTypeType of the freebet bonusYes
feeSponsoredbooleanIndicates if fee is sponsoredYes
betRestrictionBetRestrictionRestrictions applied to betsYes
eventRestrictionEventRestrictionRestrictions applied to eventsYes
periodOfValidityMsnumberPeriod of validity in millisecondsYes

BetRestriction

FieldTypeDescriptionRequired
betTypeBetRestrictionBetTypeType of bet restrictionYes
minOddsstringMinimum odds allowedYes
maxOddsstringMaximum odds allowedNo

EventRestriction

FieldTypeDescriptionRequired
eventStatusEventRestrictionEventStatusStatus of event restrictionYes
eventFilterEventFilterFilter for eventsNo

EventFilter

FieldTypeDescriptionRequired
excludebooleanIf exclude = true, it means "allow all, except.". If exclude = false, it means "deny all, except."Yes
filterFilterItem[]List of filter itemsYes

FilterItem

FieldTypeDescriptionRequired
sportIdstringID of the sportYes
leaguesstring[]List of leaguesNo
marketsMarket[]List of marketsNo

Market

FieldTypeDescriptionRequired
marketIdnumberID of the marketYes
gamePeriodIdnumberID of the game periodYes
gameTypeIdnumberID of the game typeYes

Public types

GetClientBonusesResponse

FieldTypeDescriptionRequired
bonusesClientBonus[]Array of bonus objectsYes

ClientBonus

FieldTypeDescriptionRequired
idstringUnique identifier of the bonusYes
bonusTypeBonusTypeType of the bonusYes
freebetParamFreebetParamParameters specific to freebetYes
publicCustomDataobject (JSON)This field is custom and arbitrary, meaning it is defined by the offer creators. It is used for any additional technical information that may be needed for integration with your systems. It prohibits dangerous constructs such as <script> to ensure safe usage. Max length 500No
addressstringWallet addressYes
amountstringBonus amountYes
statusBonusStatusCurrent status of the bonusYes
networkstringBlockchain networkYes
currencystringCurrency codeYes
expiresAtstringExpiration timestampYes
usedAtstringUsage timestampYes
createdAtstringCreation timestampYes

FreebetParam

FieldTypeDescriptionRequired
isBetSponsoredbooleanIs bet sponsoredYes
isFeeSponsoredbooleanIs fee sponsoredYes
isSponsoredBetReturnablebooleanIs sponsored bet returnableYes
settingsFreebetSettingsFreebet settings configurationYes

Private types

CreateFreebetOfferDto

FieldTypeDescriptionRequired
namestringName of the freebet offerYes
keystringUnique key for the offerYes
publicCustomDataobject (JSON)This field is custom and arbitrary, meaning it is defined by the offer creators. It is used for any additional technical information that may be needed for integration with your systems. It prohibits dangerous constructs such as <script> to ensure safe usage. Max length 500No
descriptionstringDescription of the offerNo
settingsFreebetSettingsFreebet settings configurationYes

BonusResponse

FieldTypeDescriptionRequired
idstringThe ID of the bonusYes
operatorIdstringThe ID of the operatorYes
productIdstringThe ID of the productYes
poolIdstringThe ID of the poolYes
offerIdstringThe ID of the offerYes
addressstringThe address of the bonusYes
amountstringThe amount of the bonusYes
statusenumThe status of the bonusYes
campaignGroupstringThe campaign group of the bonusYes
networkstringThe network of the bonusYes
currencystringThe currency of the bonusYes
expiresAtDateThe expiration date of the bonusNo
usedAtDateThe date when the bonus was usedNo
createdAtDateThe creation date of the bonusYes
offerOfferResponseOffer modelYes
poolPoolResponsePool modelYes
operatorOperatorResponseOperator modelYes

BonusesResponse

FieldTypeDescriptionRequired
bonusesBonusResponse[]List of bonusesYes

OfferResponse

FieldTypeDescriptionRequired
idstringOffer idYes
operatorIdstringOperator idYes
productIdstringProduct idYes
typeenumType of bonus offerYes
namestringName of the offerYes
keystringUnique key for the offerYes
descriptionstringDescription of the offerYes
settingsFreebetSettingsFreebet settings configurationYes
publicCustomDataobject (JSON)This field is custom and arbitrary, meaning it is defined by the offer creators. It is used for any additional technical information that may be needed for integration with your systems. It prohibits dangerous constructs such as <script> to ensure safe usage. Max length 500No
createdAtDateCreation timestampYes
operatorOperatorResponseOperator modelNo

OffersResponse

FieldTypeDescriptionRequired
offersOfferResponse[]List of offersYes

PoolResponse

FieldTypeDescriptionRequired
idstringThe ID of the poolYes
addressstringThe address of the poolYes
networkstringThe network of the poolYes
currencystringThe currency of the poolYes
tokenstringThe token of the poolYes
chainIdnumberThe chain ID of the poolYes
productIdstringThe ID of the productYes
statusstringThe status of the poolYes
createdAtDateThe creation date of the poolYes

PoolsResponse

FieldTypeDescriptionRequired
poolsPoolResponse[]List of poolsYes

OperatorResponse

FieldTypeDescriptionRequired
idstringThe ID of the operatorYes
userNamestringThe username of the operatorYes
emailstringThe email of the operatorYes
productIdstringThe ID of the productYes
rolestringThe role of the operatorYes
statusenumThe status of the operatorYes
createdAtDateThe creation date of the operatorYes

OperatorsResponse

FieldTypeDescriptionRequired
operatorsOperatorResponse[]List of operatorsYes

CreateBonusRecipientsDto

FieldTypeDescriptionRequired
addressstringWallet address of the bonus recipientYes
amountstringAmount of the bonus to be distributedYes

CreateBonusDto

FieldTypeDescriptionRequired
offerIdstringID of the offer to create bonuses forYes
poolIdstringID of the pool to create bonuses inYes
recipientsCreateBonusRecipientsDto[]List of bonus recipientsYes
campaignGroupstringCampaign group identifierYes

BonusStatisticsByCampaignItem

FieldTypeDescriptionRequired
createdAtstringCreated dateYes
campaignstringCampaign nameYes
offerIdstringOffer IDYes
poolIdstringPool IDYes
amountSumstringTotal amount sumYes
amountSumUsedstringUsed amount sumYes
amountSumUsedPercentstringPercentage of used amount sumYes
amountCountstringTotal amount countYes
amountCountUsedstringUsed amount countYes
amountCountUsedPercentstringPercentage of used amount countYes
userUniqCountstringUnique users countYes
userCountstringTotal users countYes
userCountUsedstringCount of users who used bonusYes
userCountUsedPercentstringPercentage of users who used bonusYes

BonusStatisticsByCampaignResponse

FieldTypeDescriptionRequired
statisticsBonusStatisticsByCampaignItem[]Bonus statistics itemsYes

BonusStatisticsByPoolItem

FieldTypeDescriptionRequired
idstringThe ID of the poolYes
addressstringThe address of the poolYes
networkstringThe network of the poolYes
currencystringThe currency of the poolYes
tokenstringThe token of the poolYes
chainIdnumberThe chain ID of the poolYes
productIdstringThe ID of the productYes
statusstringThe status of the poolYes
createdAtDateThe creation date of the poolYes
amountSumstringTotal amount sumYes
amountSumUsedstringUsed amount sumYes
amountCountstringTotal amount countYes
amountCountUsedstringUsed amount countYes

BonusStatisticsByPoolResponse

FieldTypeDescriptionRequired
statisticsBonusStatisticsByPoolItem[]Bonus statistics itemsYes

SportsUniqueMarketsCombinationsResponse

You can find the names of the markets in the library (opens in a new tab)

FieldTypeDescriptionRequired
[key: string]arrayObject with market combinations grouped by keyYes
[key: string][].marketIdnumberMarket IDYes
[key: string][].gamePeriodIdnumberGame period IDYes
[key: string][].gameTypeIdnumberGame type IDYes

ActualSportIdsResponse

You can find the names of the sports in the library (opens in a new tab)

FieldTypeDescriptionRequired
[index]number[]Array of sport IDsYes

ActualLeaguesResponse

FieldTypeDescriptionRequired
[sportId: string]arrayObject with leagues grouped by sport IDYes
[sportId: string][].countrystringCountry nameYes
[sportId: string][].leaguestringLeague nameYes