Betfair AU - Place Bet icon

Betfair AU - Place Bet

Places a single bet on the Betfair Exchange. Use with caution.

Overview

This node places a single bet on the Betfair Australia Exchange. It is designed for automated betting scenarios where users want to programmatically place bets with specific parameters such as market, selection, stake, and odds. The node requires explicit confirmation before placing any real bets to prevent accidental wagering.

Common use cases:

  • Automated sports betting strategies that execute bets based on external signals or data.
  • Integrating Betfair betting into larger workflows for risk management or portfolio diversification.
  • Testing bet placement logic with the option to disable actual bet execution until confirmed.

Example:
A user wants to back a runner in a horse race market with a stake of $10 AUD at odds of 2.5. They configure the node with the market ID, selection ID, side as "Back", price 2.5, and size 10, then confirm the bet placement to execute it.


Properties

Name Meaning
Market ID The market ID to place the bet in (e.g., "1.12345678").
Selection ID The selection ID of the runner to bet on (numeric identifier).
Side Whether to place a Back or a Lay bet. Options: "Back", "Lay".
Price The odds at which to place the bet. Must be between 1.01 and 1000.
Stake ($) The stake amount in Australian Dollars (minimum 5 AUD, precision up to 2 decimal places).
Customer Strategy Reference A string reference for your betting strategy, required by Betfair for automated betting. Default is "n8n-workflow-v1".
Confirm Bet Placement Boolean flag to confirm you want to place a real bet. Must be checked to proceed; otherwise, the node fails.

Output

The node outputs an array of JSON objects corresponding to each input item processed. Each output item contains:

  • json: The response data from the Betfair API after attempting to place the bet. This includes details about the placed order or error information if the request failed.
  • pairedItem: Metadata linking the output to the original input item index.

If the node encounters an error during bet placement and "Continue On Fail" is enabled, the output will contain an error message under json.error for that item.

Note: The node does not output binary data.


Dependencies

  • Requires valid Betfair Australia API credentials including:
    • An application key.
    • Username and password for Betfair login.
  • The node performs an authentication request to obtain a session token before placing bets.
  • Network access to Betfair's identity and betting REST endpoints is necessary.
  • No additional environment variables are required beyond credential configuration in n8n.

Troubleshooting

  • Bet placement not confirmed error:
    If the "Confirm Bet Placement" checkbox is not ticked, the node will fail with a clear error instructing to confirm bet placement. This safety feature prevents accidental real bets.

  • Authentication failures:
    Errors during login (e.g., invalid username/password or missing token in response) will cause the node to throw an error indicating login failure. Verify credentials and network connectivity.

  • API request errors:
    If the Betfair API returns an error response (e.g., invalid market ID, insufficient funds), the node logs the detailed API error and throws a descriptive error message. Check the API response for specifics.

  • Timeouts or network issues:
    The node uses a 15-second timeout for API requests. Network instability may cause failures; ensure reliable internet connection.

  • Invalid input values:
    Ensure all required properties are provided and within allowed ranges (e.g., price ≥ 1.01, stake ≥ 5 AUD).


Links and References

Discussion