Earn

Build an unsigned external-wallet deposit transaction

Builds one unsigned vault deposit transaction for a wallet SDP does not custody. By default the owner is the fee payer and only required signer; pass feePayer to pay the network fee (and any first-deposit account rent) from your own wallet instead — the transaction then also requires that wallet's signature, added server-side before submit. The transaction expires with its blockhash, and nothing moves until the signed bytes are submitted.

post/v1/earn/external-wallet/deposit-transactions

Headers

x-project-idstring

Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

Example:prj_example

Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

Request body

strategyIdstring required
ownerAddressstring required

The external wallet: the customer's own Solana address. It signs and owns the shares; SDP holds no key for it. It also pays the network fee unless the build names a feePayer. The pattern is necessary but not sufficient — the string must additionally decode to a 32-byte public key, which no pattern can express, so a well-shaped base58 string that does not decode still answers 400.

feePayerstring

Optional: sponsor this transaction from your own wallet instead of the customer's. The named address becomes the transaction's fee payer — it pays the network fee, and it funds the share-account rent an account creation needs — and the built transaction then requires ITS signature alongside the owner's: co-sign server-side with the fee payer's key before submitting. The wallet needs a SOL balance; simulation refuses the build (400, naming the fee payer) when it cannot pay. Sending the owner's own address means the default (the owner pays and signs alone).

amountstring required

Deposit amount as a decimal string — the vault token's units, or the SOURCE token's units when sourceTokenMint requests a swap-funded build (the swap consumes it whole and the vault deposit is sized to the swap's guaranteed output).

minSharesOutstring

Slippage floor in share units. Required whenever the selected strategy's depositSlippage.quoteRequired is true, and for every production deposit. Derive it from POST /v1/earn/vault-deposit-previews, never from the deposit amount.

sourceTokenMintstring

Fund the deposit in a different supported stablecoin (USDC, USDG, PYUSD or USDT on the environment's cluster): a Jupiter swap to the vault's own token is prepended inside the same transaction, so both legs land atomically or not at all. Equal to the strategy's deposit mint it is a no-op, so pickers may always send their selection.

swapSlippageBpsinteger

Swap slippage tolerance in basis points (default 2, accepted 1-500). Only valid together with sourceTokenMint. The deposit is sized to the swap's worst-case output, so a wider tolerance leaves a larger possible remainder of the vault token in the owner's account rather than risking the transaction.

Example request

{
  "strategyId": "earn_strategy_example",
  "ownerAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
  "feePayer": "3nMFwZXwY1s1M5s8vYAHqd4wGs4iSxXE4LRoUMMYqEgF",
  "amount": "25",
  "minSharesOut": "24.9",
  "sourceTokenMint": "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo",
  "swapSlippageBps": 2
}

Response

Unsigned deposit transaction

Example response

{
  "data": {
    "transaction": {
      "transactionId": "earn_external_wallet_transaction_example",
      "lastValidBlockHeight": "361186610",
      "ownerAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
      "feePayer": "3nMFwZXwY1s1M5s8vYAHqd4wGs4iSxXE4LRoUMMYqEgF",
      "provider": "kamino",
      "providerReference": "7uib8xGAwkaPz4ZGCA6t8sSEid5Yp9ty13PHUweTypx",
      "tokenMint": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
      "shareMint": "hXm2xSRF5PLKGMrTvAWqKhR76MuJX5dAabeSChkjqu2",
      "amount": "25",
      "minSharesOut": "25",
      "swap": {
        "sourceTokenMint": "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo",
        "sourceAmount": "25",
        "depositAmount": "25",
        "quotedAmount": "25",
        "slippageBps": 2,
        "priceImpactPct": "0.0001",
        "routeLabels": [
          "Whirlpool"
        ]
      },
      "strategy": {
        "id": "earn_strategy_example",
        "name": "Allez USDC",
        "provider": "kamino",
        "providerReference": "7uib8xGAwkaPz4ZGCA6t8sSEid5Yp9ty13PHUweTypx",
        "hostCluster": "devnet"
      }
    }
  },
  "meta": {
    "requestId": "req_example",
    "timestamp": "2025-01-01T00:00:00.000Z"
  }
}

Changes

Changed in 3 of the 13 revisions of this API.27

    • added the new optional request property

      new-optional-request-property

    • added subschema #1 subschema #2 to the response property anyOf list for the response status

      response-property-any-of-added

    • removed subschema #1 subschema #2 from the response property anyOf list for the response status

      response-property-any-of-removed

    • the response's property type changed from object to no type for status

      response-property-type-changed

    • removed the required property / from the response with the status

      response-required-property-removed

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added subschema #1 subschema #2 to the response property anyOf list for the response status

      response-property-any-of-added

    • endpoint added

      endpoint-added