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

# Get Instructions

> POST /api/v1/instructions — Get raw Solana instructions for custom transaction composition.



## OpenAPI

````yaml POST /api/v1/instructions
openapi: 3.1.0
info:
  title: Argyros API
  description: >-
    Swap aggregator API on Fogo. Get quotes, build swap transactions, and
    retrieve raw instructions for multi-hop token swaps across Vortex, Fluxbeam,
    Fogo.fun, and Moonit. Solana support coming soon.
  version: 1.0.0
  contact:
    name: Argyros
    url: https://argyros.finance
servers:
  - url: https://api.argyros.xyz
    description: Production
security: []
paths:
  /api/v1/instructions:
    post:
      tags:
        - Instructions
      summary: Get raw swap instructions
      description: >-
        Returns raw Solana instructions for a swap without wrapping them in a
        transaction. Use this when you need to compose swap instructions with
        other instructions in a custom transaction. The caller is responsible
        for fetching a recent blockhash, building the transaction, signing, and
        submitting.
      operationId: buildInstructions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstructionsRequest'
      responses:
        '200':
          description: Instructions generated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/InstructionsResponse'
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No route found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Instruction build failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    InstructionsRequest:
      type: object
      description: >-
        Parameters for getting raw swap instructions. Same as SwapRequest
        without skipSimulation.
      properties:
        userWallet:
          type: string
          description: User's wallet address (signer).
          example: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
        inputMint:
          type: string
          example: So11111111111111111111111111111111111111112
        outputMint:
          type: string
          example: uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG
        amount:
          type: string
          example: '1000000000'
        swapMode:
          type: string
          enum:
            - ExactIn
            - ExactOut
          example: ExactIn
        slippageBps:
          type: integer
          default: 50
          example: 50
      required:
        - userWallet
        - inputMint
        - outputMint
        - amount
        - swapMode
    InstructionsResponse:
      type: object
      description: Raw swap instructions for custom transaction composition.
      properties:
        amountIn:
          type: string
          example: '1000000000'
        amountOut:
          type: string
          example: '145320000'
        otherAmountThreshold:
          type: string
          description: >-
            Slippage-adjusted threshold. ExactIn: minimum output. ExactOut:
            maximum input.
          example: '144593400'
        feeAmount:
          type: string
          example: '100005'
        route:
          type: array
          items:
            type: string
          description: Token path from input to output.
        hopCount:
          type: integer
          example: 1
        pools:
          type: array
          items:
            type: string
          description: Pool addresses used in the route.
        instructions:
          type: array
          items:
            $ref: '#/components/schemas/RawInstruction'
          description: Ordered list of instructions to include in the transaction.
        addressLookupTableAddresses:
          type: array
          items:
            type: string
          description: Address Lookup Table addresses for building a v0 transaction.
      required:
        - amountIn
        - amountOut
        - otherAmountThreshold
        - feeAmount
        - route
        - hopCount
        - pools
        - instructions
        - addressLookupTableAddresses
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: no route found
      required:
        - success
        - error
    RawInstruction:
      type: object
      description: A single Solana instruction.
      properties:
        programId:
          type: string
          description: Base58-encoded program ID.
        data:
          type: string
          description: Base64-encoded instruction data.
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/RawAccountMeta'
      required:
        - programId
        - data
        - accounts
    RawAccountMeta:
      type: object
      properties:
        publicKey:
          type: string
          description: Base58-encoded account public key.
        isSigner:
          type: boolean
        isWritable:
          type: boolean
      required:
        - publicKey
        - isSigner
        - isWritable

````