Skip to main content
After building and signing a deposit, withdraw, or rebalance operation, you can submit the signed wire through StarkFi — or broadcast it yourself with your own RPC.
This endpoint is optional for Yield Aggregator. If you already have a Solana RPC (public or private), sign the transaction and call sendTransaction directly on your infrastructure.Use StarkFi yield broadcast when you prefer a managed relay without running private RPC infrastructure.
StarkPay is different. On-chain StarkPay payments must use POST /payment/execute/on-chain. Do not substitute yield broadcast for StarkPay flows.

Endpoint

POST /yield/broadcast

Request body

ParameterTypeRequiredDescription
chain_namestringNetwork where the transaction was built (e.g. solana).
op_signedstring | string[]Base64 signed Solana transaction wire. One string for a single tx. An array of up to two strings when rebalance returned separate withdraw and deposit transactions.
No operation, position_id, or position references are required — position tracking was removed from the yield flow.

Example — single transaction

curl --request POST \
  --url https://api.starkfi.io/yield/broadcast \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \
  --data '{
    "chain_name": "solana",
    "op_signed": "<base64_signed_transaction>"
  }'

Example — rebalance with two transactions

{
  "chain_name": "solana",
  "op_signed": [
    "<base64_signed_withdraw_tx>",
    "<base64_signed_deposit_tx>"
  ]
}

Success response

{
  "statusCode": 200,
  "success": true,
  "status": "broadcast_operation_yield_strategy_ok",
  "message": "Yield operation broadcasted successfully",
  "data": {
    "status": 1,
    "transactionHash": "5VERv8NMvzbJME..."
  }
}
FieldDescription
statusConfirmation status (1 = successful on Solana)
transactionHashOn-chain signature when available

Errors

HTTPStatusWhen
400invalid_parametersValidation failed (missing chain_name or op_signed)
400signed_transaction_missingNo usable signed payload
409solana_blockhash_expiredBlockhash expired — rebuild the unsigned operation and sign again
504broadcast_confirmation_timeoutSubmitted but not confirmed in time — check the signature on a Solana explorer
502broadcast_* / confirm_*Relay or confirmation failed (see details)
500server_errorUnhandled server error

Self-broadcast alternative

If you skip this endpoint, deserialize the unsigned wire from the build step, sign it, and submit via your Solana connection:
import { Connection, Transaction } from "@solana/web3.js";

const connection = new Connection("https://your-rpc.example.com");
const signedBytes = Buffer.from(signedBase64, "base64");
const signature = await connection.sendRawTransaction(signedBytes);
await connection.confirmTransaction(signature, "confirmed");
Rebuild the operation if the blockhash expires before submission.