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
| Value | Description |
|---|---|
| FreeBet | Represents a free bet bonus type |
BonusStatus
| Value | Description |
|---|---|
| Used | The bonus has been used |
| Available | The bonus is available for use |
FreebetBonusType
| Value | Description |
|---|---|
| OnlyWin | The bettor receives only the winnings; the stake amount is returned to the pool. isSponsoredBetReturnable = true |
| AllWin | The bettor receives both the full stake and the winnings; the stake amount is not returned to the pool. isSponsoredBetReturnable = false |
BetRestrictionBetType
| Value | Description |
|---|---|
| All | All bet types are allowed |
| Ordinar | Only ordinar bets are allowed |
| Combo | Only combo bets are allowed |
EventRestrictionEventStatus
| Value | Description |
|---|---|
| All | All event statuses are allowed |
| Live | Only live events are allowed |
| Prematch | Only prematch events are allowed |
Common types
FreebetSettings
| Field | Type | Description | Required |
|---|---|---|---|
| bonusType | FreebetBonusType | Type of the freebet bonus | Yes |
| feeSponsored | boolean | Indicates if fee is sponsored | Yes |
| betRestriction | BetRestriction | Restrictions applied to bets | Yes |
| eventRestriction | EventRestriction | Restrictions applied to events | Yes |
| periodOfValidityMs | number | Period of validity in milliseconds | Yes |
BetRestriction
| Field | Type | Description | Required |
|---|---|---|---|
| betType | BetRestrictionBetType | Type of bet restriction | Yes |
| minOdds | string | Minimum odds allowed | Yes |
| maxOdds | string | Maximum odds allowed | No |
EventRestriction
| Field | Type | Description | Required |
|---|---|---|---|
| eventStatus | EventRestrictionEventStatus | Status of event restriction | Yes |
| eventFilter | EventFilter | Filter for events | No |
EventFilter
| Field | Type | Description | Required |
|---|---|---|---|
| exclude | boolean | If exclude = true, it means "allow all, except.". If exclude = false, it means "deny all, except." | Yes |
| filter | FilterItem[] | List of filter items | Yes |
FilterItem
| Field | Type | Description | Required |
|---|---|---|---|
| sportId | string | ID of the sport | Yes |
| leagues | string[] | List of leagues | No |
| markets | Market[] | List of markets | No |
Market
| Field | Type | Description | Required |
|---|---|---|---|
| marketId | number | ID of the market | Yes |
| gamePeriodId | number | ID of the game period | Yes |
| gameTypeId | number | ID of the game type | Yes |
Public types
GetClientBonusesResponse
| Field | Type | Description | Required |
|---|---|---|---|
| bonuses | ClientBonus[] | Array of bonus objects | Yes |
ClientBonus
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | Unique identifier of the bonus | Yes |
| bonusType | BonusType | Type of the bonus | Yes |
| freebetParam | FreebetParam | Parameters specific to freebet | Yes |
| publicCustomData | object (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 500 | No |
| address | string | Wallet address | Yes |
| amount | string | Bonus amount | Yes |
| status | BonusStatus | Current status of the bonus | Yes |
| network | string | Blockchain network | Yes |
| currency | string | Currency code | Yes |
| expiresAt | string | Expiration timestamp | Yes |
| usedAt | string | Usage timestamp | Yes |
| createdAt | string | Creation timestamp | Yes |
FreebetParam
| Field | Type | Description | Required |
|---|---|---|---|
| isBetSponsored | boolean | Is bet sponsored | Yes |
| isFeeSponsored | boolean | Is fee sponsored | Yes |
| isSponsoredBetReturnable | boolean | Is sponsored bet returnable | Yes |
| settings | FreebetSettings | Freebet settings configuration | Yes |
Private types
CreateFreebetOfferDto
| Field | Type | Description | Required |
|---|---|---|---|
| name | string | Name of the freebet offer | Yes |
| key | string | Unique key for the offer | Yes |
| publicCustomData | object (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 500 | No |
| description | string | Description of the offer | No |
| settings | FreebetSettings | Freebet settings configuration | Yes |
BonusResponse
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | The ID of the bonus | Yes |
| operatorId | string | The ID of the operator | Yes |
| productId | string | The ID of the product | Yes |
| poolId | string | The ID of the pool | Yes |
| offerId | string | The ID of the offer | Yes |
| address | string | The address of the bonus | Yes |
| amount | string | The amount of the bonus | Yes |
| status | enum | The status of the bonus | Yes |
| campaignGroup | string | The campaign group of the bonus | Yes |
| network | string | The network of the bonus | Yes |
| currency | string | The currency of the bonus | Yes |
| expiresAt | Date | The expiration date of the bonus | No |
| usedAt | Date | The date when the bonus was used | No |
| createdAt | Date | The creation date of the bonus | Yes |
| offer | OfferResponse | Offer model | Yes |
| pool | PoolResponse | Pool model | Yes |
| operator | OperatorResponse | Operator model | Yes |
BonusesResponse
| Field | Type | Description | Required |
|---|---|---|---|
| bonuses | BonusResponse[] | List of bonuses | Yes |
OfferResponse
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | Offer id | Yes |
| operatorId | string | Operator id | Yes |
| productId | string | Product id | Yes |
| type | enum | Type of bonus offer | Yes |
| name | string | Name of the offer | Yes |
| key | string | Unique key for the offer | Yes |
| description | string | Description of the offer | Yes |
| settings | FreebetSettings | Freebet settings configuration | Yes |
| publicCustomData | object (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 500 | No |
| createdAt | Date | Creation timestamp | Yes |
| operator | OperatorResponse | Operator model | No |
OffersResponse
| Field | Type | Description | Required |
|---|---|---|---|
| offers | OfferResponse[] | List of offers | Yes |
PoolResponse
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | The ID of the pool | Yes |
| address | string | The address of the pool | Yes |
| network | string | The network of the pool | Yes |
| currency | string | The currency of the pool | Yes |
| token | string | The token of the pool | Yes |
| chainId | number | The chain ID of the pool | Yes |
| productId | string | The ID of the product | Yes |
| status | string | The status of the pool | Yes |
| createdAt | Date | The creation date of the pool | Yes |
PoolsResponse
| Field | Type | Description | Required |
|---|---|---|---|
| pools | PoolResponse[] | List of pools | Yes |
OperatorResponse
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | The ID of the operator | Yes |
| userName | string | The username of the operator | Yes |
| string | The email of the operator | Yes | |
| productId | string | The ID of the product | Yes |
| role | string | The role of the operator | Yes |
| status | enum | The status of the operator | Yes |
| createdAt | Date | The creation date of the operator | Yes |
OperatorsResponse
| Field | Type | Description | Required |
|---|---|---|---|
| operators | OperatorResponse[] | List of operators | Yes |
CreateBonusRecipientsDto
| Field | Type | Description | Required |
|---|---|---|---|
| address | string | Wallet address of the bonus recipient | Yes |
| amount | string | Amount of the bonus to be distributed | Yes |
CreateBonusDto
| Field | Type | Description | Required |
|---|---|---|---|
| offerId | string | ID of the offer to create bonuses for | Yes |
| poolId | string | ID of the pool to create bonuses in | Yes |
| recipients | CreateBonusRecipientsDto[] | List of bonus recipients | Yes |
| campaignGroup | string | Campaign group identifier | Yes |
BonusStatisticsByCampaignItem
| Field | Type | Description | Required |
|---|---|---|---|
| createdAt | string | Created date | Yes |
| campaign | string | Campaign name | Yes |
| offerId | string | Offer ID | Yes |
| poolId | string | Pool ID | Yes |
| amountSum | string | Total amount sum | Yes |
| amountSumUsed | string | Used amount sum | Yes |
| amountSumUsedPercent | string | Percentage of used amount sum | Yes |
| amountCount | string | Total amount count | Yes |
| amountCountUsed | string | Used amount count | Yes |
| amountCountUsedPercent | string | Percentage of used amount count | Yes |
| userUniqCount | string | Unique users count | Yes |
| userCount | string | Total users count | Yes |
| userCountUsed | string | Count of users who used bonus | Yes |
| userCountUsedPercent | string | Percentage of users who used bonus | Yes |
BonusStatisticsByCampaignResponse
| Field | Type | Description | Required |
|---|---|---|---|
| statistics | BonusStatisticsByCampaignItem[] | Bonus statistics items | Yes |
BonusStatisticsByPoolItem
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | The ID of the pool | Yes |
| address | string | The address of the pool | Yes |
| network | string | The network of the pool | Yes |
| currency | string | The currency of the pool | Yes |
| token | string | The token of the pool | Yes |
| chainId | number | The chain ID of the pool | Yes |
| productId | string | The ID of the product | Yes |
| status | string | The status of the pool | Yes |
| createdAt | Date | The creation date of the pool | Yes |
| amountSum | string | Total amount sum | Yes |
| amountSumUsed | string | Used amount sum | Yes |
| amountCount | string | Total amount count | Yes |
| amountCountUsed | string | Used amount count | Yes |
BonusStatisticsByPoolResponse
| Field | Type | Description | Required |
|---|---|---|---|
| statistics | BonusStatisticsByPoolItem[] | Bonus statistics items | Yes |
SportsUniqueMarketsCombinationsResponse
You can find the names of the markets in the library (opens in a new tab)
| Field | Type | Description | Required |
|---|---|---|---|
| [key: string] | array | Object with market combinations grouped by key | Yes |
| [key: string][].marketId | number | Market ID | Yes |
| [key: string][].gamePeriodId | number | Game period ID | Yes |
| [key: string][].gameTypeId | number | Game type ID | Yes |
ActualSportIdsResponse
You can find the names of the sports in the library (opens in a new tab)
| Field | Type | Description | Required |
|---|---|---|---|
| [index] | number[] | Array of sport IDs | Yes |
ActualLeaguesResponse
| Field | Type | Description | Required |
|---|---|---|---|
| [sportId: string] | array | Object with leagues grouped by sport ID | Yes |
| [sportId: string][].country | string | Country name | Yes |
| [sportId: string][].league | string | League name | Yes |