Publish a pick for a package

POST /pick/tipster/publish/

Operation ID: create_pick_via_api

Create and publish a new pick via the API using the provided API key for each tip package. This endpoint allows tipsters to publish picks to their subscribers.

Request Body

{
  "apikey": "string",
  "tips": [
    {
      "competition": "string",
      "code": "string",
      "market": "string",
      "event_number": 0,
      "selection": "string",
      "amount_units": 0,
      "odds": 0,
      "max_odds": 0,
      "bookies": "string",
      "use_bonus": true
    }
  ]
}

Parameters

Field
Type
Required
Description

apikey

string

Yes

API key for the package

tips

array

Yes

Array of tip objects containing pick details

Tip Object

Field
Type
Required
Description

competition

string

Yes

Competition name

code

string

Yes

Racing code

market

string

Yes

Market type

event_number

number

Yes

Event/race number

selection

string

Yes

Selection/runner number

amount_units

number

Yes

Betting amount in units

odds

number

Yes

Recommended odds

max_odds

number

Yes

Maximum acceptable odds

bookies

string

Yes

Bookie IDs separated by '&' (e.g., "1&8" for TAB and WishBet)

use_bonus

boolean

Yes

Whether to use bonus funds

Response

Success Response (200)

{
  "status": "Success"
}

Error Responses

  • 400 Bad Request - Invalid request data or missing required fields

  • 401 Invalid credentials - Authentication token is invalid or missing

  • 403 Invalid package API Key - The provided API key is invalid or not authorized

  • 404 Competition or market is unavailable - Specified competition or market not found

  • 406 Invalid data syntax - Request data format is incorrect

  • 500 Internal error - Server encountered an error processing the request

Usage Examples

Single Pick:

curl -X POST "https://betmatic.app/api/pick/tipster/publish/" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token your_token" \
  -d '{
    "apikey": "your_package_api_key",
    "tips": [
      {
        "competition": "BELMONT",
        "code": "Galloping",
        "market": "Fixed Win",
        "event_number": 6,
        "selection": "3",
        "amount_units": 1,
        "odds": 2.5,
        "max_odds": 3.0,
        "bookies": "1",
        "use_bonus": true
      }
    ]
  }'

Multiple Picks:

curl -X POST "https://betmatic.app/api/pick/tipster/publish/" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token your_token" \
  -d '{
    "apikey": "premium_racing_key",
    "tips": [
      {
        "competition": "BELMONT",
        "code": "Galloping",
        "market": "Fixed Win",
        "event_number": 6,
        "selection": "3",
        "amount_units": 2,
        "odds": 2.5,
        "max_odds": 3.0,
        "bookies": "1",
        "use_bonus": false
      },
      {
        "competition": "FLEMINGTON",
        "code": "Galloping",
        "market": "Fixed Place",
        "event_number": 8,
        "selection": "7",
        "amount_units": 1,
        "odds": 1.8,
        "max_odds": 2.0,
        "bookies": "8",
        "use_bonus": true
      }
    ]
  }'

Authentication

This endpoint requires authentication. The auth_token in the header is obtained from your account via the authentication endpoint. Include your token in the Authorization header:

Authorization: Token your_token_here

Get your auth token from: https://betmatic.gitbook.io/documentation/api/authentication/authenticate

Important Notes

  • API Key: The api_key is related to the package and can be obtained from your tipster dashboard (per package)

  • Bookie IDs: Get available bookie IDs from GET /api/bookie/names/ endpoint

  • Competition Names: Get available competition names from GET /api/competition/namecodes/ endpoint

  • Pre-Alert Best Practice: Send a pre-alert first to activate customer's bots (ensure accounts are logged in etc.)

Integration Examples

Python Integration:

import requests
from datetime import datetime, timedelta

def publish_pick(api_key, auth_token, tips):
    url = "https://betmatic.app/api/pick/tipster/publish/"
    headers = {
        "Content-Type": "application/json",
        "Authorization": f"Token {auth_token}"
    }
    data = {
        "apikey": api_key,
        "tips": tips
    }
    
    response = requests.post(url, json=data, headers=headers)
    return response.json()

# Example usage
tips = [{
    "competition": "BELMONT",
    "code": "Galloping",
    "market": "Fixed Win",
    "event_number": 6,
    "selection": "3",
    "amount_units": 1,
    "odds": 2.5,
    "max_odds": 3.0,
    "bookies": "1",
    "use_bonus": True
}]

result = publish_pick("your_api_key", "your_auth_token", tips)
print(f"Published {result.get('picks_published', 0)} picks to {result.get('subscriber_count', 0)} subscribers")

Last updated