Transactions & Payloads
The exposed transactions CLI commands and ticket payloads by the Bet module.
Place Bet
The below transaction can be used to place a bet on the blockchain.
Command
The below table specifies the details of the arguments used in the above transaction:
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
Payload
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:
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
"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
"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β
Last updated