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

# getMaxOrderSize

> Get max order size.<br/>Be sure to leave room for slippage and fee when calculating max buying/selling power.



## OpenAPI

````yaml /openapi.yaml get /getMaxOrderSize
openapi: 3.1.0
info:
  title: AlphaInsider
  version: '1.0'
  description: >-
    The official API and websocket documentation for
    [AlphaInsider.com](https://alphainsider.com/)
servers:
  - url: https://alphainsider.com/api
security: []
tags:
  - name: Introduction
  - name: Authentication
  - name: Users
  - name: Strategies
  - name: Subscriptions
  - name: Payments
  - name: Withdrawals
  - name: Timelines
  - name: Stocks
  - name: Trades
  - name: Webhooks
  - name: Bots
  - name: Websockets
paths:
  /getMaxOrderSize:
    get:
      tags:
        - Trades
      summary: getMaxOrderSize
      description: >-
        Get max order size.<br/>Be sure to leave room for slippage and fee when
        calculating max buying/selling power.
      operationId: getMaxOrderSize
      parameters:
        - $ref: '#/components/parameters/api_token'
        - name: strategy_id
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/strategy_id'
        - name: stock_id
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/stock_id'
      responses:
        '200':
          description: Request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    $ref: '#/components/schemas/success'
                  response:
                    type: object
                    description: >-
                      Max order size payload, or an error message when `success`
                      is false.
                    properties:
                      strategy_id:
                        $ref: '#/components/schemas/strategy_id'
                      stock_id:
                        $ref: '#/components/schemas/stock_id'
                      remaining_assets_amount:
                        type: string
                        description: Remaining asset buying/selling capacity.
                      remaining_liabilities_amount:
                        type: string
                        description: Remaining liability capacity.
                      buying_power_total:
                        type: string
                        description: Total buying power available for the requested order.
                      selling_power_total:
                        type: string
                        description: Total selling power available for the requested order.
                      slippage:
                        type: string
                        description: Slippage value or configured slippage fraction.
                      fee:
                        type: string
                        description: Fee value.
              examples:
                '200':
                  value:
                    success: true
                    response:
                      strategy_id: MGfroYBdziuVhQOAce3wB
                      stock_id: v3lhjrwEhNuAOxPT29oxO
                      remaining_assets_amount: '0'
                      remaining_liabilities_amount: '0'
                      buying_power_total: '1.552444817292084'
                      selling_power_total: '1.552444817292084'
                      slippage: '0.000926141922545'
                      fee: '0.002500000000000'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
components:
  parameters:
    api_token:
      in: header
      name: Authorization
      description: User API token.
      required: true
      schema:
        type: string
        format: JWT
  schemas:
    strategy_id:
      type: string
      description: AlphaInsider strategy identifier.
    stock_id:
      type: string
      description: AlphaInsider stock identifier, or `SYMBOL:EXCHANGE` in requests.
    success:
      type: boolean
      description: True when the request succeeded.
  responses:
    '400':
      description: Request failed.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                description: False when the request failed.
              response:
                type: string
                description: Error message.
          examples:
            '400':
              value:
                success: false
                response: Request failed.
    '401':
      description: Authentication failed.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                description: False when the request failed.
              response:
                type: string
                description: Error message.
          examples:
            '401':
              value:
                success: false
                response: Authentication failed.

````