Bet module CLI.
This section specifies the queries, transactions, and required payloads. By following this section, one can get a deep understanding of the functioning of the bet
module in the SGE Network chain.
The exposed transactions CLI commands and ticket payloads by the Bet module.
The below transaction can be used to place a bet on the blockchain.
The below table specifies the details of the arguments used in the above transaction:
The payload for the place-bet transaction is as follows:
The values in the payload should be changed according to the data.
The details of the payload parameters are stated in the below table:
Bet module CLI queries.
Queries of this module can be used to get the data of bets placed in the blockchain and params. The following queries have been exposed by the Bet module:
Queries of this module can be used to get the data of bets placed in the blockchain and params. The following queries have been exposed by the Bet module:
The below table explains the details of the argument required for the above query:
The below table explains the details of the argument required for the above query:
The below table explains the details of the argument required for the above query:
The below table explains the details of the argument required for the above query:
The creator:uid pair is separated by a colon :
and each pair is separated by a comma ,
from other pairs.
Argument | Description | Type | Validation | Example |
---|---|---|---|---|
Params | Description | Type | Validation | Example |
---|---|---|---|---|
Params | Description | Type | Validation | Example |
---|
Params | Description | Type | Validation | Example |
---|
Params | Description | Type | Validation | Example |
---|
Params | Description | Type | Validation | Example |
---|
uid
Unique Identifier of a the bet
string
Required
Valid UUID
0435e5b6-635f-11ed-90a6-bb470175dfce
amount
It is the total wager amount (contains bet fee also)
Integer
Positive
Should be greater than the minimum bet amount for the market
100000000
ticket
Used for market verification.
String (JWT token)
Cannot be empty
Cannot contain space (More validations will be added in the future)
1eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI5OTkxYzYwZi0yMDI1LTQ4Y2UtYWU3OS0xZGMxMTBmMTY5OTkiLCJ4aWQiOiJCZXRPZGQiLCJuYW1lIjoiMSIsImJldF9ldmVudF91aWQiOiI1NTMxYzYwZi0yMDI1
selected_odds
The selected odds for the bet
Odds Value will be validated according to the OddsType selected in the bet placement message. there are three types of validation according to the Decimal, Fractional and Moenyline odds
{ "uid": "9991c60f-2025-48ce-ae79-1dc110f16990", "market_uid": "5531c60f-2025-48ce-ae79-1dc110f16007", "value": "2.0"}
uid
Unique identifier of the odds on which the bet should be placed
Cannot be empty
Cannot contain space
Should be a proper UUID (https://www.uuidtools.com/decode)
"uid": "2231c60f-2025-48ce-ae79-1dc110f16444"
value
Value of the odd selected by the bettor
sdk.Dec
Cannot be <= 1
"value": "5.0"
market_uid
Unique identifier of the market on which the bet should be placed
Cannot be empty
Cannot contain space
Should be a proper UUID (https://www.uuidtools.com/decode)
"market_uid": "5531c60f-2025-48ce-ae79-1dc110f16001
kyc_data
Data related to the user kyc
KycData
{ "ignore": true, "approved": true, "id": "userID" }
kyc_ignore
If indend to disable the KYC validation should be set as true
boolean
false
kyc_approved
Tells whether KYC is approved for the user or not
boolean
true
kyc_id
Account address of the user
string
A valid address
sge1na4f4c8m9hzlxqttl4jfnnyhsd94hsg9ykqxez
max_loss_multiplier
A coefficient for maximum loss prevention
string
should be less than one
0.5
odds_type
Type of the odds
uint32
1
iat
Epoch timestamp for issuance of the ticket by oracle in seconds
int64
1657270827
exp
Ticket-expiration epoch timestamp in seconds
int64
1657270827
iss
Issuer of the ticket
string
“Oracle”
sub
Subject of the payload or mostly the name of the transaction
string
“Place Bet”
creator | creator account address | string |
| sge1059gavv45jdp0l7c4kkskr0jae02j9cxmjr3f3 |
uid | UID of market | string |
| 0435e5b6-635f-11ed-90a6-bb470175dfce |
creator | creator account address | string |
| sge1059gavv45jdp0l7c4kkskr0jae02j9cxmjr3f3 |
UID | UUID of the bet | string |
| 0435e5b6-635f-11ed-90a6-bb470175dfce |
creator:uid | creator account address and UID pair list | string |
| sge1059gavv45jdp0l7c4kkskr0jae02j9cxmjr3f3:0435e5b6-635f-11ed-90a6-bb470175dfce |