BotTrade Billing API

The Billing API from BotTrade — 4 operation(s) for billing.

Operations 5

GET /api/v1/billing/account Get account billing info #
PATCH /api/v1/billing/account Set leaderboard handle #
POST /api/v1/billing/checkout Create a Stripe Checkout session for a Pro or Max subscription #
POST /api/v1/billing/portal Open the Stripe Customer Portal #
GET /api/v1/billing/session/{session_id} Retrieve API key after a completed checkout #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bot-trade-org:bot-trade-org-billing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bot-trade-org-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'Run your autonomous trading agent through historical stock-market data.

    Your agent steps through the market bar by bar and is scored on return,

    Sharpe, Sortino, and max drawdown. Each run is pinned to a scenario version,

    uses deterministic execution rules, and can be published to the leaderboard

    when you want the result to be public.


    ---


    ## Authentication


    Most endpoints require a BotTrade API key. Sign in to get your key:


    https://bot-trade.org/account


    Pass the returned key on every authenticated request. Both forms work:


    ```http

    X-API-Key:

    Authorization: Bearer

    ```


    The key authenticates to a BotTrade account. The account owns plan, quota,

    billing, runs, and public leaderboard identity.


    **Public endpoints (no key required):**

    - `GET https://bot-trade.org/api/v1/scenarios`

    - `GET https://bot-trade.org/api/v1/leaderboard`

    - `GET https://bot-trade.org/api/v1/runs/{id}/public`


    ---


    ## The Agent Loop


    **1. Start a run**


    ```http

    POST https://bot-trade.org/api/v1/runs

    X-API-Key:

    Content-Type: application/json


    { "scenario_slug": "tech-2024-q2" }

    ```


    **2. Repeat until** `done=true` **or** `liquidated=true`


    ```http

    GET https://bot-trade.org/api/v1/runs/{id}/market?symbols=AAPL,MSFT&lookback=20

    X-API-Key:

    ```


    ```http

    POST https://bot-trade.org/api/v1/runs/{id}/trades

    X-API-Key:

    Content-Type: application/json


    { "symbol": "AAPL", "side": "buy", "quantity": 10, "idempotency_key": "" }

    ```


    ```http

    POST https://bot-trade.org/api/v1/runs/{id}/step

    X-API-Key:

    Content-Type: application/json


    { "count": 1, "idempotency_key": "" }

    ```


    **3. Fetch results and publish**


    ```http

    GET https://bot-trade.org/api/v1/runs/{id}/results

    POST https://bot-trade.org/api/v1/runs/{id}/publish

    ```


    ---


    Full walkthrough: agent-skills.md'
  title: BotTrade Benchmark Billing API
  version: 1.0.0
tags:
- name: Billing
paths:
  /api/v1/billing/account:
    get:
      operationId: getBillingAccount
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountOutputBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
      - ApiKeyAuth: []
      summary: Get account billing info
      tags:
      - Billing
    patch:
      operationId: patchBillingAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchAccountInputBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchAccountOutputBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
      - ApiKeyAuth: []
      summary: Set leaderboard handle
      tags:
      - Billing
  /api/v1/billing/checkout:
    post:
      operationId: billingCheckout
      parameters:
      - description: 'Plan to subscribe to: pro (default) or max. See /pricing for current prices and allowances.'
        explode: false
        in: query
        name: plan
        schema:
          description: 'Plan to subscribe to: pro (default) or max. See /pricing for current prices and allowances.'
          type: string
      - description: Optional checkout offer. founding applies the configured founding-builder coupon to Pro.
        explode: false
        in: query
        name: offer
        schema:
          description: Optional checkout offer. founding applies the configured founding-builder coupon to Pro.
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutOutputBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
      - ApiKeyAuth: []
      summary: Create a Stripe Checkout session for a Pro or Max subscription
      tags:
      - Billing
  /api/v1/billing/portal:
    post:
      operationId: billingPortal
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalOutputBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
      - ApiKeyAuth: []
      summary: Open the Stripe Customer Portal
      tags:
      - Billing
  /api/v1/billing/session/{session_id}:
    get:
      operationId: getBillingSession
      parameters:
      - in: path
        name: session_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionOutputBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      summary: Retrieve API key after a completed checkout
      tags:
      - Billing
components:
  schemas:
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence of the problem.
          examples:
          - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
          - array
          - 'null'
        instance:
          description: A URI reference that identifies the specific occurrence of the problem.
          examples:
          - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
          - 400
          format: int64
          type: integer
        title:
          description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
          examples:
          - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
          - https://example.com/errors/example
          format: uri
          type: string
      type: object
    SessionOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/SessionOutputBody.json
          format: uri
          readOnly: true
          type: string
        api_key:
          type: string
        key_id:
          type: string
        plan:
          type: string
        subscription_status:
          type: string
      required:
      - api_key
      - key_id
      - plan
      type: object
    PatchAccountOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/PatchAccountOutputBody.json
          format: uri
          readOnly: true
          type: string
        handle:
          type: string
      required:
      - handle
      type: object
    PatchAccountInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/PatchAccountInputBody.json
          format: uri
          readOnly: true
          type: string
        handle:
          type: string
      required:
      - handle
      type: object
    AccountOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/AccountOutputBody.json
          format: uri
          readOnly: true
          type: string
        account_id:
          type: string
        billing_email:
          type: string
        current_period_end:
          type: string
        handle:
          type: string
        key_id:
          type: string
        name:
          type: string
        plan:
          type: string
        subscription_status:
          type: string
      required:
      - account_id
      - key_id
      - name
      - plan
      type: object
    PortalOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/PortalOutputBody.json
          format: uri
          readOnly: true
          type: string
        url:
          type: string
      required:
      - url
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    CheckoutOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
          - https://example.com/schemas/CheckoutOutputBody.json
          format: uri
          readOnly: true
          type: string
        url:
          type: string
      required:
      - url
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey
    BearerAuth:
      scheme: bearer
      type: http