Skip to main content
GET
/
v1
/
operations
/
{id}
Get Operation
curl --request GET \
  --url https://api.example.com/v1/operations/{id}
Endpoint: GET https://api.rebelfi.io/v1/operations/:id
Get the current status of an operation.

Path Parameters

ParameterTypeRequiredDescription
idnumberYesOperation ID

Example Request

curl -X GET "https://api.rebelfi.io/v1/operations/123" \
  -H "x-api-key: your_api_key"

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

StatusDescription
PENDINGOperation created, building transactions
AWAITING_SIGNATUREUnsigned transaction ready for signing
SUBMITTEDTransaction submitted, waiting for confirmation
CONFIRMEDSuccessfully confirmed on-chain
FAILEDTransaction 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

CodeDescription
REVERTEDSmart contract execution reverted
OUT_OF_GASTransaction ran out of gas
TIMEOUTNot included in block within timeout
NONCE_TOO_LOWNonce already used
INSUFFICIENT_FUNDSNot enough SOL for gas
REPLACEDReplaced by another transaction
DROPPEDDropped from mempool
UNKNOWNUnknown failure

Errors

CodeDescription
OPERATION_NOT_FOUNDOperation ID doesn’t exist