Returns an array of numbers which are the wire of a Solana transaction
- id1: id1 of the market you wish to bet on
- id2: id2 of the market you wish to bet on
- side: the market side you wish to bet on, one of the following - "home", "away"; "Back", "Lay"; "over", "under". Capitalizations do not matter. Calling the API with an invalid side will result in an error.
- stake: the amount of USDC you wish to wager
- odds: the odds that you would like to place your bet at. Purebet matches orders up the orderbook. This means if you place a bet at lower odds than what is available, your bet will be accepted at higher odds so that you get a higher payout.
- bettorAddr: the address of the bettor as a base58 encoded string (your wallet public key)
Example url: https://api.purebet.io/bets/betBuilder?id1=10&id2=20&side=home&stake=50&odds=3.45&bettorAddr=Bah2FwLXDsJTP2A8tSZBhM8p1bzBnJmbZ6nPJtuymg8y
Note: Calling the API with an invalid id1 and id2 combination will result in an error. Calling the API with a wrong bettorAddr will return a response, however the transaction to place the bet will fail.
The response from calling this API contains the following attributes.
- status: 200, indicates that the call was successful
- body: object with attributes type and data as described below
- type: "Buffer", this is always in the response
- data: list of numbers, this is the wire format of the transaction that you will sign in order to place the bet
Use your preferred method to parse the transaction wire into a Solana transaction, and then sign the transaction in your preferred way. The bet will require the signer to have the USDC available to place the bet as well as an amount of SOL likely to be worth between $0.00 and $0.10. If SOL is paid, it will be refunded when the event starts if the bet is unmatched, or when the market is settled.
If your bet is eligible to be aggregated, that process will automatically start after the transaction to place your bet is successful, and your bet will be matched soon. Under some conditions your bet may not be aggregated. Note that due to delays in blockchain processes, some bets may take up to 1 minute to match. Please do not cancel any unmatched bets within 1 minute.