Skip to main content
POST
Supply
Endpoint: POST https://api.rebelfi.io/v1/operations/supply
Plan a supply operation to put a wallet’s funds into a yield strategy.

Request Body

Provide one wallet identifier:

Example Request

Example Response (EVM)

EVM supply operations may include multiple transactions (e.g., an ERC-20 approve followed by a supply):
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.
Both examples were planned at 10:30:00: expiresAt is five minutes later. See Signing deadline.

Example Response (Solana)

Signing deadline

expiresAt is the deadline for the transaction that is next to sign: five minutes after it became signable. It is the same for every chain and wallet profile, and it is not configurable.
  • Sign and submit (or broadcast and report) before expiresAt. Fetching fresh unsigned transactions (GET /v1/operations/:id/unsigned-transactions) does not move it.
  • When an operation has more than one transaction (an EVM approve, then the supply), the next transaction gets a fresh five minutes once the previous one is submitted. Read expiresAt again with Get Operation.
  • Past the deadline, fetching unsigned transactions and Submit Signed return OPERATION_EXPIRED, and the operation becomes EXPIRED once no transaction of it is in flight. Plan it again once it has left AWAITING_SIGNATURE: if a Submit Signed returned resubmitSameTransaction: true, or you reported a hash, the operation stays live until RebelFi sees whether that transaction landed, and a plan meanwhile gets OPERATION_IN_PROGRESS.
  • Submit Hash is never refused for the deadline: a transaction you already broadcast is recorded if it is the planned one. An EXPIRED operation whose transaction lands late becomes CONFIRMED.
  • expiresAt is omitted when the operation has no transaction to sign, for example a plan cancelled while it was being built (see below).

Planning on a busy wallet

A wallet has one live operation at a time. When you plan on a wallet that already has one:
cancelledOperations is present only when this plan replaced your own earlier plans. It never lists another key’s or user’s operation, or one whose transaction may still land: those are never replaced.
Two API keys planning on the same wallet now block each other. If more than one of your services plans on one wallet, use one API key for that wallet, or wait for the other plan to be submitted or to expire (usually shortly after its expiresAt; if expiresAt has passed, retry in a few seconds), or cancel it by ID with Cancel Operation. An operation whose transaction may still land is held until RebelFi sees whether it landed.
OPERATION_IN_PROGRESS names the operation that holds the wallet:
details.status is the blocking operation’s status; details.expiresAt is present when it has a signing deadline. If an operation is cancelled while its transactions are being built (for example, your own concurrent replan replaced it), the reply is still 201, with "status": "CANCELLED", "transactions": [] and no expiresAt. Plan again if you need the operation.

Errors

Client accounts

When your organization opens client accounts, a supply is planned only on a wallet linked to an ACTIVE account. A supply refused because the account is not active returns no operation. If the account is suspended while the supply is being built, the operation it already created is cancelled, and so are your own planned operations it replaced. The reply is then 201 with "status": "CANCELLED" and no transactions.
Unwind is never refused because of an account’s status.