# bankroll

Read your own bankroll and the limits you set, with your own key or a token you granted an AI app, and import a book's history with your own key.

| Method | Path | Title | Access | Price | MCP tool |
| --- | --- | --- | --- | --- | --- |
| GET | [`/v1/me/bankroll`](#get-my-bankroll) | Get your bankroll | `read:tracker` | 0 | `get_my_bankroll` |
| GET | [`/v1/me/league-money`](#get-my-league-money) | Get your league money | `read:tracker` | 0 | `get_my_league_money` |
| GET | [`/v1/me/limits`](#check-my-limits) | Check your limits | `read:tracker` | 0 | `check_my_limits` |
| POST | [`/v1/me/books/{book_id}/import`](#import-book-history) | Import a book's history | `write:tracker` | 0 | none |

`GET /v1/me/bankroll`

## Get your bankroll
scope `read:tracker` · 0 credits, not charged during the beta · MCP tool `get_my_bankroll` · status live

Your bankroll from your Kelly account: the total, each book or cash pot, money at risk, this week's, month's and year's betting result and the drawdown from the highest point. Deposits never count as winnings. Your own figures and IDs only: no note, cash-pot label or project name. Needs your own key or an OAuth token with read:tracker. Read only: the bankroll is written on askkelly.ai. Test-mode keys read the same account as live ones (it is your own data, not market data).

### Response
`200` Your bankroll.

- `object` const · required  
  Always bankroll.  
  Always `"bankroll"`.
- `bankroll` object · required  
  Your bankroll: your own figures and IDs, with no note, cash-pot label or project name (the facts Kelly MCP's get_my_bankroll returns).
  - `currency` string · required  
    The account's currency, such as USD.
  - `source` string · required · nullable  
    Where the bankroll comes from: ledger (your pots and entries), settings (the bankroll typed in Settings) or null (none recorded). The envelope's source is the response's.
  - `bankroll_minor` integer · required · nullable  
    Bankroll now: cash plus money at risk; null when none is recorded. In cents.
  - `cash_minor` integer · nullable  
    Cash across the pots; null without pots. In cents.
  - `at_risk_minor` integer · nullable  
    Money at risk in open bets; null without pots. In cents.
  - `pots` array of object · required  
    The open pots, oldest first.
    - `id` string  
      The pot's ID (pot_).
    - `kind` string  
      book, exchange, prediction_market or cash.
    - `name` string  
      The book's name, or cash (a cash pot's own label stays on askkelly.ai).
    - `balance_minor` integer  
      Cash plus money at risk. In cents.
    - `cash_minor` integer  
      Cash in the pot. In cents.
    - `at_risk_minor` integer  
      Stakes of open bets. In cents.
    - `last_checked_at` string · nullable  
      The pot's last balance check, or null.  
      format date-time
  - `projects` array of object  
    Each project with a bankroll share.
    - `id` string  
      The project's ID (proj_); its name stays on askkelly.ai.  
      pattern ^proj_[0123456789abcdefghjkmnpqrstvwxyz]{20}$
    - `share` number  
      Its share of the bankroll, 0 to 1.
    - `bankroll_minor` integer · nullable  
      That share of the bankroll; null while the bankroll is not above 0. In cents.
  - `unclaimed_share` number  
    The share no project claims, 0 to 1.
  - `result` object · required  
    The betting result this week, month and year.
    - `week` object  
      One period, in the person's time zone.
      - `start` string  
        The period's start.  
        format date-time
      - `end` string  
        The period's end (exclusive).  
        format date-time
      - `result_minor` integer  
        Betting result: the change in bankroll less deposits and withdrawals. In cents.
      - `deposits_minor` integer  
        Deposits in the period. In cents.
      - `withdrawals_minor` integer  
        Withdrawals in the period. In cents.
    - `month` object  
      One period, in the person's time zone.
      - `start` string  
        The period's start.  
        format date-time
      - `end` string  
        The period's end (exclusive).  
        format date-time
      - `result_minor` integer  
        Betting result: the change in bankroll less deposits and withdrawals. In cents.
      - `deposits_minor` integer  
        Deposits in the period. In cents.
      - `withdrawals_minor` integer  
        Withdrawals in the period. In cents.
    - `year` object  
      One period, in the person's time zone.
      - `start` string  
        The period's start.  
        format date-time
      - `end` string  
        The period's end (exclusive).  
        format date-time
      - `result_minor` integer  
        Betting result: the change in bankroll less deposits and withdrawals. In cents.
      - `deposits_minor` integer  
        Deposits in the period. In cents.
      - `withdrawals_minor` integer  
        Withdrawals in the period. In cents.
  - `drawdown` object · required  
    The fall from the highest cumulative betting result.
    - `peak_result_minor` integer  
      The highest cumulative result. In cents.
    - `drawdown_minor` integer  
      The fall from it to now. In cents.
    - `share` number  
      That fall's share of the bankroll at the peak, 0 to 1.
  - `timezone` string · required  
    Your time zone (IANA), which sets the periods.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `request_id` string · nullable  
  The request that produced this response.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled)

### Example
```http
GET https://api.askkelly.ai/v1/me/bankroll
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/insufficient_scope",
  "title": "Insufficient scope",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "This needs the read:tracker scope.",
  "param": "read:tracker",
  "doc_url": "https://docs.askkelly.ai/problems/insufficient_scope",
  "request_id": "req_91a011dfa638e65883fbb907",
  "retryable": false,
  "display_message": "This app needs one more permission to do that."
}
```

```http
GET https://api.askkelly.ai/v1/me/bankroll
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "bankroll",
  "bankroll": {
    "currency": "USD",
    "source": "ledger",
    "bankroll_minor": 50000,
    "cash_minor": 50000,
    "at_risk_minor": 0,
    "projects": [],
    "unclaimed_share": 1,
    "result": {
      "week": {
        "start": "2026-09-28T04:00:00+00:00",
        "end": "2026-10-05T04:00:00+00:00",
        "result_minor": 0,
        "deposits_minor": 0,
        "withdrawals_minor": 0
      },
      "month": {
        "start": "2026-10-01T04:00:00+00:00",
        "end": "2026-11-01T04:00:00+00:00",
        "result_minor": 0,
        "deposits_minor": 0,
        "withdrawals_minor": 0
      },
      "year": {
        "start": "2026-01-01T05:00:00+00:00",
        "end": "2027-01-01T05:00:00+00:00",
        "result_minor": 0,
        "deposits_minor": 0,
        "withdrawals_minor": 0
      }
    },
    "drawdown": {
      "peak_result_minor": 0,
      "drawdown_minor": 0,
      "share": 0
    },
    "timezone": "America/New_York",
    "pots": [
      {
        "id": "pot_bay7vm65jgk4qta0haar",
        "kind": "cash",
        "name": "cash",
        "balance_minor": 50000,
        "cash_minor": 50000,
        "at_risk_minor": 0,
        "last_checked_at": null
      }
    ]
  },
  "as_of": "2026-10-04T17:30:00+00:00",
  "source": "kelly",
  "request_id": "req_aca7b23c239ec5e3450557f3"
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00+00:00

`GET /v1/me/league-money`

## Get your league money
scope `read:tracker` · 0 credits, not charged during the beta · MCP tool `get_my_league_money` · status live

The money you put into and took out of your fantasy leagues, from your Kelly account: dues, side pots and winnings by league and season, net and ROI, winnings by tax year, each league's payout table and a commissioner's ledger of what each team paid. Kept apart from your bankroll. Your own figures and IDs, and connected leagues' names; a league you named yourself reads by its key. Needs your own key or an OAuth token with read:tracker. Read only: league money is recorded on askkelly.ai or through Kelly MCP. Test-mode keys read the same account as live ones.

### Response
`200` Your league money.

- `object` const · required  
  Always league_money.  
  Always `"league_money"`.
- `league_money` object · required  
  The person's league money.
  - `currency` string  
    The account's currency.
  - `leagues` array of object  
    Each league.
    - `key` string  
      A stable key for the league across seasons.
    - `name` string · nullable  
      The platform's name for a connected league; null for one the person named.
    - `seasons` array of object  
      Its seasons, oldest first.
      - `season` integer  
        The season.
      - `league_id` string · nullable  
        The connected league (lg_…), or null for one the person named.
      - `dues_minor` integer  
        Dues paid. In cents.
      - `side_pots_minor` integer  
        Side pots paid. In cents.
      - `paid_minor` integer  
        Dues plus side pots. In cents.
      - `winnings_minor` integer  
        Winnings taken out. In cents.
      - `net_minor` integer  
        Winnings less paid. In cents.
      - `roi` number · nullable  
        Net over paid; null with nothing paid.
      - `members` array of object  
        A commissioner's ledger: each team's paid_minor, payout_minor and owed_minor.
    - `paid_minor` integer  
      Paid in, every season. In cents.
    - `winnings_minor` integer  
      Won, every season. In cents.
    - `net_minor` integer  
      Net, every season. In cents.
    - `roi` number · nullable  
      Net over paid.
    - `seasons_in_profit` integer  
      Seasons with a positive net.
  - `totals` object  
    paid_minor, winnings_minor, net_minor and roi across every league.
  - `tax_years` array of object  
    Per calendar year: winnings_minor received, paid_minor, and the payer's 1099-MISC reporting floor in cents where known.
  - `payouts` array of object  
    Each league-season's payout table: dues_minor, places_minor, weekly_high_minor, regular_season_winner_minor, teams and pot_minor.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `request_id` string · nullable  
  The request that produced this response.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled)

### Example
```http
GET https://api.askkelly.ai/v1/me/league-money
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/insufficient_scope",
  "title": "Insufficient scope",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "This needs the read:tracker scope.",
  "param": "read:tracker",
  "doc_url": "https://docs.askkelly.ai/problems/insufficient_scope",
  "request_id": "req_13d4ca020bf6ffcf0e331267",
  "retryable": false,
  "display_message": "This app needs one more permission to do that."
}
```

```http
GET https://api.askkelly.ai/v1/me/league-money
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "league_money",
  "league_money": {
    "currency": "USD",
    "leagues": [
      {
        "key": "lm_ee70df6638",
        "name": null,
        "seasons": [
          {
            "season": 2025,
            "league_id": null,
            "dues_minor": 10000,
            "side_pots_minor": 0,
            "paid_minor": 10000,
            "winnings_minor": 35000,
            "net_minor": 25000,
            "roi": 2.5,
            "members": []
          },
          {
            "season": 2026,
            "league_id": null,
            "dues_minor": 10000,
            "side_pots_minor": 0,
            "paid_minor": 10000,
            "winnings_minor": 0,
            "net_minor": -10000,
            "roi": -1,
            "members": []
          }
        ],
        "paid_minor": 20000,
        "winnings_minor": 35000,
        "net_minor": 15000,
        "roi": 0.75,
        "seasons_in_profit": 1
      }
    ],
    "totals": {
      "paid_minor": 20000,
      "winnings_minor": 35000,
      "net_minor": 15000,
      "roi": 0.75
    },
    "tax_years": [
      {
        "year": 2025,
        "winnings_minor": 0,
        "paid_minor": 10000,
        "payer_reporting_floor_minor": 60000
      },
      {
        "year": 2026,
        "winnings_minor": 35000,
        "paid_minor": 10000,
        "payer_reporting_floor_minor": 200000
      }
    ],
    "payouts": []
  },
  "as_of": "2026-10-04T17:30:00+00:00",
  "source": "kelly",
  "request_id": "req_b7cda6c47a006cfdccac717d"
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00+00:00

`GET /v1/me/limits`

## Check your limits
scope `read:tracker` · 0 credits, not charged during the beta · MCP tool `check_my_limits` · status live

The loss, deposit, at-risk and drawdown limits you set on your Kelly account and its projects, with how much of each is used and left now. Pass `stake_minor` to see each as it would stand with that stake placed, and `project_id` to include that project's limits. Needs your own key or an OAuth token with read:tracker. Read only: limits are set on askkelly.ai. Test-mode keys read the same account as live ones.

### Parameters
- `stake_minor` integer · query  
  A stake to test, in cents: each limit as it would stand with it placed (deposit limits don't move).  
  min 0
- `project_id` string · query  
  A project of yours (proj_): with stake_minor, its limits are tested too.  
  pattern ^proj_[0123456789abcdefghjkmnpqrstvwxyz]{20}$

### Response
`200` Your limits and where they stand.

- `object` const · required  
  Always limits.  
  Always `"limits"`.
- `limits` object · required  
  Your limits on the account and its projects, used and left now, or with a stake you are testing. Your own numbers only; a project reads as its ID (the facts Kelly MCP's check_my_limits returns).
  - `account` object · required  
    The account's limits, in currency units.
    - `day` number · nullable  
      The day limit in currency units, or null when unset.
    - `week` number · nullable  
      The week limit in currency units, or null when unset.
    - `month` number · nullable  
      The month limit in currency units, or null when unset.
    - `season` number · nullable  
      The season limit in currency units, or null when unset.
    - `at_risk` number · nullable  
      The at risk limit in currency units, or null when unset.
    - `deposit_day` number · nullable  
      The deposit day limit in currency units, or null when unset.
    - `deposit_week` number · nullable  
      The deposit week limit in currency units, or null when unset.
    - `deposit_month` number · nullable  
      The deposit month limit in currency units, or null when unset.
    - `drawdown` number · nullable  
      The drawdown limit in currency units, or null when unset.
    - `season_start` string · nullable  
      The day the season limit's year starts; null for the calendar year.  
      format date
    - `raised` object  
      Raises and clears waiting, by limit.
  - `projects` array of object · required  
    Each open project's limits.
    - `id` string  
      The project's ID (proj_); its name stays on askkelly.ai.  
      pattern ^proj_[0123456789abcdefghjkmnpqrstvwxyz]{20}$
    - `limits` object  
      The project's limits, in currency units.
      - `day` number · nullable  
        The day limit in currency units, or null when unset.
      - `week` number · nullable  
        The week limit in currency units, or null when unset.
      - `month` number · nullable  
        The month limit in currency units, or null when unset.
      - `season` number · nullable  
        The season limit in currency units, or null when unset.
      - `at_risk` number · nullable  
        The at risk limit in currency units, or null when unset.
      - `deposit_day` number · nullable  
        The deposit day limit in currency units, or null when unset.
      - `deposit_week` number · nullable  
        The deposit week limit in currency units, or null when unset.
      - `deposit_month` number · nullable  
        The deposit month limit in currency units, or null when unset.
      - `drawdown` number · nullable  
        The drawdown limit in currency units, or null when unset.
      - `season_start` string · nullable  
        The day the season limit's year starts; null for the calendar year.  
        format date
      - `raised` object  
        Raises and clears waiting, by limit.
  - `stake_minor` integer · required · nullable  
    The stake tested, or null. In cents.
  - `project_id` string · required · nullable  
    The project the stake is in, or null.  
    pattern ^proj_[0123456789abcdefghjkmnpqrstvwxyz]{20}$
  - `status` array of object · required  
    Each limit set: the account's, then each project's. With stake_minor, the account's and project_id's only.
    - `scope` string  
      account or project.  
      One of: `account`, `project` (open: new values may be added).
    - `project_id` string · nullable  
      The project, for a project's limit.  
      pattern ^proj_[0123456789abcdefghjkmnpqrstvwxyz]{20}$
    - `limit` string  
      Which limit: day, week, month, season, at_risk, deposit_day, deposit_week, deposit_month or drawdown.
    - `kind` string  
      What it measures: loss, deposit, at_risk or drawdown.
    - `period` string · nullable  
      The period it runs in: day, week, month or season; null for at_risk and drawdown.
    - `start` string · nullable  
      The period's start.  
      format date-time
    - `end` string · nullable  
      The period's end (exclusive).  
      format date-time
    - `limit_minor` integer  
      The limit. In cents.
    - `used_minor` integer  
      How much is used (with stake_minor: as if that stake were placed). In cents.
    - `left_minor` integer  
      How much is left, never below 0. In cents.
    - `reached` boolean  
      Used is at or past the limit.
    - `raise` object · nullable  
      A raise or clear waiting, or null.
      - `limit_minor` integer · nullable  
        The raised limit; null for a clear. In cents.
      - `starts` string  
        When it takes effect.  
        format date-time
  - `any_reached` boolean · required  
    Whether any limit in status is reached.
  - `timezone` string · required  
    Your time zone (IANA), which sets the periods.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `request_id` string · nullable  
  The request that produced this response.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/me/limits?project_id=proj_00000000000000000000
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No project with that project_id is yours.",
  "param": "project_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_193408d6d05d8a65c5b14a74",
  "retryable": false,
  "display_message": "That could not be found."
}
```

```http
GET https://api.askkelly.ai/v1/me/limits?stake_minor=2500
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "limits",
  "limits": {
    "account": {
      "day": null,
      "week": 100,
      "month": null,
      "season": null,
      "at_risk": 20,
      "deposit_day": null,
      "deposit_week": null,
      "deposit_month": null,
      "drawdown": null,
      "season_start": null,
      "raised": {}
    },
    "projects": [],
    "stake_minor": 2500,
    "project_id": null,
    "status": [
      {
        "scope": "account",
        "project_id": null,
        "limit": "week",
        "kind": "loss",
        "period": "week",
        "start": "2026-09-28T04:00:00+00:00",
        "end": "2026-10-05T04:00:00+00:00",
        "limit_minor": 10000,
        "used_minor": 2500,
        "left_minor": 7500,
        "reached": false,
        "raise": null
      },
      {
        "scope": "account",
        "project_id": null,
        "limit": "at_risk",
        "kind": "at_risk",
        "period": null,
        "start": null,
        "end": null,
        "limit_minor": 2000,
        "used_minor": 2500,
        "left_minor": 0,
        "reached": true,
        "raise": null
      }
    ],
    "any_reached": true,
    "timezone": "America/New_York"
  },
  "as_of": "2026-10-04T17:30:00+00:00",
  "source": "kelly",
  "request_id": "req_f70e5fac7bfba473a7cbec90"
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00+00:00

`POST /v1/me/books/{book_id}/import`

## Import a book's history
scope `write:tracker` · 0 credits, not charged during the beta · status live

Imports the transaction history CSV your book lets you download into that book's bankroll pot: its deposits, withdrawals and bonuses, each row once, however often you send the file. Bets and payouts in the file are left to your bet log. Rows before the pot's opening balance are skipped, a balance check you recorded still reads what you saw, and the file's newest balance, when it has a balance column, is recorded as a balance check. Send dry_run to see the report without writing. Needs your own live API key with write:tracker; an AI app can't import, and a test-mode key can't change your bankroll.

### Parameters
- `book_id` string · path · required  
  One of your books (abk_…), a book Kelly carries. Anyone else's book, or one that doesn't exist, answers not_found.  
  pattern ^abk_[0123456789abcdefghjkmnpqrstvwxyz]{20}$

Body, `application/json` (required):

- `csv` string  
  The CSV file's text, as the book exported it. The whole request is at most 4 MB.  
  min length 1
- `columns` object  
  The header of any column the file names differently from the usual names.
  - `date` string  
    The date column's header.
  - `type` string  
    The type column's header.
  - `amount` string  
    The amount column's header.
  - `credit` string  
    The credit column's header.
  - `debit` string  
    The debit column's header.
  - `balance` string  
    The balance column's header.
  - `id` string  
    The id column's header.
- `kinds` object  
  What a type cell means, as the file writes it: deposit, withdrawal, bonus or skip.
- `timezone` string  
  The IANA zone for times without one; default your time zone preference, else America/New_York.  
  max length 64
- `dry_run` boolean  
  Report without writing.  
  default false

### Response
`200` A dry run: what would be written.

- `object` const · required  
  Always book_import.  
  Always `"book_import"`.
- `book_id` string · required  
  Your book (abk_…).  
  pattern ^abk_[0123456789abcdefghjkmnpqrstvwxyz]{20}$
- `pot_id` string · required · nullable  
  The book's bankroll pot (pot_…), made by the import when the book had none; null on a dry run before it exists.
- `dry_run` boolean · required  
  True when nothing was written.
- `currency` const · required  
  The bankroll's currency.  
  Always `"USD"`.
- `timezone` string · required  
  The IANA zone times without one were read in.
- `columns` object · required  
  The file's header for each column it read, by role.
  - `date` string  
    The header read as the date column.
  - `type` string  
    The header read as the type column.
  - `amount` string  
    The header read as the amount column.
  - `credit` string  
    The header read as the credit column.
  - `debit` string  
    The header read as the debit column.
  - `balance` string  
    The header read as the balance column.
  - `id` string  
    The header read as the id column.
- `lines` integer · required  
  Lines after the header, blank ones included.  
  min 0
- `imported` object · required  
  How many rows of each kind were written (or would be, on a dry run).
  - `deposits` integer · required  
    Deposits.  
    min 0
  - `withdrawals` integer · required  
    Withdrawals.  
    min 0
  - `bonuses` integer · required  
    Bonuses.  
    min 0
- `amounts` object · required  
  What those rows add up to, in minor units of currency, each as a positive amount.
  - `deposits_minor` integer · required  
    Money deposited.  
    min 0
  - `withdrawals_minor` integer · required  
    Money withdrawn.  
    min 0
  - `bonuses_minor` integer · required  
    Bonuses credited, net of any the file shows taken back.  
    min 0
- `skipped` object · required  
  Rows not written, by reason.
  - `duplicate` integer · required  
    Already imported, from this file or an earlier one.  
    min 0
  - `before_pot` integer · required  
    Dated before the pot's opening balance, which already holds them.  
    min 0
  - `future` integer · required  
    Dated after now.  
    min 0
  - `not_money` integer · required  
    Not a deposit, withdrawal or bonus: bets, payouts, and reversed, cancelled, failed, declined, rejected, pending or void rows.  
    min 0
  - `invalid` integer · required  
    A date, amount or balance that couldn't be read; problems lists the first of them.  
    min 0
- `restated_checks` integer · required  
  Balance checks you recorded that were recorded again with the same balance and time, so each still reads what you saw.  
  min 0
- `balance_check` one of several shapes · required  
  The balance check recorded from the file's newest balance, or null when the file has no balance column or the pot already has a newer balance.
- `cash_minor` integer · required  
  The pot's cash after the import, in minor units.
- `at_risk_minor` integer · required  
  The pot's money at risk in open bets, in minor units.
- `problems` array of object · required  
  The first rows that couldn't be read, by line and field; never their content.  
  max items 20
  - `line` integer · required  
    The line in the file, from 1.  
    min 1
  - `field` string · required  
    The field that couldn't be read.  
    One of: `date`, `amount`, `balance` (open: new values may be added).

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found) · [`payload_too_large`](/problems/payload_too_large)

### Example
```http
POST https://api.askkelly.ai/v1/me/books/abk_mw4vhfqmsjrkc3j2rq87/import
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "csv": "Sample Book transaction history (sample)\nDate,Type,Amount,Balance,Transaction ID\n2026-09-06 10:15,Deposit,$200.00,200.00,S-1001\n2026-09-06 13:00,Bet Placed,-50.00,150.00,S-1002\n2026-09-07 09:30,Bonus,25.00,175.00,S-1003\n2026-09-20 18:45,Withdrawal,-100.00,75.00,S-1004\n2026-09-21 08:00,Deposit Cancelled,50.00,75.00,S-1005\n",
  "dry_run": true
}
```

```json
{
  "object": "book_import",
  "book_id": "abk_mw4vhfqmsjrkc3j2rq87",
  "pot_id": "pot_gbdhn3h9c9hqvp2jkq17",
  "dry_run": true,
  "currency": "USD",
  "timezone": "America/New_York",
  "columns": {
    "date": "Date",
    "type": "Type",
    "amount": "Amount",
    "balance": "Balance",
    "id": "Transaction ID"
  },
  "lines": 5,
  "imported": {
    "deposits": 0,
    "withdrawals": 0,
    "bonuses": 0
  },
  "amounts": {
    "deposits_minor": 0,
    "withdrawals_minor": 0,
    "bonuses_minor": 0
  },
  "skipped": {
    "duplicate": 3,
    "before_pot": 0,
    "future": 0,
    "not_money": 2,
    "invalid": 0
  },
  "restated_checks": 0,
  "balance_check": null,
  "cash_minor": 7500,
  "at_risk_minor": 0,
  "problems": []
}
```

```http
POST https://api.askkelly.ai/v1/me/books/abk_mw4vhfqmsjrkc3j2rq87/import
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "csv": "Sample Book transaction history (sample)\nDate,Type,Amount,Balance,Transaction ID\n2026-09-06 10:15,Deposit,$200.00,200.00,S-1001\n2026-09-06 13:00,Bet Placed,-50.00,150.00,S-1002\n2026-09-07 09:30,Bonus,25.00,175.00,S-1003\n2026-09-20 18:45,Withdrawal,-100.00,75.00,S-1004\n2026-09-21 08:00,Deposit Cancelled,50.00,75.00,S-1005\n"
}
```

```json
{
  "object": "book_import",
  "book_id": "abk_mw4vhfqmsjrkc3j2rq87",
  "pot_id": "pot_gbdhn3h9c9hqvp2jkq17",
  "dry_run": false,
  "currency": "USD",
  "timezone": "America/New_York",
  "columns": {
    "date": "Date",
    "type": "Type",
    "amount": "Amount",
    "balance": "Balance",
    "id": "Transaction ID"
  },
  "lines": 5,
  "imported": {
    "deposits": 1,
    "withdrawals": 1,
    "bonuses": 1
  },
  "amounts": {
    "deposits_minor": 20000,
    "withdrawals_minor": 10000,
    "bonuses_minor": 2500
  },
  "skipped": {
    "duplicate": 0,
    "before_pot": 0,
    "future": 0,
    "not_money": 2,
    "invalid": 0
  },
  "restated_checks": 0,
  "balance_check": {
    "id": "bke_34vd2dbdgsh8pdwkbk0r",
    "balance_minor": 7500,
    "occurred_at": "2026-09-21T12:00:00+00:00"
  },
  "cash_minor": 7500,
  "at_risk_minor": 0,
  "problems": []
}
```

```http
POST https://api.askkelly.ai/v1/me/books/abk_mw4vhfqmsjrkc3j2rq87/import
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "csv": "Sample Book transaction history (sample)\nDate,Type,Amount,Balance,Transaction ID\n2026-09-06 10:15,Deposit,$200.00,200.00,S-1001\n2026-09-06 13:00,Bet Placed,-50.00,150.00,S-1002\n2026-09-07 09:30,Bonus,25.00,175.00,S-1003\n2026-09-20 18:45,Withdrawal,-100.00,75.00,S-1004\n2026-09-21 08:00,Deposit Cancelled,50.00,75.00,S-1005\n"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/insufficient_scope",
  "title": "Insufficient scope",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "This needs the write:tracker scope.",
  "param": "write:tracker",
  "doc_url": "https://docs.askkelly.ai/problems/insufficient_scope",
  "request_id": "req_9669d164d5edcd66d6de08af",
  "retryable": false,
  "display_message": "This app needs one more permission to do that."
}
```

```http
POST https://api.askkelly.ai/v1/me/books/abk_00000000000000000000/import
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "csv": "Sample Book transaction history (sample)\nDate,Type,Amount,Balance,Transaction ID\n2026-09-06 10:15,Deposit,$200.00,200.00,S-1001\n2026-09-06 13:00,Bet Placed,-50.00,150.00,S-1002\n2026-09-07 09:30,Bonus,25.00,175.00,S-1003\n2026-09-20 18:45,Withdrawal,-100.00,75.00,S-1004\n2026-09-21 08:00,Deposit Cancelled,50.00,75.00,S-1005\n"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No book with that book_id is yours.",
  "param": "book_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_fcb0f8204486f856a40f5811",
  "retryable": false,
  "display_message": "That could not be found."
}
```

Generated from Kelly API 2026-10-05.

---

Generated from Kelly API 2026-10-05

Support: support@askkelly.ai · Security and disclosure: https://docs.askkelly.ai/security

Data is the edge. Odds are information, not advice · 21+ · Get help
