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

# Prepare transaction fields for DEFI actions



## OpenAPI

````yaml /api-reference/openapi.json get /v2/farming/tx/prepare
openapi: 3.0.0
info:
  title: Nimbus API
  version: 1.0.0
  description: >-
    API for Nimbus


    ## Rate Limiting

    This API implements rate limiting to ensure fair usage and protect our
    services. The current rate limit is:


    - **40 requests per 1 minute** per IP address


    If you exceed this limit, you will receive a 429 (Too Many Requests)
    response. Please wait for the rate limit window to reset before making
    additional requests.


    If you need more, please contact us at **thanhle@getnimbus.io** or TG
    **@thanhle27** to get premium API Key.
servers:
  - url: https://api.getnimbus.io
    description: API server
security: []
tags: []
paths:
  /v2/farming/tx/prepare:
    get:
      tags:
        - DEFI Actions
      summary: Prepare transaction fields for DEFI actions
      parameters:
        - in: query
          name: chain
          required: true
          schema:
            type: string
            enum:
              - SUI
          description: The blockchain network
        - in: query
          name: protocol
          required: true
          schema:
            type: string
            enum:
              - alpha-fi
              - navi
              - scallop
              - suilend
              - native-staking
          description: The protocol name
        - in: query
          name: type
          required: true
          schema:
            type: string
            enum:
              - LENDING
              - BORROW
              - REPAY
              - ADD_LP
              - REMOVE_LP
              - STAKING
              - UNSTAKING
              - LENDING_WITHDRAW
          description: >-
            The type of DEFI actions (type chosen properly with protocol
            provided)
      responses:
        '200':
          description: Transaction fields prepared successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Name of the transaction field
                          example: type
                        type:
                          type: string
                          description: Data type of the field
                          example: string
        '400':
          description: Missing required query parameters
        '500':
          description: Server error

````