> ## 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.

# getBotAllocations

> Get bot allocations.



## OpenAPI

````yaml /openapi.yaml get /getBotAllocations
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:
  /getBotAllocations:
    get:
      tags:
        - Bots
      summary: getBotAllocations
      description: Get bot allocations.
      operationId: getBotAllocations
      parameters:
        - $ref: '#/components/parameters/api_token'
        - name: bot_id[]
          in: query
          required: true
          schema:
            type: array
            description: Array of bot IDs.
            maxItems: 100
            items:
              $ref: '#/components/schemas/bot_id'
      responses:
        '200':
          description: Request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    $ref: '#/components/schemas/success'
                  response:
                    type: array
                    description: >-
                      Endpoint-specific response payload, or an error message
                      when `success` is false.
                    items:
                      type: object
                      properties:
                        bot_allocation_id:
                          type: string
                          description: Bot allocation identifier.
                        bot_id:
                          $ref: '#/components/schemas/bot_id'
                        strategy_id:
                          $ref: '#/components/schemas/strategy_id'
                        percent:
                          type: string
                          description: Portfolio allocation fraction.
                        strategy_value:
                          type: string
                          description: >-
                            Normalized strategy value. Convert before displaying
                            user-facing USD values.
                        positions:
                          type: array
                          description: Nested position records.
                          items:
                            type: object
                            properties:
                              position_id:
                                type: string
                                description: Strategy position identifier.
                              strategy_id:
                                $ref: '#/components/schemas/strategy_id'
                              type:
                                type: string
                                enum:
                                  - asset
                                  - liability
                                description: Type or category for this object.
                              price:
                                type: string
                                description: >-
                                  Price or execution price, depending on
                                  context.
                              amount:
                                type: string
                                description: Amount.
                              total:
                                type: string
                                description: >-
                                  Total value; for positions/orders this is
                                  strategy-normalized unless documented
                                  otherwise.
                              updated_at:
                                $ref: '#/components/schemas/updated_at'
                              created_at:
                                $ref: '#/components/schemas/created_at'
                              stock_id:
                                $ref: '#/components/schemas/stock_id'
                              figi_composite:
                                type:
                                  - string
                                  - 'null'
                                description: Composite FIGI identifier when available.
                              symbol:
                                type: string
                                description: Ticker or asset symbol.
                              name:
                                type: string
                                description: Display name.
                              sector:
                                type: string
                                description: Sector or asset category.
                              security:
                                type: string
                                enum:
                                  - cryptocurrency
                                  - stock
                                description: >-
                                  Security type, such as stock or
                                  cryptocurrency.
                              exchange:
                                type: string
                                description: Exchange code.
                              stock:
                                type: string
                                description: Stock symbol as stored by AlphaInsider.
                              peg:
                                type: string
                                description: Peg or quote currency.
                              provider:
                                type: string
                                enum:
                                  - coinbase
                                  - binance
                                  - massive
                                  - alphainsider
                                description: External provider or data provider.
                              slippage:
                                type: string
                                description: >-
                                  Slippage value or configured slippage
                                  fraction.
                              fee:
                                type: string
                                description: Fee value.
                              links:
                                type: object
                                description: External research and market-data links.
                              stock_status:
                                type: string
                                enum:
                                  - active
                                  - deleted
                                description: Current stock status.
                              bid:
                                type: string
                                description: Current bid price.
                              ask:
                                type: string
                                description: Current ask price.
                              last:
                                type: string
                                description: Last traded price.
                        updated_at:
                          $ref: '#/components/schemas/updated_at'
                        created_at:
                          $ref: '#/components/schemas/created_at'
              examples:
                '200':
                  value:
                    success: true
                    response:
                      - bot_allocation_id: g1DDEzc68EPrWyhSxRPHJ
                        bot_id: h_zZfeqsX9o8hgB8DVc0P
                        strategy_id: YbKCgktxu0ugmQ1QKCfA3
                        percent: '0.6'
                        strategy_value: '1'
                        positions:
                          - position_id: G3nEoY0dAYGXpucdAMC5R
                            strategy_id: YbKCgktxu0ugmQ1QKCfA3
                            type: asset
                            price: '1.000000000000000'
                            amount: '1.000000000000000'
                            total: '1.000000000000000'
                            updated_at: '2024-10-17T14:24:25.987Z'
                            created_at: '2024-10-17T14:24:25.987Z'
                            stock_id: ubfhvYUsgvMIuJPwr76My
                            figi_composite: null
                            symbol: USD
                            name: US Dollar
                            sector: Unallocated
                            security: ''
                            exchange: ALPHAINSIDER
                            stock: USD
                            peg: USD
                            provider: alphainsider
                            slippage: '0.000000000000000'
                            fee: '0.000000000000000'
                            links: {}
                            stock_status: active
                            bid: '1.00'
                            ask: '1.00'
                            last: '1.00'
                        updated_at: '2024-10-23T14:48:47.090Z'
                        created_at: '2024-10-23T14:45:48.648Z'
                      - bot_allocation_id: 1Su_xi4PbyC2o4HhOmjxO
                        bot_id: h_zZfeqsX9o8hgB8DVc0P
                        strategy_id: WuRnay0CF3P1oPRSdogj5
                        percent: '0.4'
                        strategy_value: '1'
                        positions:
                          - position_id: RSTqnGGFOBVONbKNzrLUq
                            strategy_id: WuRnay0CF3P1oPRSdogj5
                            type: asset
                            price: '1.000000000000000'
                            amount: '1.000000000000000'
                            total: '1.000000000000000'
                            updated_at: '2024-10-22T20:44:42.391Z'
                            created_at: '2024-10-22T20:44:42.391Z'
                            stock_id: ubfhvYUsgvMIuJPwr76My
                            figi_composite: null
                            symbol: USD
                            name: US Dollar
                            sector: Unallocated
                            security: ''
                            exchange: ALPHAINSIDER
                            stock: USD
                            peg: USD
                            provider: alphainsider
                            slippage: '0.000000000000000'
                            fee: '0.000000000000000'
                            links: {}
                            stock_status: active
                            bid: '1.00'
                            ask: '1.00'
                            last: '1.00'
                        updated_at: '2024-10-23T14:48:47.090Z'
                        created_at: '2024-10-23T14:45:48.648Z'
        '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:
    bot_id:
      type: string
      description: AlphaInsider bot identifier.
    success:
      type: boolean
      description: True when the request succeeded.
    strategy_id:
      type: string
      description: AlphaInsider strategy identifier.
    updated_at:
      type: string
      format: date-time
      description: Last update timestamp.
    created_at:
      type: string
      format: date-time
      description: Creation timestamp.
    stock_id:
      type: string
      description: AlphaInsider stock identifier, or `SYMBOL:EXCHANGE` in requests.
  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.

````