Supply
curl --request POST \
--url https://api.example.com/v1/operations/supplyimport requests
url = "https://api.example.com/v1/operations/supply"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/operations/supply', 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/supply",
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/operations/supply"
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/operations/supply")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/operations/supply")
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_bodyOperations
Supply
POST /v1/operations/supply — Plan a supply operation
POST
/
v1
/
operations
/
supply
Supply
curl --request POST \
--url https://api.example.com/v1/operations/supplyimport requests
url = "https://api.example.com/v1/operations/supply"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/operations/supply', 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/supply",
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/operations/supply"
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/operations/supply")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/operations/supply")
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/operations/supplyRequest Body
Provide one wallet identifier:| Field | Type | Required | Description |
|---|---|---|---|
walletAddress | string | One of | Wallet address |
walletId | number | One of | Wallet ID from registration |
strategyId | number | Yes | Target strategy ID (from venue listing) |
amount | string | Yes | Amount in base units (e.g., "1000000" for 1 USDC) |
tokenAddress | string | Yes | Token contract address |
Example Request
curl -X POST "https://api.rebelfi.io/v1/operations/supply" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"walletId": 42,
"strategyId": 5,
"amount": "1000000000",
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}'
curl -X POST "https://api.rebelfi.io/v1/operations/supply" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"walletId": 42,
"strategyId": 1,
"amount": "1000000000",
"tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}'
const operation = await client.operations.supply({
walletId: 42,
strategyId: 5,
amount: '1000000000',
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
});
Example Response (EVM)
EVM supply operations may include multiple transactions (e.g., an ERC-20approve followed by a supply):
{
"operationId": 123,
"type": "supply",
"status": "AWAITING_SIGNATURE",
"transactions": [
{
"id": 456,
"blockchain": "ethereum",
"status": "unsigned",
"unsignedTransaction": "f86c...hex...",
"description": "Approve USDC for AAVE V3"
},
{
"id": 457,
"blockchain": "ethereum",
"status": "unsigned",
"unsignedTransaction": "f86c...hex...",
"description": "Supply 1000 USDC to AAVE V3"
}
],
"expiresAt": "2024-01-15T10:35:00Z"
}
On EVM chains, operations may return multiple transactions that must be signed and submitted in order. Sign and submit each transaction sequentially before proceeding to the next.
Example Response (Solana)
{
"operationId": 124,
"type": "supply",
"status": "AWAITING_SIGNATURE",
"transactions": [
{
"id": 458,
"blockchain": "solana",
"status": "unsigned",
"unsignedTransaction": "AQAAAA...base64...",
"description": "Supply 1000 USDC to Kamino"
}
],
"expiresAt": "2024-01-15T10:35:00Z"
}
Example Response (with auto-cancelled operations)
If there were pending operations for the same wallet, they are automatically cancelled:{
"operationId": 124,
"type": "supply",
"status": "AWAITING_SIGNATURE",
"transactions": [ ... ],
"expiresAt": "2024-01-15T10:35:00Z",
"cancelledOperations": [123]
}
The
cancelledOperations field is only present when operations were auto-cancelled. It contains the IDs of the cancelled operations.Errors
| Code | Description |
|---|---|
INVALID_AMOUNT | Amount is zero, negative, or malformed |
INVALID_ADDRESS | Wallet address format is invalid |
INSUFFICIENT_BALANCE | Wallet balance too low |
STRATEGY_NOT_FOUND | Strategy ID doesn’t exist |
STRATEGY_NOT_ACTIVE | Strategy is paused |
TOKEN_MISMATCH | Token doesn’t match strategy |
INSUFFICIENT_GAS | Not enough native token for transaction fee (ETH, POL, or SOL) |
SIMULATION_FAILED | Transaction simulation failed |
OPERATION_IN_PROGRESS | Another operation is currently executing for this wallet |
WALLET_NOT_FOUND | Wallet ID doesn’t exist |
If a pending operation already exists for the same wallet, it will be automatically cancelled when you create a new one. You don’t need to cancel it first.
⌘I