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

# Get Allocation

> Retrieve the details of a specific allocation.



## OpenAPI

````yaml /openapi.yaml get /allocations/{allocationId}
openapi: 3.1.0
info:
  version: 1.807.0
  title: Dfns
servers:
  - url: https://api.dfns.io
    description: Default - Europe
  - url: https://api.uae.dfns.io
    description: UAE
  - url: https://api.dfns.ninja
    description: <Deprecated> Staging
security: []
paths:
  /allocations/{allocationId}:
    get:
      tags:
        - Allocations
      summary: Get Allocation
      description: Retrieve the details of a specific allocation.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            description: Unique identifier for the allocation investment.
          required: true
          description: Unique identifier for the allocation investment.
          name: allocationId
          in: path
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Allocation'
                  - type: object
                    properties:
                      actions:
                        type: array
                        items:
                          $ref: '#/components/schemas/AllocationAction'
                    required:
                      - actions
                description: >-
                  A allocation investment representing funds deposited to earn
                  interest from a DeFi protocol.
      security:
        - authenticationToken: []
components:
  schemas:
    Allocation:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^allctn-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: Unique identifier for the allocation investment.
          example: allctn-7mnn0-rltpq-9bvps60gjm09td0j
        walletId:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^wa-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: Wallet id.
          example: wa-5pfuu-9euek-h0odgb6snva8ph3k
        protocol:
          type: string
          enum:
            - 0fns
          description: >-
            The DeFi protocol used for allocation generation. Currently supports
            OFNS protocol
        amount:
          allOf:
            - oneOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - Native
                    amount:
                      type: string
                      pattern: ^\d+$
                  required:
                    - kind
                    - amount
                  title: Native Asset
                - type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - Erc20
                    contract:
                      type: string
                      pattern: ^0x[0-9a-fA-F]{40}$
                    amount:
                      type: string
                      pattern: ^\d+$
                  required:
                    - kind
                    - contract
                    - amount
                  title: EVM Fungible Token (ERC-20)
            - type: object
              properties:
                metadata:
                  type: object
                  properties:
                    network:
                      $ref: '#/components/schemas/Network'
                    name:
                      type: string
                    symbol:
                      type: string
                    decimals:
                      type: number
                    tid:
                      type: string
                  required:
                    - network
                    - decimals
              required:
                - metadata
          description: The total amount currently invested in this allocation.
        rewards:
          allOf:
            - oneOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - Native
                    amount:
                      type: string
                      pattern: ^\d+$
                  required:
                    - kind
                    - amount
                  title: Native Asset
                - type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - Erc20
                    contract:
                      type: string
                      pattern: ^0x[0-9a-fA-F]{40}$
                    amount:
                      type: string
                      pattern: ^\d+$
                  required:
                    - kind
                    - contract
                    - amount
                  title: EVM Fungible Token (ERC-20)
            - type: object
              properties:
                metadata:
                  type: object
                  properties:
                    network:
                      $ref: '#/components/schemas/Network'
                    name:
                      type: string
                    symbol:
                      type: string
                    decimals:
                      type: number
                    tid:
                      type: string
                  required:
                    - network
                    - decimals
              required:
                - metadata
          description: The total rewards earned so far in this allocation.
        dateCreated:
          type: string
          format: date-time
          description: >-
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be
            UTC). [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date. When
            the allocation was created.
          example: '2023-04-14T20:41:28.715Z'
      required:
        - id
        - walletId
        - protocol
        - amount
        - rewards
        - dateCreated
      description: >-
        A allocation investment representing funds deposited to earn interest
        from a DeFi protocol.
      example:
        id: allctn-6a3ku-bn8d7-8u5rs1oukojms7k8
        walletId: wa-3l3cj-l8mq7-8q78f9nopq7f1qjv
        protocol: 0fns
        amount:
          kind: Erc20
          contract: '0x0A7660979A67E4bC51E750C628C8479ff9F458aE'
          amount: '1000000000'
          metadata:
            network: EthereumSepolia
            name: 0fns
            symbol: 0fnsSepolia
            decimals: 6
            tid: erc20:0x0A7660979A67E4bC51E750C628C8479ff9F458aE
        rewards:
          kind: Erc20
          contract: '0x0A7660979A67E4bC51E750C628C8479ff9F458aE'
          amount: '5000000'
          metadata:
            network: EthereumSepolia
            name: 0fns
            symbol: 0fnsSepolia
            decimals: 6
            tid: erc20:0x0A7660979A67E4bC51E750C628C9479ff9F458aE
        dateCreated: '2025-10-09T10:57:55.758Z'
    AllocationAction:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^allctn-a-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: Unique identifier for the allocation action.
          example: allctn-a-04p5n-gkkgd-5qk71nuev5n2ug1t
        allocationId:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^allctn-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: Unique identifier for the allocation investment.
          example: allctn-7mnn0-rltpq-9bvps60gjm09td0j
        externalId:
          type: string
          description: >-
            An optional external identifier provided by the client to ensure
            idempotency and prevent duplicate operations.
        kind:
          type: string
          enum:
            - Deposit
            - Withdraw
          description: >-
            The type of action being performed on the allocation investment:
            Deposit to add funds or Withdraw to remove funds.
        status:
          type: string
          enum:
            - PendingPolicyApproval
            - InProgress
            - Completed
            - Failed
            - Rejected
          description: >-
            Status of the allocation action. Once initiated, the status will be
            InProgress, after processing it will be Completed or Failed.
        requester:
          $ref: '#/components/schemas/Requester'
        requestBody:
          anyOf:
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - Deposit
                    - Withdraw
                  description: >-
                    The type of action being performed on the allocation
                    investment: Deposit to add funds or Withdraw to remove
                    funds.
                externalId:
                  type: string
                  description: >-
                    An optional external identifier provided by the client to
                    ensure idempotency and prevent duplicate operations.
                sourceAsset:
                  type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - Erc20
                    contract:
                      type: string
                      pattern: ^0x[0-9a-fA-F]{40}$
                    amount:
                      type: string
                      pattern: ^\d+$
                  required:
                    - kind
                    - contract
                    - amount
                  title: EVM Fungible Token (ERC-20)
                targetAsset:
                  type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - Erc20
                    contract:
                      type: string
                      pattern: ^0x[0-9a-fA-F]{40}$
                    amount:
                      type: string
                      pattern: ^\d+$
                  required:
                    - kind
                    - contract
                    - amount
                  title: EVM Fungible Token (ERC-20)
                slippageBps:
                  type: number
                  description: >-
                    The slippage tolerance for this trade in [basis
                    point](https://en.wikipedia.org/wiki/Basis_point) (BPS).
                    Slippage tolerance defines the maximum price difference
                    you're willing to accept during a trade from the estimated
                    quote, ensuring you still receive at least a minimum number
                    of tokens if the price shifts. One basis point equals
                    one-hundredth of a percentage point, or 0.01%.
              required:
                - kind
                - sourceAsset
                - targetAsset
                - slippageBps
              description: >-
                Request body for creating a allocation action. Different
                protocols may have different requirements.
              title: 0fns Allocation Action Request
            - type: object
              properties:
                walletId:
                  type: string
                  minLength: 1
                  maxLength: 64
                  pattern: ^wa-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
                  description: Wallet id.
                  example: wa-5pfuu-9euek-h0odgb6snva8ph3k
                protocol:
                  type: string
                  enum:
                    - 0fns
                  description: Ofns protocol
                externalId:
                  type: string
                  description: >-
                    An optional external identifier provided by the client to
                    ensure idempotency and prevent duplicate operations.
                sourceAsset:
                  type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - Erc20
                    contract:
                      type: string
                      pattern: ^0x[0-9a-fA-F]{40}$
                    amount:
                      type: string
                      pattern: ^\d+$
                  required:
                    - kind
                    - contract
                    - amount
                  title: EVM Fungible Token (ERC-20)
                targetAsset:
                  type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - Erc20
                    contract:
                      type: string
                      pattern: ^0x[0-9a-fA-F]{40}$
                    amount:
                      type: string
                      pattern: ^\d+$
                  required:
                    - kind
                    - contract
                    - amount
                  title: EVM Fungible Token (ERC-20)
                slippageBps:
                  type: number
                  description: >-
                    The slippage tolerance for this trade in [basis
                    point](https://en.wikipedia.org/wiki/Basis_point) (BPS).
                    Slippage tolerance defines the maximum price difference
                    you're willing to accept during a trade from the estimated
                    quote, ensuring you still receive at least a minimum number
                    of tokens if the price shifts. One basis point equals
                    one-hundredth of a percentage point, or 0.01%.
              required:
                - walletId
                - protocol
                - sourceAsset
                - targetAsset
                - slippageBps
              description: >-
                Request body for creating a allocation investment using the 0fns
                protocol.
              title: 0fns Allocation Request
          description: The full request used for initiating this allocation action.
        failureReason:
          type: string
          description: The failure reason, if any. Only present when status is Failed.
        dateCreated:
          type: string
          format: date-time
          description: >-
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be
            UTC). [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date. When
            the allocation action was created.
          example: '2023-04-14T20:41:28.715Z'
      required:
        - id
        - allocationId
        - kind
        - status
        - requester
        - requestBody
        - dateCreated
      description: >-
        A specific action performed on a allocation investment, such as
        depositing or withdrawing funds.
      example:
        id: allctn-a-6a3ku-bn8d7-8u5rs1oukojms7k8
        allocationId: allctn-6a3ku-bn8d7-8u5rs1oukojms7k8
        externalId: external-action-123
        kind: Deposit
        status: InProgress
        requester:
          userId: us-3v1ag-v6b36-afhm4zy59kjrn1fds
          tokenId: ut-341e5-12nj6-9a82ld2hjxqzkpji
        requestBody:
          kind: Deposit
          sourceAsset:
            kind: Erc20
            contract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
            amount: '500000000'
          targetAsset:
            kind: Erc20
            contract: '0x0A7660979A67E4bC51E750C628C8479ff9F458aE'
            amount: '500000000'
          slippageBps: 100
        dateCreated: '2025-10-09T11:15:33.421Z'
    Network:
      type: string
      title: Network
      enum:
        - Algorand
        - AlgorandTestnet
        - Aptos
        - AptosTestnet
        - ArbitrumOne
        - ArbitrumSepolia
        - ArcTestnet
        - AvalancheC
        - AvalancheCFuji
        - BabylonGenesis
        - BabylonTestnet5
        - Base
        - BaseSepolia
        - Berachain
        - BerachainBepolia
        - Bitcoin
        - BitcoinSignet
        - BitcoinTestnet3
        - BitcoinCash
        - Bob
        - BobSepolia
        - Bsc
        - BscTestnet
        - Canton
        - CantonTestnet
        - Cardano
        - CardanoPreprod
        - Concordium
        - ConcordiumTestnet
        - Celo
        - CeloAlfajores
        - Codex
        - CodexSepolia
        - CosmosHub4
        - CosmosIcsTestnet
        - Dogecoin
        - DogecoinTestnet
        - Ethereum
        - EthereumClassic
        - EthereumClassicMordor
        - EthereumSepolia
        - EthereumHolesky
        - EthereumHoodi
        - FantomOpera
        - FantomTestnet
        - FlareC
        - FlareCCoston2
        - FlowEvm
        - FlowEvmTestnet
        - Hedera
        - HederaTestnet
        - Ink
        - InkSepolia
        - InternetComputer
        - Ion
        - IonTestnet
        - Iota
        - IotaTestnet
        - Kaspa
        - Kusama
        - KusamaAssetHub
        - Litecoin
        - LitecoinTestnet
        - Near
        - NearTestnet
        - Optimism
        - OptimismSepolia
        - Origyn
        - Plasma
        - PlasmaTestnet
        - Plume
        - PlumeSepolia
        - Paseo
        - PaseoAssetHub
        - Polkadot
        - PolkadotAssetHub
        - Polygon
        - PolygonAmoy
        - Polymesh
        - PolymeshTestnet
        - Race
        - RaceSepolia
        - SeiAtlantic2
        - SeiPacific1
        - Solana
        - SolanaDevnet
        - Starknet
        - StarknetSepolia
        - Stellar
        - StellarTestnet
        - Sui
        - SuiTestnet
        - Tezos
        - TezosGhostnet
        - Tempo
        - TempoModerato
        - Tsc
        - TscTestnet1
        - Ton
        - TonTestnet
        - Tron
        - TronNile
        - Westend
        - WestendAssetHub
        - Xdc
        - XdcApothem
        - XLayer
        - XLayerSepolia
        - XrpLedger
        - XrpLedgerTestnet
    Requester:
      type: object
      properties:
        userId:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^us-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: User id.
          example: us-6b58p-r53sr-rlrd3l5cj3uc4ome
        tokenId:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^to-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: Token id.
          example: to-202a0-cdo33-o65mbt6q758lvvnt
      required:
        - userId
      description: The user who initiated the request.
  securitySchemes:
    authenticationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        **Bearer Token:** Used to authenticate API requests.

        More details how to generate the token: [Authentication
        flows](https://docs.dfns.co/api-reference/auth/login-flows)

````