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

# Request 0fns Allocation Quote

> Get a price quote for a 0fns deposit or withdrawal at the current market rate.

#### Authentication

✅ Organization User (`CustomerEmployee`)\
❌ Delegated User (`EndUser`)\
✅ Service Account

#### Required Permissions

No permission required.


## OpenAPI

````yaml /openapi.yaml post /allocations/get-0fns-quote
openapi: 3.1.0
info:
  version: 2.0.155
  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/get-0fns-quote:
    post:
      tags:
        - Allocations
      summary: Request 0fns Allocation Quote
      description: >-
        Get a price quote for a 0fns deposit or withdrawal at the current market
        rate.
      operationId: createAllocationQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              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
                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.
                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}$
                  required:
                    - kind
                    - contract
              required:
                - walletId
                - protocol
                - kind
                - sourceAsset
                - targetAsset
              description: >-
                Request a 0fns conversion price quote (deposit: stablecoin→0fns;
                withdraw: 0fns→stablecoin).
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                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
                      - SkySusds
                      - GauntletUsdcPrime
                      - SteakhouseUsdt
                      - GauntletUsdcPrimeBase
                      - SteakhouseUsdcBase
                      - SentoraPyusdMain
                    description: >-
                      The DeFi protocol used for allocation generation. See
                      [Create
                      Allocation](https://docs.dfns.co/api-reference/allocations/create-allocation)
                      for each protocol's provider, deposit asset, and network.
                  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.
                  sourceAsset:
                    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:
                              kind:
                                type: string
                                enum:
                                  - Spl
                              mint:
                                type: string
                                pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
                              amount:
                                type: string
                                pattern: ^\d+$
                            required:
                              - kind
                              - mint
                              - amount
                            title: Solana Fungible Token (SPL)
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - Sep41
                              issuer:
                                type: string
                                pattern: ^(G[A-Z0-9]{55}|M[A-Z0-9]{68})$
                              assetCode:
                                type: string
                              amount:
                                type: string
                                pattern: ^\d+$
                            required:
                              - kind
                              - issuer
                              - assetCode
                              - amount
                            title: Stellar Fungible Token (SEP-41)
                      - 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
                  targetAsset:
                    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:
                              kind:
                                type: string
                                enum:
                                  - Spl
                              mint:
                                type: string
                                pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
                              amount:
                                type: string
                                pattern: ^\d+$
                            required:
                              - kind
                              - mint
                              - amount
                            title: Solana Fungible Token (SPL)
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - Sep41
                              issuer:
                                type: string
                                pattern: ^(G[A-Z0-9]{55}|M[A-Z0-9]{68})$
                              assetCode:
                                type: string
                              amount:
                                type: string
                                pattern: ^\d+$
                            required:
                              - kind
                              - issuer
                              - assetCode
                              - amount
                            title: Stellar Fungible Token (SEP-41)
                      - 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: Expected output at current market price.
                  estFillTime:
                    type: integer
                    description: Estimated fill time in seconds.
                  dateCreated:
                    type: string
                    format: date-time
                    description: >-
                      [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date
                      (must be UTC). When the quote was created.
                    example: '2023-04-14T20:41:28.715Z'
                required:
                  - walletId
                  - protocol
                  - kind
                  - sourceAsset
                  - targetAsset
                  - estFillTime
                  - dateCreated
                description: A 0fns conversion price quote.
      security:
        - authenticationToken: []
components:
  schemas:
    Network:
      type: string
      title: Network
      enum:
        - Algorand
        - AlgorandTestnet
        - Aptos
        - AptosTestnet
        - ArbitrumOne
        - ArbitrumSepolia
        - Arc
        - ArcTestnet
        - Areum
        - AvalancheC
        - AvalancheCFuji
        - Base
        - BaseSepolia
        - Berachain
        - BerachainBepolia
        - Bitcoin
        - BitcoinSignet
        - BitcoinTestnet4
        - BitcoinCash
        - Bob
        - BobSepolia
        - Bsc
        - BscTestnet
        - Canton
        - CantonTestnet
        - Cardano
        - CardanoPreprod
        - Concordium
        - ConcordiumTestnet
        - Celo
        - CeloSepolia
        - Codex
        - CodexSepolia
        - CosmosHub4
        - CosmosIcsTestnet
        - Dogecoin
        - DogecoinTestnet
        - Ethereum
        - EthereumClassic
        - EthereumClassicMordor
        - EthereumSepolia
        - EthereumHoodi
        - FlareC
        - FlareCCoston2
        - FlowEvm
        - FlowEvmTestnet
        - Hedera
        - HederaTestnet
        - Ink
        - InkSepolia
        - InternetComputer
        - Ion
        - IonTestnet
        - Iota
        - IotaTestnet
        - Kusama
        - KusamaAssetHub
        - Litecoin
        - LitecoinTestnet
        - Movement
        - MovementTestnet
        - Near
        - NearTestnet
        - Optimism
        - OptimismSepolia
        - Origyn
        - Plasma
        - PlasmaTestnet
        - Plume
        - PlumeSepolia
        - Paseo
        - PaseoAssetHub
        - Polkadot
        - PolkadotAssetHub
        - Polygon
        - PolygonAmoy
        - Polymesh
        - PolymeshTestnet
        - Rayls
        - RaylsTestnet
        - Robinhood
        - RobinhoodSepolia
        - SeiAtlantic2
        - SeiPacific1
        - Solana
        - SolanaDevnet
        - Sonic
        - SonicTestnet
        - Starknet
        - StarknetSepolia
        - Stellar
        - StellarTestnet
        - Sui
        - SuiTestnet
        - Tezos
        - TezosShadownet
        - Tempo
        - TempoModerato
        - Tsc
        - TscTestnet1
        - Ton
        - TonTestnet
        - Tron
        - TronNile
        - Westend
        - WestendAssetHub
        - Xdc
        - XdcApothem
        - XLayer
        - XLayerSepolia
        - XrpLedger
        - XrpLedgerTestnet
  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)

````