Submit Signed
curl --request POST \
--url https://api.example.com/v1/transactions/submit-signedimport requests
url = "https://api.example.com/v1/transactions/submit-signed"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/transactions/submit-signed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/transactions/submit-signed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/transactions/submit-signed"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/transactions/submit-signed")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/transactions/submit-signed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyTransactions
Submit Signed
POST /v1/transactions/submit-signed — Submit a signed transaction for RebelFi to broadcast
POST
/
v1
/
transactions
/
submit-signed
Submit Signed
curl --request POST \
--url https://api.example.com/v1/transactions/submit-signedimport requests
url = "https://api.example.com/v1/transactions/submit-signed"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/transactions/submit-signed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/transactions/submit-signed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/transactions/submit-signed"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/transactions/submit-signed")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/transactions/submit-signed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyEndpoint:
POST https://api.rebelfi.io/v1/transactions/submit-signedAWAITING_SIGNATURE, or SUBMITTED with a
transaction still to sign), before its expiresAt. Every check runs before anything is broadcast:
- Past the operation’s signing deadline (
expiresAt):OPERATION_EXPIRED. If an earlier submit returnedresubmitSameTransaction: true, or you reported a hash, the operation stays live until RebelFi sees whether that transaction landed: poll Get Operation until it leavesAWAITING_SIGNATUREbefore planning again (a plan meanwhile getsOPERATION_IN_PROGRESS). If it becomesSUBMITTEDorCONFIRMED, the transaction landed and there is nothing to plan again. - The operation is not waiting for a signature (for example,
CANCELLED, including a supply cancelled because its client account was suspended):VALIDATION_FAILED. - The signed transaction is not one RebelFi planned for this operation:
TRANSACTION_MISMATCH. RebelFi compares what it does with the plan: on EVM the chain, sender, contract (to), call data and value (nonce and gas may differ); on Solana the wallet’s signature and the instructions (compute budget and fee payer may differ). For an EVM approve and supply, RebelFi works out which of the two you sent.
CONFIRMED.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
operationId | number | Yes | Operation ID from supply/unwind |
signedTransaction | string | Yes | Signed transaction (base64 for Solana, hex for EVM) |
signedTransaction; a txHash field (sent by SDKs before 1.4.5) is ignored.
There is no transactionId: RebelFi recognizes which of the operation’s transactions you signed.
Example Request
curl -X POST "https://api.rebelfi.io/v1/transactions/submit-signed" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"operationId": 123,
"signedTransaction": "AQAAAA...base64..."
}'
const result = await client.transactions.submitSigned({
operationId: 123,
signedTransaction: 'AQAAAA...base64...'
});
Example Response
202 Accepted
{
"id": 456,
"operationId": 123,
"status": "PENDING",
"txHash": "5UfD...xyz"
}
id is the operation’s transaction the signed transaction was recorded for.
Retrying safely
RebelFi sends one signed transaction per planned transaction, so one plan can never land twice (on EVM, a re-signed transaction at the next nonce would otherwise be a second supply).- The same signed bytes can be resubmitted safely. Once RebelFi has recorded them, a resubmission is answered with
the same
202and nothing is broadcast again, whatever the operation’s status (a retry after a lost reply). Before that, sending the same transaction again is harmless and is also a202. - A different signature of the same transaction while the first one is being broadcast or may still land is refused
with
409OPERATION_ALREADY_SUBMITTED. Nothing is broadcast. Resubmit the first signed transaction, or check the operation’s status, before signing again. - A failed broadcast is
400OPERATION_ALREADY_SUBMITTED. Readdetails.resubmitSameTransaction:false: the node refused the transaction before accepting it (for example, not enough gas, or an expired Solana blockhash). Nothing is on its way. Fetch fresh unsigned transactions and sign again.true: the transaction may have reached the network (no answer, a gateway error, or the node already knows it). Resubmit the same signed transaction; do not sign again. A different signature is refused with409until the first one lands or the operation passes itsexpiresAt.
- If the plan cannot be checked right now, the reply is
503INTERNAL_ERRORand nothing was broadcast. Retry the same signed transaction shortly.
{
"code": "OPERATION_ALREADY_SUBMITTED",
"message": "Broadcast failed: request timeout. The transaction may have reached the network: resubmit the same signed transaction (do not sign it again), ...",
"details": { "operationId": 123, "resubmitSameTransaction": true }
}
Errors
| Code | HTTP | Description |
|---|---|---|
OPERATION_NOT_FOUND | 404 | Operation ID doesn’t exist |
OPERATION_EXPIRED | 400 | The operation passed its signing deadline. Nothing was broadcast. details: { operationId, expiresAt? }. Plan again once Get Operation shows it has left AWAITING_SIGNATURE (see above) |
TRANSACTION_MISMATCH | 400 | Not a transaction planned for this operation. Nothing was broadcast or recorded. details: { operationId } |
OPERATION_ALREADY_SUBMITTED | 409 | Another signed transaction for this transaction is being broadcast or is recorded. Nothing was broadcast. details: { operationId, transactionId } |
OPERATION_ALREADY_SUBMITTED | 400 | The broadcast failed. details: { operationId, resubmitSameTransaction }. See Retrying safely |
VALIDATION_FAILED | 400 | signedTransaction is not a signed transaction of the operation’s chain; or the operation is not waiting for a signature (for example, cancelled) or its transaction is no longer unsigned. Nothing was broadcast |
INTERNAL_ERROR | 503 | The plan could not be checked right now. Nothing was broadcast; retry the same signed transaction |