Cancel order

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


betAddr: string, the address of where the information for this bet is stored on the Solana blockchain. Obtain this from the "acc" field of the response from a get pending orders call.
Example call: https://api.purebet.io/cancel/bet?betAddr=EnwQr49cyfJgCbeCoV4r4nhKqc4KN4QSdUkg6wp8MGhb


  • status: 200, indicates that the call was successful
  • body: object with attributes type and data as described below, or a string that indicates an error with the call
  • type: "Buffer"
  • data: list of numbers, this is the wire format of the transaction that you will sign in order to cancel the bet
If this endpoint is called with an address that is not a bet at Purebet, or a bet address that was placed within the last 35 seconds, or a bet that has already been matched, the call will return an error message. The 35 second delay exists in order to accommodate the time it takes to aggregate bets.
Note: The call assumes that the transaction signer is the same address as the placer of the bet. Only the bettor who placed the bet may sign the transaction to cancel the bet, otherwise the Purebet on-chain program will reject the transaction.
After receiving the response, use your preferred methods to deserialize and sign the transaction. The USDC wagered and the SOL paid for rent exemption will be refunded, and the wager will be cancelled.