Get Operation
curl --request GET \
--url https://api.example.com/v1/operations/{id}import requests
url = "https://api.example.com/v1/operations/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/operations/{id}', 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/operations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/operations/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/operations/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/operations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyOperations
Get Operation
GET /v1/operations/:id — Check operation status
GET
/
v1
/
operations
/
{id}
Get Operation
curl --request GET \
--url https://api.example.com/v1/operations/{id}import requests
url = "https://api.example.com/v1/operations/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/operations/{id}', 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/operations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/operations/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/operations/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/operations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyEndpoint:
GET https://api.rebelfi.io/v1/operations/:idPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | number | Yes | Operation ID |
Example Request
curl -X GET "https://api.rebelfi.io/v1/operations/123" \
-H "x-api-key: your_api_key"
const operation = await client.operations.get(123);
Example Response (Awaiting Signature)
{
"operationId": 123,
"type": "SUPPLY",
"status": "AWAITING_SIGNATURE",
"transactions": [
{
"id": 456,
"blockchain": "solana",
"status": "UNSIGNED",
"unsignedTransaction": "AQAAAA...base64...",
"description": "Supply 1000 USDC to Kamino"
}
],
"expiresAt": "2024-01-15T10:35:00.000Z"
}
Example Response (Confirmed)
{
"operationId": 123,
"type": "SUPPLY",
"status": "CONFIRMED",
"transactions": [
{
"id": 456,
"blockchain": "solana",
"status": "CONFIRMED",
"unsignedTransaction": "AQAAAA...base64...",
"txHash": "5abc...xyz",
"description": "Supply 1000 USDC to Kamino"
}
],
"expiresAt": "2024-01-15T10:35:00.000Z"
}
Example Response (Expired)
No signed transaction was submitted or seen on chain byexpiresAt. The transaction was never signed, so it reads
UNSIGNED:
{
"operationId": 123,
"type": "SUPPLY",
"status": "EXPIRED",
"transactions": [
{
"id": 456,
"blockchain": "solana",
"status": "UNSIGNED",
"unsignedTransaction": "AQAAAA...base64...",
"description": "Supply 1000 USDC to Kamino"
}
],
"expiresAt": "2024-01-15T10:35:00.000Z"
}
Example Response (Failed)
{
"operationId": 123,
"type": "SUPPLY",
"status": "FAILED",
"transactions": [
{
"id": 456,
"blockchain": "solana",
"status": "FAILED",
"unsignedTransaction": "AQAAAA...base64...",
"txHash": "5abc...xyz",
"error": "Transaction reverted: slippage exceeded",
"description": "Supply 1000 USDC to Kamino"
}
],
"expiresAt": "2024-01-15T10:35:00.000Z"
}
Operation Status Values
| Status | Description |
|---|---|
PENDING | Waiting for approval; its transactions are not built yet |
AWAITING_SIGNATURE | Unsigned transactions ready to sign, before expiresAt |
SUBMITTED | A transaction was submitted; waiting for confirmation, or for the next transaction to be signed |
CONFIRMED | Every transaction confirmed on chain |
FAILED | A transaction failed on chain, or the operation could not be prepared |
CANCELLED | Cancelled before anything was submitted: by you, by a replan with the same API key, by your dashboard users, by RebelFi, or because its client account was suspended. An approval that was rejected also reads CANCELLED |
EXPIRED | No signed transaction was submitted or seen on chain by expiresAt |
expiresAt is the signing deadline of the transaction that is next
to sign (five minutes after it became signable). It is omitted when the operation never had a transaction to sign.
EXPIRED and CANCELLED are final unless the operation’s planned transaction lands on chain anyway (for example, it
was signed just before the deadline and confirmed after it, or broadcast after a cancel). RebelFi then records it and
the operation becomes CONFIRMED, with the funds booked as usual. RebelFi also alerts your organization when this
happens. Keep polling an EXPIRED operation for a few minutes if you signed or broadcast a transaction for it.Transaction Failure Codes
| Code | Description |
|---|---|
REVERTED | Smart contract execution reverted |
OUT_OF_GAS | Transaction ran out of gas |
TIMEOUT | Not included in block within timeout |
NONCE_TOO_LOW | Nonce already used |
INSUFFICIENT_FUNDS | Not enough SOL for gas |
REPLACED | Replaced by another transaction |
DROPPED | Dropped from mempool |
UNKNOWN | Unknown failure |
Errors
| Code | Description |
|---|---|
OPERATION_NOT_FOUND | Operation ID doesn’t exist |