Firstrade Account API

Account list, balances, positions, and history

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/firstrade-account-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 email required.

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

OpenAPI Specification

firstrade-account-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Firstrade Unofficial Account API
  description: 'Community-reverse-engineered REST API for the Firstrade Securities brokerage platform (https://www.firstrade.com). This is NOT an official Firstrade API. Endpoints are discovered from network traffic analysis and are subject to change without notice. The base URL is the internal mobile/web gateway used by the Firstrade app. Authentication uses a session-based flow with cookie tokens (ftat, sid) obtained after login. All requests require the Accept-Encoding: gzip and access-token header values documented below. Source: MaxxRK/firstrade-api (MIT licence).'
  version: 0.1.0
  contact:
    name: Firstrade Customer Support
    url: https://www.firstrade.com/support
  license:
    name: MIT (community SDK)
    url: https://opensource.org/licenses/MIT
  x-official: false
  x-source-repo: https://github.com/MaxxRK/firstrade-api
servers:
- url: https://api3x.firstrade.com
  description: Firstrade mobile / web API gateway
tags:
- name: Account
  description: Account list, balances, positions, and history
paths:
  /private/userinfo:
    get:
      operationId: getUserInfo
      summary: Get user information
      description: Returns profile details for the authenticated user.
      tags:
      - Account
      security:
      - sessionAuth: []
      responses:
        '200':
          description: User information object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /private/acct_list:
    get:
      operationId: getAccountList
      summary: List all accounts
      description: Returns all accounts associated with the authenticated user including account numbers and total portfolio values.
      tags:
      - Account
      security:
      - sessionAuth: []
      responses:
        '200':
          description: Account list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountListResponse'
  /private/balances:
    get:
      operationId: getAccountBalances
      summary: Get account balances
      description: Returns detailed balance information for a specific account including cash, buying power, equity, and margin values.
      tags:
      - Account
      security:
      - sessionAuth: []
      parameters:
      - name: account
        in: query
        required: true
        description: Account number
        schema:
          type: string
      responses:
        '200':
          description: Account balances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /private/positions:
    get:
      operationId: getAccountPositions
      summary: Get account positions
      description: Returns currently held positions for the specified account.
      tags:
      - Account
      security:
      - sessionAuth: []
      parameters:
      - name: account
        in: query
        required: true
        description: Account number
        schema:
          type: string
      - name: per_page
        in: query
        required: false
        description: Number of positions per page (default 200)
        schema:
          type: integer
          default: 200
      responses:
        '200':
          description: Account positions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /private/account_history:
    get:
      operationId: getAccountHistory
      summary: Get account history
      description: Returns transaction history for the specified account. Supports predefined date ranges and custom date ranges.
      tags:
      - Account
      security:
      - sessionAuth: []
      parameters:
      - name: account
        in: query
        required: true
        schema:
          type: string
        description: Account number
      - name: range
        in: query
        required: true
        schema:
          type: string
          enum:
          - today
          - 1w
          - 1m
          - 2m
          - mtd
          - ytd
          - ly
          - cust
        description: Date range preset
      - name: page
        in: query
        required: false
        schema:
          type: integer
          default: 1
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          default: 1000
      - name: range_arr[]
        in: query
        required: false
        schema:
          type: string
        description: Start date (YYYY-MM-DD) when range=cust; provide twice for start and end
      responses:
        '200':
          description: Account history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
components:
  schemas:
    ApiResponse:
      type: object
      properties:
        error:
          type: string
          description: Empty string on success; error message on failure
          example: ''
      additionalProperties: true
    AccountListResponse:
      allOf:
      - $ref: '#/components/schemas/ApiResponse'
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              account:
                type: string
                description: Account number
              total_value:
                type: string
                description: Total portfolio value
  securitySchemes:
    sessionAuth:
      type: apiKey
      in: header
      name: ftat
      description: 'Session token obtained after login. The ftat header must be accompanied by a sid header (session ID) and the static access-token header (value: 833w3XuIFycv18ybi).'