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

# Total account costs and payouts received

> Returns what you paid for your challenge accounts and the payouts they paid you, summed over every account `GET /v1/accounts` returns for this key. Each amount is split into `cash`, `store_credit`, and `total`, so you can count store credit or leave it out. `costs` and `payouts_received` are null when your purchase or payout history is too long to total in one response.



## OpenAPI

````yaml /openapi.yaml get /v1/account-summary
openapi: 3.1.0
info:
  title: MyFundedPerps API (Beta)
  version: 1.0.0
  description: >-
    The developer API is in beta. Breaking changes may be introduced at any
    time. Programmatic access to MyFundedPerps paper-trading challenge accounts.
    API trades use the same real order books and simulated execution engine as
    the web trading interface. Every response carries an `X-Request-Id` header
    for support and log correlation.
  contact:
    url: https://myfundedperpetuals.com/contact
servers:
  - url: https://developers.myfundedperpetuals.com
    description: Live
  - url: https://sandbox.myfundedperpetuals.com
    description: Sandbox (test keys and sandbox accounts only)
security:
  - bearerAuth: []
  - bearerAuth: []
    partnerKey: []
tags:
  - name: General
  - name: Authentication
  - name: Accounts
  - name: Markets
  - name: Positions
  - name: Orders
  - name: Fills
  - name: Strategy Orders
  - name: Price Alerts
  - name: Script Data
    description: >-
      Small text values your own Pine scripts read with `request.data("key")`,
      such as a daily options gamma histogram or call and put walls. Script data
      belongs to the key's owner, not an account, so any of your live keys
      reaches all of it, including keys limited to some accounts. Reading needs
      read or trade scope; creating, updating, and deleting need trade scope.
      Test keys can't use these endpoints. A script someone shares with you
      reads your own script data, never theirs. You can keep up to 20 keys, each
      holding up to 65,536 characters, and make up to 30 writes a minute and
      1,440 a day. Charts showing a script that reads a key update within
      seconds of a write.
  - name: Affiliate
paths:
  /v1/account-summary:
    get:
      tags:
        - Accounts
      summary: Total account costs and payouts received
      description: >-
        Returns what you paid for your challenge accounts and the payouts they
        paid you, summed over every account `GET /v1/accounts` returns for this
        key. Each amount is split into `cash`, `store_credit`, and `total`, so
        you can count store credit or leave it out. `costs` and
        `payouts_received` are null when your purchase or payout history is too
        long to total in one response.
      operationId: getAccountSummary
      responses:
        '200':
          description: Totals across your accounts.
          headers:
            X-RateLimit-Warning:
              $ref: '#/components/headers/RateLimitWarning'
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/AccountSummary'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  headers:
    RateLimitWarning:
      description: >-
        Sent on `GET` responses during the 7-day rollout grace period when an
        API key exceeds the upcoming per-key `GET` limit (60/minute live,
        30/minute sandbox). States the limit and points to the `/v1/stream`
        account streaming documentation.
      schema:
        type: string
    RequestId:
      description: Stable identifier for support and log correlation.
      schema:
        type: string
        format: uuid
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        minimum: 1
    RateLimitLimit:
      description: >-
        Requests per minute allowed by the request budget that ran out. Sent on
        request-budget 429s; account-wide operation budget 429s omit it.
      schema:
        type: integer
        minimum: 1
    RateLimitScope:
      description: >-
        Which request budget ran out: `ip` for the per-address limit, `api_key`
        for a per-key budget (default per-key GET limit, custom key limit, or a
        partner's per-trader-key budget), or `partner` for a partner's combined
        budget. Sent on request-budget 429s; account-wide operation budget 429s
        omit it.
      schema:
        type: string
        enum:
          - ip
          - api_key
          - partner
  schemas:
    AccountSummary:
      type: object
      required:
        - account_count
        - costs
        - payouts_received
      properties:
        account_count:
          type: integer
          description: Accounts included in the totals.
        costs:
          oneOf:
            - $ref: '#/components/schemas/AccountCosts'
            - type: 'null'
        payouts_received:
          oneOf:
            - $ref: '#/components/schemas/PayoutsReceived'
            - type: 'null'
    AccountCosts:
      type: object
      description: Only charged purchases count; pending and failed checkouts do not.
      required:
        - paid
        - refunded
        - net
      properties:
        paid:
          $ref: '#/components/schemas/TenderAmounts'
        refunded:
          allOf:
            - $ref: '#/components/schemas/TenderAmounts'
          description: >-
            Refunds to your payment method (`cash`) and to your store credit
            balance (`store_credit`), including cash refunds you took as store
            credit.
        net:
          allOf:
            - $ref: '#/components/schemas/TenderAmounts'
          description: >-
            `paid` minus `refunded`. `net.store_credit` is negative when a cash
            payment was refunded as store credit.
    PayoutsReceived:
      type: object
      description: >-
        Payouts with status paid. `cash` is what was sent to your payout
        account; `store_credit` is the credit granted, including any
        store-credit boost.
      required:
        - cash
        - store_credit
        - total
        - count
      properties:
        cash:
          type: number
          description: USD.
        store_credit:
          type: number
          description: USD.
        total:
          type: number
          description: USD
          cash plus store credit.: null
        count:
          type: integer
          description: Paid payouts.
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    TenderAmounts:
      type: object
      description: >-
        USD amounts by how they were paid. `total` is `cash` plus
        `store_credit`.
      required:
        - cash
        - store_credit
        - total
      properties:
        cash:
          type: number
          description: USD paid by card, crypto, or bank, or refunded to it.
        store_credit:
          type: number
          description: USD in store credit.
        total:
          type: number
          description: USD
          cash plus store credit.: null
    Error:
      type: object
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
        message:
          type: string
        request_id:
          type: string
          format: uuid
        details:
          type: array
          description: >-
            Present on request-validation failures, with one entry per invalid
            field so a request can be fixed in one pass.
          items:
            $ref: '#/components/schemas/ValidationIssue'
    ValidationIssue:
      type: object
      required:
        - field
        - issue
      properties:
        field:
          type: string
          description: >-
            Wire name of the offending request field, such as `size` or
            `operations[2].price`. The value `body` refers to the whole payload.
        issue:
          type: string
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API key, or an invalid partner key.
      headers:
        WWW-Authenticate:
          schema:
            type: string
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: The API key is valid but does not allow this operation.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: >-
        The per-IP request limit, a per-key GET limit, a partner budget, or an
        account-wide operation budget is exhausted.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Scope:
          $ref: '#/components/headers/RateLimitScope'
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: MyFundedPerps API key
      description: >-
        API key beginning with `fp_live_` (live keys, served at
        developers.myfundedperpetuals.com) or `fp_test_` (test keys, served at
        sandbox.myfundedperpetuals.com). A key presented on the other host is
        rejected with `401` and a message naming the correct host. Affiliate API
        keys are `fp_live_` keys created on the Affiliates page: they read only
        the `/v1/affiliate` endpoints and get `403` with code
        `insufficient_scope` on every other authenticated endpoint. Every other
        key gets the same `403` on `/v1/affiliate`.
    partnerKey:
      type: apiKey
      in: header
      name: X-MFP-Partner-Key
      description: >-
        Optional partner key beginning with `mfp_partner_`, issued by
        MyFundedPerps to platforms that call the live API on behalf of many
        traders. Send it beside the trader's own `fp_live_` key: the request is
        then counted against the partner's budgets instead of the per-address
        limit. It grants no access on its own. An unknown, malformed, or revoked
        partner key returns `401` with code `invalid_partner_key`. The header is
        ignored on the sandbox host and on requests without a live trader key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.