💰Place bet

Returns an array of numbers which are the wire of a Solana transaction

Parameters:

  • 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

Example response
{
  "status": 200,
  "body": [
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    0,
    3,
    8,
    157,
    54,
    73,
    227,
    44,
    58,
    3,
    77,
    195,
    204,
    209,
    174,
    93,
    159,
    201,
    163,
    77,
    17,
    52,
    4,
    59,
    30,
    209,
    192,
    23,
    228,
    220,
    244,
    216,
    91,
    142,
    106,
    57,
    152,
    66,
    118,
    192,
    60,
    7,
    126,
    173,
    213,
    207,
    96,
    33,
    85,
    27,
    111,
    236,
    137,
    151,
    110,
    198,
    42,
    245,
    67,
    158,
    103,
    132,
    16,
    244,
    80,
    124,
    196,
    67,
    238,
    169,
    22,
    178,
    129,
    196,
    196,
    193,
    31,
    159,
    3,
    121,
    133,
    221,
    56,
    108,
    125,
    9,
    209,
    201,
    222,
    158,
    88,
    129,
    67,
    7,
    225,
    18,
    250,
    12,
    71,
    152,
    74,
    6,
    81,
    46,
    91,
    163,
    238,
    166,
    201,
    143,
    153,
    111,
    160,
    52,
    68,
    213,
    199,
    225,
    127,
    50,
    65,
    127,
    65,
    34,
    1,
    173,
    76,
    186,
    13,
    96,
    48,
    198,
    250,
    122,
    243,
    190,
    219,
    173,
    58,
    61,
    101,
    243,
    106,
    171,
    201,
    116,
    49,
    177,
    187,
    228,
    194,
    210,
    246,
    224,
    228,
    124,
    166,
    2,
    3,
    69,
    47,
    93,
    97,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    31,
    245,
    250,
    111,
    64,
    43,
    235,
    200,
    103,
    141,
    128,
    70,
    18,
    187,
    108,
    113,
    203,
    205,
    1,
    164,
    255,
    104,
    133,
    133,
    80,
    237,
    132,
    255,
    89,
    64,
    157,
    138,
    6,
    221,
    246,
    225,
    215,
    101,
    161,
    147,
    217,
    203,
    225,
    70,
    206,
    235,
    121,
    172,
    28,
    180,
    133,
    237,
    95,
    91,
    55,
    145,
    58,
    140,
    245,
    133,
    126,
    255,
    0,
    169,
    116,
    29,
    104,
    74,
    88,
    209,
    91,
    196,
    83,
    87,
    192,
    12,
    73,
    189,
    141,
    204,
    55,
    12,
    24,
    4,
    204,
    85,
    115,
    114,
    105,
    176,
    155,
    213,
    6,
    89,
    135,
    110,
    2,
    5,
    2,
    0,
    1,
    110,
    3,
    0,
    0,
    0,
    157,
    54,
    73,
    227,
    44,
    58,
    3,
    77,
    195,
    204,
    209,
    174,
    93,
    159,
    201,
    163,
    77,
    17,
    52,
    4,
    59,
    30,
    209,
    192,
    23,
    228,
    220,
    244,
    216,
    91,
    142,
    106,
    18,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    97,
    51,
    48,
    54,
    48,
    54,
    53,
    52,
    52,
    56,
    56,
    53,
    48,
    46,
    51,
    49,
    52,
    49,
    80,
    34,
    21,
    0,
    0,
    0,
    0,
    0,
    71,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    31,
    245,
    250,
    111,
    64,
    43,
    235,
    200,
    103,
    141,
    128,
    70,
    18,
    187,
    108,
    113,
    203,
    205,
    1,
    164,
    255,
    104,
    133,
    133,
    80,
    237,
    132,
    255,
    89,
    64,
    157,
    138,
    6,
    6,
    1,
    7,
    2,
    4,
    3,
    0,
    7,
    0,
    62,
    14,
    19,
    136,
    47,
    218
  ]
}

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.

Response

The response from calling this API contains the following attributes.

  • status: 200, indicates that the call was successful

  • body: 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.

Last updated