Trading 212 Pies (Deprecated) API

Manage your investment Pies. Use these endpoints to create, view, update, and delete your custom portfolios, making automated and diversified investing simple. **Deprecation notice:** The current state of the Pies API, while still operational, won't be further supported and updated.

Operations 6

GET /api/v0/equity/pies Fetch all pies #
POST /api/v0/equity/pies Create pie #
DELETE /api/v0/equity/pies/{id} Delete pie #
GET /api/v0/equity/pies/{id} Fetch a pie #
POST /api/v0/equity/pies/{id} Update pie #
POST /api/v0/equity/pies/{id}/duplicate Duplicate pie #

Documentation

Specifications

Schemas & Data

Other Resources

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/trading212-pies-deprecated-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

trading212-pies-deprecated-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Welcome to the official API reference for the Trading 212 Public API!
  title: Trading 212 Public Pies (Deprecated) API
  version: v0
servers:
- url: https://demo.trading212.com
- url: https://live.trading212.com
tags:
- description: 'Manage your investment Pies. Use these endpoints to create, view, update, and delete your custom portfolios, making automated and diversified investing simple.


    **Deprecation notice:** The current state of the Pies API, while still operational, won''t be further supported and updated.'
  name: Pies (Deprecated)
paths:
  /api/v0/equity/pies:
    get:
      deprecated: true
      description: 'Fetches all pies for the account


        **Rate limit:** 1 req / 30s'
      operationId: getAll
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AccountBucketResultResponse'
                type: array
          description: OK
        '401':
          description: Bad API key
        '403':
          description: Scope( pies:read ) missing for API key
        '408':
          description: Timed-out
        '429':
          description: 'Limited: 1 / 30s'
      security:
      - authWithSecretKey: []
        legacyApiKeyHeader: []
      summary: Fetch all pies
      tags:
      - Pies (Deprecated)
    post:
      deprecated: true
      description: 'Creates a pie for the account by given params


        **Rate limit:** 1 req / 5s'
      operationId: create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PieRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountBucketInstrumentsDetailedResponse'
          description: OK
        '400':
          description: Bad create request
        '401':
          description: Bad API key
        '403':
          description: Scope( pies:write ) missing for API key
        '408':
          description: Timed-out
        '429':
          description: 'Limited: 1 / 5s'
      security:
      - authWithSecretKey: []
        legacyApiKeyHeader: []
      summary: Create pie
      tags:
      - Pies (Deprecated)
  /api/v0/equity/pies/{id}:
    delete:
      deprecated: true
      description: 'Deletes a pie by given id


        **Rate limit:** 1 req / 5s'
      operationId: delete
      parameters:
      - in: path
        name: id
        required: true
        schema:
          format: int64
          type: integer
      responses:
        '200':
          description: OK
        '401':
          description: Bad API key
        '403':
          description: Scope( pies:write ) missing for API key
        '404':
          description: Pie not found
        '408':
          description: Timed-out
        '429':
          description: 'Limited: 1 / 5s'
      security:
      - authWithSecretKey: []
        legacyApiKeyHeader: []
      summary: Delete pie
      tags:
      - Pies (Deprecated)
    get:
      deprecated: true
      description: 'Fetches a pies for the account with detailed information


        **Rate limit:** 1 req / 5s'
      operationId: getDetailed
      parameters:
      - in: path
        name: id
        required: true
        schema:
          format: int64
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountBucketInstrumentsDetailedResponse'
          description: OK
        '401':
          description: Bad API key
        '403':
          description: Scope( pies:read ) missing for API key
        '408':
          description: Timed-out
        '429':
          description: 'Limited: 1 / 5s'
      security:
      - authWithSecretKey: []
        legacyApiKeyHeader: []
      summary: Fetch a pie
      tags:
      - Pies (Deprecated)
    post:
      deprecated: true
      description: 'Updates a pie for the account by given params


        **Rate limit:** 1 req / 5s'
      operationId: update
      parameters:
      - in: path
        name: id
        required: true
        schema:
          format: int64
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PieRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountBucketInstrumentsDetailedResponse'
          description: OK
        '400':
          description: Bad update request
        '401':
          description: Bad API key
        '403':
          description: Scope( pies:write ) missing for API key
        '408':
          description: Timed-out
        '429':
          description: 'Limited: 1 / 5s'
      security:
      - authWithSecretKey: []
        legacyApiKeyHeader: []
      summary: Update pie
      tags:
      - Pies (Deprecated)
  /api/v0/equity/pies/{id}/duplicate:
    post:
      deprecated: true
      description: 'Duplicates a pie for the account


        **Rate limit:** 1 req / 5s'
      operationId: duplicatePie
      parameters:
      - in: path
        name: id
        required: true
        schema:
          format: int64
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DuplicateBucketRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountBucketInstrumentsDetailedResponse'
          description: OK
        '400':
          description: Bad update request
        '401':
          description: Bad API key
        '403':
          description: Scope( pies:write ) missing for API key
        '408':
          description: Timed-out
        '429':
          description: 'Limited: 1 / 5s'
      security:
      - authWithSecretKey: []
        legacyApiKeyHeader: []
      summary: Duplicate pie
      tags:
      - Pies (Deprecated)
components:
  schemas:
    PieRequest:
      properties:
        dividendCashAction:
          enum:
          - REINVEST
          - TO_ACCOUNT_CASH
          type: string
        endDate:
          format: date-time
          type: string
        goal:
          description: Total desired value of the pie in account currency
          type: number
        icon:
          type: string
        instrumentShares:
          additionalProperties:
            type: number
          example:
            AAPL_US_EQ: 0.5
            MSFT_US_EQ: 0.5
          type: object
        name:
          type: string
      type: object
    AccountBucketResultResponse:
      properties:
        cash:
          description: Amount of money put into the pie in account currency
          type: number
        dividendDetails:
          $ref: '#/components/schemas/DividendDetails'
        id:
          format: int64
          type: integer
        progress:
          description: Progress of the pie based on the set goal
          example: 0.5
          type: number
        result:
          $ref: '#/components/schemas/InvestmentResult'
        status:
          description: Status of the pie based on the set goal
          enum:
          - AHEAD
          - ON_TRACK
          - BEHIND
          type: string
      type: object
    DuplicateBucketRequest:
      properties:
        icon:
          type: string
        name:
          type: string
      type: object
    AccountBucketInstrumentResult:
      properties:
        currentShare:
          type: number
        expectedShare:
          type: number
        issues:
          items:
            $ref: '#/components/schemas/InstrumentIssue'
          type: array
          uniqueItems: true
        ownedQuantity:
          type: number
        result:
          $ref: '#/components/schemas/InvestmentResult'
        ticker:
          type: string
      type: object
    DividendDetails:
      properties:
        gained:
          type: number
        inCash:
          type: number
        reinvested:
          type: number
      type: object
    InstrumentIssue:
      properties:
        name:
          enum:
          - DELISTED
          - SUSPENDED
          - NO_LONGER_TRADABLE
          - MAX_POSITION_SIZE_REACHED
          - APPROACHING_MAX_POSITION_SIZE
          - COMPLEX_INSTRUMENT_APP_TEST_REQUIRED
          - PRICE_TOO_LOW
          type: string
        severity:
          enum:
          - IRREVERSIBLE
          - REVERSIBLE
          - INFORMATIVE
          type: string
      type: object
    AccountBucketDetailedResponse:
      properties:
        creationDate:
          format: date-time
          type: string
        dividendCashAction:
          enum:
          - REINVEST
          - TO_ACCOUNT_CASH
          type: string
        endDate:
          format: date-time
          type: string
        goal:
          type: number
        icon:
          type: string
        id:
          format: int64
          type: integer
        initialInvestment:
          type: number
        instrumentShares:
          additionalProperties:
            type: number
          type: object
        name:
          type: string
        publicUrl:
          type: string
      type: object
    InvestmentResult:
      properties:
        priceAvgInvestedValue:
          type: number
        priceAvgResult:
          type: number
        priceAvgResultCoef:
          type: number
        priceAvgValue:
          type: number
      type: object
    AccountBucketInstrumentsDetailedResponse:
      properties:
        instruments:
          items:
            $ref: '#/components/schemas/AccountBucketInstrumentResult'
          type: array
        settings:
          $ref: '#/components/schemas/AccountBucketDetailedResponse'
      type: object
  securitySchemes:
    authWithSecretKey:
      description: Use your API Key as the username and your API Secret as the password
      scheme: basic
      type: http
    legacyApiKeyHeader:
      in: header
      name: Authorization
      type: apiKey