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

# Get anyspend quote

> Retrieves a quote to swap, execute contract, or participate in HypeDuel



## OpenAPI

````yaml https://mainnet.anyspend.com/openapi.json post /orders/quote
openapi: 3.1.0
info:
  title: AnySpend API
  version: 1.0.0
  description: >-
    API for AnySpend - handles get quote, create order, check order status, and
    more.
servers:
  - url: https://mainnet.anyspend.com
    description: Production server
security: []
tags: []
paths:
  /orders/quote:
    post:
      tags:
        - Orders
      summary: Get anyspend quote
      description: Retrieves a quote to swap, execute contract, or participate in HypeDuel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  description: Quote for swap order
                  properties:
                    type:
                      type: string
                      enum:
                        - swap
                      description: Order type for swap
                    srcChain:
                      type: number
                      description: Source chain ID
                      example: 1
                    dstChain:
                      type: number
                      description: Destination chain ID
                      example: 8453
                    srcTokenAddress:
                      type: string
                      description: Source token contract address
                      example: '0x0000000000000000000000000000000000000000'
                    dstTokenAddress:
                      type: string
                      description: Destination token contract address
                      example: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    recipientAddress:
                      type: string
                      description: Recipient address
                      example: '0x55c71fca5e01cf246718748ae540473e608d0282'
                    tradeType:
                      type: string
                      enum:
                        - EXACT_INPUT
                        - EXACT_OUTPUT
                      description: Type of trade execution
                    amount:
                      type: string
                      description: Amount to quote
                      example: '1000000000000000000'
                    onrampVendor:
                      type: string
                      enum:
                        - coinbase
                        - stripe
                        - stripe-web2
                        - none
                      description: Optional onramp vendor
                    partnerId:
                      type: string
                      description: Optional partner ID
                  required:
                    - type
                    - srcChain
                    - dstChain
                    - srcTokenAddress
                    - dstTokenAddress
                    - tradeType
                    - amount
                - type: object
                  description: Quote for X402 swap order
                  properties:
                    type:
                      type: string
                      enum:
                        - x402_swap
                      description: Order type for X402 swap
                    srcChain:
                      type: number
                      description: Source chain ID
                      example: 8453
                    dstChain:
                      type: number
                      description: Destination chain ID
                      example: 8453
                    srcTokenAddress:
                      type: string
                      description: Source token contract address
                      example: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    dstTokenAddress:
                      type: string
                      description: Destination token contract address
                      example: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    recipientAddress:
                      type: string
                      description: Recipient address
                      example: '0x55c71fca5e01cf246718748ae540473e608d0282'
                    amount:
                      type: string
                      description: Amount to quote
                      example: '1000000'
                    onrampVendor:
                      type: string
                      enum:
                        - coinbase
                        - stripe
                        - stripe-web2
                        - none
                      description: Optional onramp vendor
                    partnerId:
                      type: string
                      description: Optional partner ID
                  required:
                    - type
                    - srcChain
                    - dstChain
                    - srcTokenAddress
                    - dstTokenAddress
                    - amount
                - type: object
                  description: Quote for custom order
                  properties:
                    type:
                      type: string
                      enum:
                        - custom
                      description: Order type for custom execution
                    srcChain:
                      type: number
                      description: Source chain ID
                      example: 1
                    dstChain:
                      type: number
                      description: Destination chain ID
                      example: 8453
                    srcTokenAddress:
                      type: string
                      description: Source token contract address
                      example: '0x0000000000000000000000000000000000000000'
                    dstTokenAddress:
                      type: string
                      description: Destination token contract address
                      example: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    recipientAddress:
                      type: string
                      description: Recipient address
                      example: '0x55c71fca5e01cf246718748ae540473e608d0282'
                    payload:
                      type: object
                      description: Custom payload for execution
                      properties:
                        data:
                          type: string
                          description: Encoded transaction data
                        to:
                          type: string
                          description: Target contract address
                        spenderAddress:
                          type: string
                          description: Optional spender address for token approval
                        amount:
                          type: string
                          description: Amount for the custom operation
                      required:
                        - data
                        - to
                        - amount
                    onrampVendor:
                      type: string
                      enum:
                        - coinbase
                        - stripe
                        - stripe-web2
                        - none
                      description: Optional onramp vendor
                    partnerId:
                      type: string
                      description: Optional partner ID
                  required:
                    - type
                    - srcChain
                    - dstChain
                    - srcTokenAddress
                    - dstTokenAddress
                    - payload
                - type: object
                  description: Quote for minting an NFT
                  properties:
                    type:
                      type: string
                      enum:
                        - mint_nft
                    srcChain:
                      type: number
                    dstChain:
                      type: number
                    srcTokenAddress:
                      type: string
                    dstTokenAddress:
                      type: string
                    recipientAddress:
                      type: string
                      description: Recipient address
                      example: '0x55c71fca5e01cf246718748ae540473e608d0282'
                    onrampVendor:
                      type: string
                      enum:
                        - coinbase
                        - stripe
                        - stripe-web2
                        - none
                      optional: true
                    partnerId:
                      type: string
                      description: Optional partner ID
                    contractAddress:
                      type: string
                    tokenId:
                      type: number
                      nullable: true
                    contractType:
                      type: string
                      enum:
                        - erc721
                        - erc1155
                    price:
                      type: string
                  required:
                    - type
                    - srcChain
                    - dstChain
                    - srcTokenAddress
                    - dstTokenAddress
                    - contractAddress
                    - contractType
                    - price
                - type: object
                  description: Quote for joining a tournament
                  properties:
                    type:
                      type: string
                      enum:
                        - join_tournament
                    srcChain:
                      type: number
                    dstChain:
                      type: number
                    srcTokenAddress:
                      type: string
                    dstTokenAddress:
                      type: string
                    recipientAddress:
                      type: string
                      description: Recipient address
                      example: '0x55c71fca5e01cf246718748ae540473e608d0282'
                    onrampVendor:
                      type: string
                      enum:
                        - coinbase
                        - stripe
                        - stripe-web2
                        - none
                      optional: true
                    partnerId:
                      type: string
                      description: Optional partner ID
                    contractAddress:
                      type: string
                    price:
                      type: string
                  required:
                    - type
                    - srcChain
                    - dstChain
                    - srcTokenAddress
                    - dstTokenAddress
                    - contractAddress
                    - price
                - type: object
                  description: Quote for funding a tournament
                  properties:
                    type:
                      type: string
                      enum:
                        - fund_tournament
                    srcChain:
                      type: number
                    dstChain:
                      type: number
                    srcTokenAddress:
                      type: string
                    dstTokenAddress:
                      type: string
                    recipientAddress:
                      type: string
                      description: Recipient address
                      example: '0x55c71fca5e01cf246718748ae540473e608d0282'
                    onrampVendor:
                      type: string
                      enum:
                        - coinbase
                        - stripe
                        - stripe-web2
                        - none
                      optional: true
                    partnerId:
                      type: string
                      description: Optional partner ID
                    contractAddress:
                      type: string
                    fundAmount:
                      type: string
                  required:
                    - type
                    - srcChain
                    - dstChain
                    - srcTokenAddress
                    - dstTokenAddress
                    - contractAddress
                    - fundAmount
                - type: object
                  description: Quote for HypeDuel order
                  properties:
                    type:
                      type: string
                      enum:
                        - hype_duel
                      description: Order type for HypeDuel
                    srcChain:
                      type: number
                      description: Source chain ID
                      example: 1
                    dstChain:
                      type: number
                      description: Destination chain ID
                      example: 8453
                    srcTokenAddress:
                      type: string
                      description: Source token contract address
                      example: '0x0000000000000000000000000000000000000000'
                    dstTokenAddress:
                      type: string
                      description: Destination token contract address
                      example: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    recipientAddress:
                      type: string
                      description: Recipient address
                      example: '0x55c71fca5e01cf246718748ae540473e608d0282'
                    amount:
                      type: string
                      description: Amount to quote
                      example: '1000000000000000000'
                    onrampVendor:
                      type: string
                      enum:
                        - coinbase
                        - stripe
                        - stripe-web2
                        - none
                      description: Optional onramp vendor
                    partnerId:
                      type: string
                      description: Optional partner ID
                  required:
                    - type
                    - srcChain
                    - dstChain
                    - srcTokenAddress
                    - dstTokenAddress
                    - amount
                - type: object
                  description: Quote for custom exact in order
                  properties:
                    type:
                      type: string
                      enum:
                        - custom_exact_in
                      description: Order type for custom exact in execution
                    srcChain:
                      type: number
                      description: Source chain ID
                      example: 1
                    dstChain:
                      type: number
                      description: Destination chain ID
                      example: 8453
                    srcTokenAddress:
                      type: string
                      description: Source token contract address
                      example: '0x0000000000000000000000000000000000000000'
                    dstTokenAddress:
                      type: string
                      description: Destination token contract address
                      example: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    recipientAddress:
                      type: string
                      description: Recipient address
                      example: '0x55c71fca5e01cf246718748ae540473e608d0282'
                    amount:
                      type: string
                      description: Destination amount for exact in execution
                      example: '1000000000000000000'
                    onrampVendor:
                      type: string
                      enum:
                        - coinbase
                        - stripe
                        - stripe-web2
                        - none
                      description: Optional onramp vendor
                    partnerId:
                      type: string
                      description: Optional partner ID
                  required:
                    - type
                    - srcChain
                    - dstChain
                    - srcTokenAddress
                    - dstTokenAddress
                    - amount
              discriminator:
                propertyName: type
      responses:
        '200':
          description: Quote retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Get quote successfully
                  data:
                    type: object
                    properties:
                      operation:
                        type: string
                        description: Type of operation
                        example: swap
                      sender:
                        type: string
                        description: Sender address for the operation
                        example: '0x15846E6A7C839A208765a0B4754C2dd15E879990'
                      recipient:
                        type: string
                        description: Recipient address for the operation
                        example: '0xaF1ae1B78bc767DaEBB91196Adf982E9d560AAB9'
                      currencyIn:
                        type: object
                        description: Input currency details
                        properties:
                          currency:
                            type: object
                            properties:
                              chainId:
                                type: number
                                example: 1
                              address:
                                type: string
                                example: '0x0000000000000000000000000000000000000000'
                              symbol:
                                type: string
                                example: ETH
                              name:
                                type: string
                                example: Ether
                              decimals:
                                type: number
                                example: 18
                              metadata:
                                type: object
                                properties:
                                  logoURI:
                                    type: string
                                    example: >-
                                      https://assets.relay.link/icons/1/light.png
                          amount:
                            type: string
                            description: Raw amount
                            example: '1000000000000000000'
                          amountFormatted:
                            type: string
                            description: Human-readable formatted amount
                            example: '1.0'
                          amountUsd:
                            type: string
                            description: USD value of the amount
                            example: '3229.715818'
                          minimumAmount:
                            type: string
                            description: Minimum required amount
                            example: '1000000000000000000'
                      currencyOut:
                        type: object
                        description: Output currency details
                        properties:
                          currency:
                            type: object
                            properties:
                              chainId:
                                type: number
                                example: 8453
                              address:
                                type: string
                                example: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
                              symbol:
                                type: string
                                example: USDC
                              name:
                                type: string
                                example: USD Coin
                              decimals:
                                type: number
                                example: 6
                              metadata:
                                type: object
                                properties:
                                  logoURI:
                                    type: string
                                    example: >-
                                      https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694
                          amount:
                            type: string
                            description: Raw output amount
                            example: '3224805862'
                          amountFormatted:
                            type: string
                            description: Human-readable formatted output amount
                            example: '3224.805862'
                          amountUsd:
                            type: string
                            description: USD value of output amount
                            example: '3224.512405'
                          minimumAmount:
                            type: string
                            description: Minimum guaranteed output amount
                            example: '3192557803'
                      totalImpact:
                        type: object
                        description: Total price impact of the trade
                        properties:
                          usd:
                            type: string
                            description: USD impact amount
                            example: '-5.203413'
                          percent:
                            type: string
                            description: Percentage impact
                            example: '-0.16'
                      swapImpact:
                        type: object
                        description: Price impact from the swap portion
                        properties:
                          usd:
                            type: string
                            description: USD swap impact
                            example: '-4.102797'
                          percent:
                            type: string
                            description: Percentage swap impact
                            example: '-0.13'
                      rate:
                        type: string
                        description: Exchange rate
                        example: '3224.805862'
                      slippageTolerance:
                        type: object
                        description: Slippage tolerance settings
                        properties:
                          origin:
                            type: object
                            properties:
                              usd:
                                type: string
                                example: '0.000000'
                              value:
                                type: string
                                example: '0'
                              percent:
                                type: string
                                example: '0.00'
                          destination:
                            type: object
                            properties:
                              usd:
                                type: string
                                example: '32.245124'
                              value:
                                type: string
                                example: '32248059'
                              percent:
                                type: string
                                example: '1.00'
                      timeEstimate:
                        type: number
                        description: Estimated completion time in seconds
                        example: 24
                      userBalance:
                        type: string
                        description: User's current balance
                        example: '0'
                      pointsAmount:
                        type: number
                        description: Anyspend points that will be awarded for the order
                        example: 100
                      pointsMultiplier:
                        type: number
                        description: >-
                          Multiplier applied to points that will be awarded for
                          the order
                        example: 1.5
                      fee:
                        $ref: '#/components/schemas/Fee'
                        description: >-
                          Fee structure including all applicable fees (Stripe
                          and AnySpend)
                    required:
                      - fee
                  statusCode:
                    type: number
                    example: 200
                required:
                  - success
                  - message
                  - data
                  - statusCode
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Bad request
                  statusCode:
                    type: number
                    example: 400
                required:
                  - success
                  - message
                  - statusCode
components:
  schemas:
    Fee:
      oneOf:
        - type: object
          description: Standard crypto fee structure (non-Stripe transactions)
          properties:
            type:
              type: string
              enum:
                - standard_fee
              description: Fee type identifier
            feeVersion:
              type: number
              description: Fee version number
              example: 1
            tokenToCheckBalance:
              type: string
              description: >-
                Token contract address used to check balance for whale discount
                (B3 token)
              example: '0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3'
            recipientBalance:
              type: string
              description: Recipient's B3 token balance
              example: '302843673392800000000000'
            anyspendFeeBps:
              type: number
              description: AnySpend base fee in basis points before discounts
              example: 80
            anyspendWhaleDiscountBps:
              type: number
              description: Whale discount in basis points based on B3 balance
              example: 5000
            anyspendPartnerDiscountBps:
              type: number
              description: Partner discount in basis points (deprecated, always 0)
              example: 0
            finalFeeBps:
              type: number
              description: Final fee in basis points after all discounts applied
              example: 40
          required:
            - type
            - feeVersion
            - tokenToCheckBalance
            - recipientBalance
            - anyspendFeeBps
            - anyspendWhaleDiscountBps
            - anyspendPartnerDiscountBps
            - finalFeeBps
        - type: object
          description: Stripe Web2 fee structure including both Stripe and AnySpend fees
          properties:
            type:
              type: string
              enum:
                - stripeweb2_fee
              description: Fee type identifier
            feeVersion:
              type: number
              description: Fee version number
              example: 1
            tokenToCheckBalance:
              type: string
              description: >-
                Token contract address used to check balance for whale discount
                (B3 token)
              example: '0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3'
            recipientBalance:
              type: string
              description: Recipient's B3 token balance
              example: '302843673392800000000000'
            stripeFeeBps:
              type: number
              description: Stripe fee percentage in basis points (5.4%)
              example: 540
            stripeFeeUsd:
              type: number
              description: Stripe fixed fee in USD
              example: 0.3
            anyspendFeeBps:
              type: number
              description: AnySpend base fee in basis points before discounts
              example: 80
            anyspendFeeUsd:
              type: number
              description: AnySpend fixed fee in USD before discounts
              example: 0
            anyspendWhaleDiscountBps:
              type: number
              description: Whale discount in basis points based on B3 balance
              example: 5000
            anyspendPartnerDiscountBps:
              type: number
              description: Partner discount in basis points (deprecated, always 0)
              example: 0
            finalFeeBps:
              type: number
              description: >-
                Final combined fee percentage in basis points after all
                discounts
              example: 580
            finalFeeUsd:
              type: number
              description: Final combined fixed fee in USD after all discounts
              example: 0.3
            originalAmount:
              type: string
              description: Original amount before fees in USDC units (6 decimals)
              example: '10000000'
            finalAmount:
              type: string
              description: Final amount after applying all fees in USDC units (6 decimals)
              example: '9120000'
          required:
            - type
            - feeVersion
            - tokenToCheckBalance
            - recipientBalance
            - stripeFeeBps
            - stripeFeeUsd
            - anyspendFeeBps
            - anyspendFeeUsd
            - anyspendWhaleDiscountBps
            - anyspendPartnerDiscountBps
            - finalFeeBps
            - finalFeeUsd
            - originalAmount
            - finalAmount
      discriminator:
        propertyName: type

````