> ## Documentation Index
> Fetch the complete documentation index at: https://docs.55-tech.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ABP Quickstart - Place Your First Bet

> Step-by-step guide to placing your first bet through the ABP API. From account setup to order placement, tracking, and settlement.

## Step 1: List your accounts

Check which bookmaker accounts are configured for your API key:

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  https://v2.55-tech.com/accounts
```

Response includes each account's bookmaker, balance, priority, stake limits, and currency:

```json theme={null}
[
  {
    "bookmaker": "pinnacle",
    "username": "pinnacle_main",
    "client": "your-client",
    "password": "***",
    "balance": 5000.0,
    "active": true,
    "priority": 10,
    "maxStake": 1000.0,
    "minStake": 5.0,
    "currencyId": "USD",
    "verifyBetslip": false,
    "meta": {},
    "createdAt": "2026-01-01T00:00:00Z",
    "updatedAt": "2026-02-01T12:00:00Z",
    "multiLimitAllowed": true,
    "currencyInfo": { "currency": "USD", "currencyValue": 1, "updatedAt": "2026-02-07T17:29:32+00:00" }
  }
]
```

## Step 2: Get a betslip

Before placing a bet, retrieve current odds and limits. You need a `fixtureId`, `outcomeId`, and `playerId`:

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -H "x-api-key: YOUR_API_KEY" \
      "https://v2.55-tech.com/betslip?fixtureId=id1000004461512432&outcomeId=103&playerId=0"
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    resp = requests.get(
        "https://v2.55-tech.com/betslip",
        headers={"x-api-key": "YOUR_API_KEY"},
        params={"fixtureId": "id1000004461512432", "outcomeId": 103, "playerId": 0},
    )
    print(resp.json()["odds"])
    ```
  </Tab>
</Tabs>

The betslip returns live odds from every bookmaker that has this market, with fixture and outcome metadata:

```json theme={null}
{
  "fixtureId": "id1000004461512432",
  "outcomeId": 103,
  "playerId": 0,
  "client": "your-client",
  "fixtureInfo": {
    "sport": { "sportId": 10, "sportName": "Soccer" },
    "tournament": { "tournamentName": "Serie A", "categoryName": "Italy" },
    "participants": {
      "participant1Name": "AS Roma",
      "participant2Name": "Cagliari Calcio"
    }
  },
  "outcomeInfo": {
    "marketName": "Full Time Result",
    "outcomeName": "2"
  },
  "odds": {
    "pinnacle": {
      "id1000004461512432:pinnacle:103:0": {
        "price": 1.98,
        "limit": 15000,
        "limitMin": 5,
        "limitCurrency": "USD",
        "limitUsd": 15000,
        "limitMinUsd": 5,
        "active": true,
        "account": "pinnacle_main",
        "currencyInfo": { "currency": "USD", "currencyValue": 1, "updatedAt": "2026-02-07T17:29:32+00:00" }
      }
    },
    "sharpbet": {
      "id1000004461512432:sharpbet:103:0": {
        "price": 2.0,
        "limit": 751.34,
        "limitMin": 1,
        "limitCurrency": "EUR",
        "limitUsd": 886.13,
        "limitMinUsd": 1.18,
        "active": true,
        "account": "sharpbet_user",
        "currencyInfo": { "currency": "EUR", "currencyValue": 0.84788876, "updatedAt": "2026-02-07T17:29:32+00:00" }
      }
    }
  }
}
```

<Note>
  Use the [OddsPapi API](https://docs.oddspapi.io/) to discover fixture IDs and outcome IDs. ABP uses OddsPapi identifiers directly.
</Note>

## Step 3: Place an order

Place a bet order with minimum price protection. Each order needs a unique `requestUuid` for idempotency:

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST \
      -H "x-api-key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "orders": [
          {
            "requestUuid": "eb45b192-317b-42d5-9f65-af497b9fa8c1",
            "fixtureId": "id1000004461512432",
            "outcomeId": 103,
            "playerId": 0,
            "orderStake": 10.0,
            "orderPrice": 1.95,
            "userRef": "my-strategy-1",
            "testOrder": false
          }
        ]
      }' \
      https://v2.55-tech.com/place-orders
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import uuid, requests

    resp = requests.post(
        "https://v2.55-tech.com/place-orders",
        headers={"x-api-key": "YOUR_API_KEY"},
        json={"orders": [{
            "requestUuid": str(uuid.uuid4()),
            "fixtureId": "id1000004461512432",
            "outcomeId": 103,
            "playerId": 0,
            "orderStake": 10.0,
            "orderPrice": 1.95,
            "userRef": "my-strategy-1",
            "testOrder": False,
        }]},
    )
    print(resp.json())
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    import { randomUUID } from "crypto";

    const resp = await fetch("https://v2.55-tech.com/place-orders", {
      method: "POST",
      headers: {
        "x-api-key": "YOUR_API_KEY",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        orders: [{
          requestUuid: randomUUID(),
          fixtureId: "id1000004461512432",
          outcomeId: 103,
          playerId: 0,
          orderStake: 10.0,
          orderPrice: 1.95,
          userRef: "my-strategy-1",
          testOrder: false,
        }],
      }),
    });
    console.log(await resp.json());
    ```
  </Tab>
</Tabs>

**Key fields:**

| Field                | Required | Description                                                                                                |
| -------------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| `requestUuid`        | Yes      | Unique UUID for idempotency (a duplicate within 30 min is skipped; 409 only if every order is a duplicate) |
| `fixtureId`          | Yes      | OddsPapi fixture ID                                                                                        |
| `outcomeId`          | Yes      | Market outcome (e.g., 103 = away win)                                                                      |
| `playerId`           | Yes      | Set to `0` for non-player-prop markets                                                                     |
| `orderStake`         | Yes      | Total amount to wager                                                                                      |
| `orderPrice`         | Yes      | Minimum acceptable decimal odds                                                                            |
| `userRef`            | Yes      | Your reference for grouping related orders                                                                 |
| `testOrder`          | Yes      | Validate only, don't actually place (`false` for real bets)                                                |
| `bookmakers`         | No       | Comma-separated slugs to target (omit for automatic selection)                                             |
| `orderCurrency`      | No       | Currency code (default: `USD`)                                                                             |
| `acceptBetterOdds`   | No       | Accept odds better than `orderPrice` (default: `true`)                                                     |
| `acceptPartialStake` | No       | Allow partial fills (default: `true`)                                                                      |
| `back`               | No       | Back bet (`true`) or lay bet (`false`) (default: `true`)                                                   |
| `expiresAt`          | No       | ISO 8601 expiry time (default: 5 seconds from now)                                                         |
| `meta`               | No       | Custom metadata object (stored but not sent to bookmaker)                                                  |

**Response:**

```json theme={null}
{
  "status": "accepted",
  "acceptedOrders": [
    {
      "orderId": 327,
      "requestUuid": "eb45b192-317b-42d5-9f65-af497b9fa8c1",
      "orderStatus": "FILLED",
      "fixtureId": "id1000004461512432",
      "outcomeId": 103,
      "orderStake": 10.0,
      "orderPrice": 1.95,
      "filledStake": 10.0,
      "bets": [
        {
          "betId": 73,
          "bookmaker": "pinnacle",
          "placedPrice": 1.98,
          "placedStake": 10.0,
          "betStatus": "CONFIRMED"
        }
      ]
    }
  ],
  "declinedOrders": []
}
```

Orders that fail validation appear in `declinedOrders` with a `declineReason`:

```json theme={null}
{
  "status": "declined",
  "acceptedOrders": [],
  "declinedOrders": [
    {
      "requestUuid": "fb5f2dd9-c855-4ba9-8ef9-4c2278ca2f1d",
      "fixtureId": "id1000004461512432",
      "outcomeId": 103,
      "declineReason": "Order stake 100.00 USD exceeds available limit 50.00 USD"
    }
  ]
}
```

<Tip>
  **Test without staking real money.** Set `testOrder: true` to run the full validation and routing path (limits, price checks, account selection) **without** sending a bet to the bookmaker. It's the fastest way to confirm your payloads and IDs are correct before going live.
</Tip>

## Step 4: Track your order

Query orders by `userRef`, `orderIds`, or `requestUuids` (at least one filter required):

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://v2.55-tech.com/orders?userRef=my-strategy-1"
```

View individual bets for specific orders:

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://v2.55-tech.com/bets?orderIds=327"
```

Each bet includes the bookmaker, placed price, placed stake, bet status, and settlement status:

```json theme={null}
{
  "status": "success",
  "bets": [
    {
      "betId": 73,
      "orderId": 327,
      "bookmaker": "pinnacle",
      "bookmakerBetId": "3332684214",
      "placedStake": 10.0,
      "placedPrice": 1.98,
      "placedCurrency": "USD",
      "betStatus": "CONFIRMED",
      "settlementStatus": "UNSETTLED",
      "account": "pinnacle_main",
      "userRef": "my-strategy-1"
    }
  ],
  "count": 1,
  "hasMore": false,
  "nextCursor": null
}
```

## Step 5: Check positions & PnL

View your aggregated open positions (grouped by bookmaker by default):

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  https://v2.55-tech.com/positions
```

```json theme={null}
{
  "status": "success",
  "groupBy": "bookmaker",
  "positions": [
    { "bookmaker": "pinnacle", "openBets": 5, "totalStake": 250.0, "avgPrice": 1.92 }
  ],
  "count": 1,
  "totalStake": 250.0,
  "totalOpenBets": 5
}
```

View profit and loss:

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  https://v2.55-tech.com/pnl
```

```json theme={null}
{
  "status": "success",
  "groupBy": "bookmaker",
  "pnl": [
    { "bookmaker": "pinnacle", "settledBets": 42, "wins": 23, "losses": 17, "netPnl": 250.0, "winRate": 54.8 }
  ],
  "count": 1,
  "totalNetPnl": 250.0,
  "totalStaked": 2100.0,
  "totalSettledBets": 42
}
```

## Next steps

<Columns cols={2}>
  <Card title="Core Concepts" icon="lightbulb" href="/abp-api/concepts">
    Orders vs bets, identifiers, idempotency, and lifecycles.
  </Card>

  <Card title="Order Placement" icon="bullseye-arrow" href="/abp-api/order-placement">
    Fills, pricing, and the limit cascade.
  </Card>

  <Card title="WebSocket updates" icon="bolt" href="/abp-api/websocket">
    Real-time order, bet, and settlement updates.
  </Card>

  <Card title="Recipes" icon="book-open" href="/abp-api/order-placement#recipes">
    Copy-paste patterns for common integrations.
  </Card>
</Columns>
