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

# Build deposit operation

> Build an unsigned Solana deposit transaction for Jupiter Lend or Kamino.

Build a deposit returns an unsigned transaction. Sign it with the user's wallet, then broadcast via your own RPC or optionally through [`POST /yield/broadcast`](/broadcast-your-operations).

<Steps>
  <Step title="Endpoint">
    ```shellscript theme={null}
    POST /yield/deposit
    ```

    | Parameter    | Type   | Required | Description                               |
    | ------------ | ------ | -------- | ----------------------------------------- |
    | `provider`   | string | ✅        | `jupiter_lend` or `kamino`                |
    | `asset`      | string | ✅        | Token symbol (e.g. `USDC`)                |
    | `wallet`     | string | ✅        | User's Solana public key                  |
    | `amount`     | string | ✅        | Decimal amount to deposit (e.g. `"10.0"`) |
    | `chain_name` | string | ✅        | Network (e.g. `solana`)                   |
  </Step>

  <Step title="Request example">
    ```shellscript theme={null}
    curl --request POST \
      --url https://api.starkfi.io/yield/deposit \
      --header 'Content-Type: application/json' \
      --header 'x-api-key: <api_key>' \
      --data '{
        "provider": "jupiter_lend",
        "asset": "USDC",
        "wallet": "FmTGYpzX27fDqaiytXUdFVaphC5o68G61Q3uhVM2d8bm",
        "amount": "0.01",
        "chain_name": "solana"
      }'
    ```
  </Step>

  <Step title="Expected response">
    ```json theme={null}
    {
      "statusCode": 200,
      "success": true,
      "status": "deposit_yield_strategy_ok",
      "message": "Yield strategy deposited successfully",
      "data": {
        "transaction": "AQAAAAA...",
        "charged_starkfi_fee_amount": 0.1,
        "charged_whitelabel_fee_amount": 0.05,
        "starkfi_fee_percentage_applied": 0.5,
        "used_yield_starkfi_custom_fee": false
      }
    }
    ```

    `data.transaction` is the base64 **unsigned** Solana wire. Fee fields reflect StarkFi/whitelabel charges embedded in the transaction when applicable.
  </Step>

  <Step title="Sign and broadcast">
    Sign the wire with the user's keypair, then either:

    * **Your RPC:** `connection.sendRawTransaction(signedBytes)`, or
    * **StarkFi (optional):** [`POST /yield/broadcast`](/broadcast-your-operations) with `chain_name` and `op_signed`

    <Warning>
      StarkPay [`POST /payment/execute/on-chain`](/broadcast-transactions) is still **required** for payment flows. Yield broadcast is optional.
    </Warning>

    ```typescript theme={null}
    import { Keypair, Transaction } from "@solana/web3.js";
    import bs58 from "bs58";

    const keypair = Keypair.fromSecretKey(bs58.decode(privateKeyBase58));
    const tx = Transaction.from(Buffer.from(wireBase64, "base64"));
    tx.sign(keypair);
    const signedTx = tx.serialize().toString("base64");
    ```
  </Step>
</Steps>
