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:00Z"
}
Example Response (Confirmed)
{
"operationId": 123,
"type": "supply",
"status": "CONFIRMED",
"transactions": [
{
"id": 456,
"blockchain": "solana",
"status": "confirmed",
"txHash": "5abc...xyz",
"confirmations": 32,
"blockNumber": 245678901,
"description": "Supply 1000 USDC to Kamino"
}
],
"expiresAt": "2024-01-15T10:35:00Z"
}
Example Response (Failed)
{
"operationId": 123,
"type": "supply",
"status": "FAILED",
"transactions": [
{
"id": 456,
"blockchain": "solana",
"status": "failed",
"txHash": "5abc...xyz",
"error": "Transaction reverted: slippage exceeded",
"failureCode": "REVERTED",
"revertReason": "SlippageExceeded",
"description": "Supply 1000 USDC to Kamino"
}
],
"expiresAt": "2024-01-15T10:35:00Z"
}
Operation Status Values
| Status | Description |
|---|---|
PENDING | Operation created, building transactions |
AWAITING_SIGNATURE | Unsigned transaction ready for signing |
SUBMITTED | Transaction submitted, waiting for confirmation |
CONFIRMED | Successfully confirmed on-chain |
FAILED | Transaction failed or operation was cancelled/timed out |
Cancelled and timed-out operations are reported as
failed when retrieved via GET. The cancel endpoint returns "status": "CANCELLED" in its own response.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 |