Octarine · RFQ API v1

Octarine RFQ API

Sell a tokenized real-world asset for a stablecoin at the best price available. Your users get the same sources, prices and fees as on Octarine.

  • LPs and issuer redemptions (Midas, Plume Vaults, Origin, Grove, Upshift, Multiliquid, Falcon, Balancer pools…): instant and atomic
  • Market makers: Octarine's RFQ desks, settled on the audited OctarineRFQ contract
  • Fission and Symbiotic: the seller signs and is paid minutes later
  • Best route: one sale split across several sources when that pays more

Quick start

Base URL: …. Send your key in the x-api-key header on every request.

  1. Get a quote
    POST /quote
    
    {
      "chainId": 1,
      "sellToken": "0x…",        // the asset
      "buyToken": "0x…",         // e.g. USDC
      "sellAmount": "1000000000000000000",
      "taker": "0x…"             // the seller's wallet
    }

    You get a quoteId, a request for the seller to sign, and routes, best first. Each route has amountOut (what the seller receives, after fees) and transactions (what to send).

  2. Have the seller sign the request
    POST /quote/:quoteId/request-signature
    
    { "signature": "0x…" }

    Sign request.typedData with the seller's wallet (eth_signTypedData_v4). Do it right away: market-maker routes need it to settle.

  3. Send the route's transactions

    Pick a route and send its transactions in order from the seller's wallet: usually an approval, then the sale.

  4. Report the transaction
    POST /fill
    
    { "quoteId": "rfq_…", "routeId": "lp:midas-mtbill", "txHash": "0x…" }

    Done. We check the transaction on-chain and mark the quote filled.

Fission and Symbiotic routes are signed instead of sent: see Executing a route.

Try it

Calls the API live with your key. Check liquidity commits to nothing. Get quote opens a real quote that market makers can bid on, but nothing is sold unless the seller's wallet signs and sends.

Basics

  • Amounts are strings in the token's smallest unit (wei). Fees are in bps (1 bp = 0.01%). Addresses come back lowercased.
  • Every amount also has a readable twin: amountOut: "1113683414" comes with amountOutFormatted: "1113.683414". Use the raw value on-chain and the formatted one for display.
  • amountOut is always after every fee, so any two routes compare directly.
  • Quotes expire after 5 minutes by default (expiryMinutes, 1–60). A quote settles once: when one route fills, the others are void.
  • Keys are per integrator. A quote can only be read, signed or filled with the key that opened it.
EndpointsRequests / min
GET /liquidity, GET /quote/:id120
GET /quote/:id/status240
Every POST60

GET /liquidity

GET /liquidity?chainId=1&sellToken=0x…&buyToken=0x…&amount=…

Every provider for a pair, grouped by type (instant or delayed), each with its fee, payout, available liquidity and settlement time. It opens no quote and pings no market maker, so you can call it as the user types. amount defaults to one whole token.

The summary gives the pair at a glance:

FieldMeaning
biddersProviders that can take the sale right now
marketMakerseligible: desks set up for this asset. bidRecently: desks that bid in the last 30 days
totalAvailableLiquidityWhat the providers can pay out now, combined
bestAmountOut / bestPriceBest payout at amount after fees, and per whole token
fastest / slowestSettlementSecondsExpected time to get paid
historyLast 30 days: quotes, completed sales, median and 90th-percentile time to payout

Live market-maker bids only exist for a real quote, so they appear in POST /quote.

POST /quote

{
  "chainId": 1,
  "sellToken": "0xdd629e5241cbc5919847783e6c96b2de4754e438",
  "buyToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "sellAmount": "50000000000000000000000",
  "taker": "0x0ddf9bae2af4b874b96d287a5ad42eb47138a902",
  "slippageBps": 1000,
  "expiryMinutes": 5
}
FieldMeaning
takerRequired. The wallet that holds the asset, sends the transactions and signs
slippageBpsWorst price the seller accepts from a market maker vs the oracle price. Default 1000 (10%)
expiryMinutesQuote lifetime, 1–60. Default 5

The call waits a few seconds for market-maker bids. Later bids appear on GET /quote/:quoteId, which returns the same shape with current routes.

The seller's request

Market-maker routes settle on OctarineRFQ, where the seller's terms are a signed EIP-712 Request. The quote's request.typedData is that request. Signing it means: sell sellAmount for at least minAmountOut, at a rate no higher than takerMaxBpsPerDay, until expiry.

POST /quote/:quoteId/request-signature

{ "signature": "0x…" }

We check the signature against taker, never return it, and never show it to market makers. To withdraw it, let the quote expire or call cancelSalt(taker, salt) on request.rfqContract.

Market makers bid a rate (a discount per day until the asset redeems), not an amount. Their amountOut is that rate priced now; it moves a little with the oracle but never below the signed minAmountOut.

Route fields

FieldMeaning
routeIdPass to /fill, /signature and /status
provider{ id, name }, e.g. Midas, Plume Vaults, Fission, or a market maker
kindlp, market_maker, network or best_route
typeinstant: paid in your transaction. delayed: paid after settlement
atomictrue: the whole sale happens or none of it
amountOutWhat the seller receives, after fees
minAmountOutMarket makers: the seller's signed floor
fee{ amount, token, bps }
settlementSecondsExpected time until the seller is paid
availableLiquidityWhat the provider can pay out right now
execution.modetransactions, signature or parts
transactionsThe steps, in order

Each step is one of:

  • approval / execute: { to, data, value }, send it from taker
  • signature: sign its typedData and post it to /quote/:quoteId/signature
  • request_signature: the seller's request. Sign it and post it to /quote/:quoteId/request-signature first

Executing a route

Mode transactions: LPs, market makers

Send each transaction in order from taker (skip the approval if the allowance already covers it). When the execute transaction is mined, post /fill with its hash. Reporting twice is safe. Simulate the execute step first (eth_call from taker) to catch a revert.

Mode signature: Fission, Symbiotic

  1. Send any approval transactions.
  2. Sign the signature step's typedData with taker.
  3. Post { "routeId": "lp:fission", "signature": "0x…" } to /quote/:quoteId/signature.
  4. Poll GET /quote/:quoteId/status?routeId=… until filled or failed. Don't call /fill for these.

Mode parts: a best route that includes Fission or Symbiotic

Run each part in execution.parts in order, by its own mode, and pass its partId to /fill or /signature.

A route with parts is not all or nothing. If the first part sells and the second fails, the seller keeps the unsold rest (status partial). Tell the user before they sign.

Status

GET /quote/:quoteId/status?routeId=lp:fission

{ "quoteId": "rfq_…", "routeId": "lp:fission", "state": "settling", "detail": "deposited" }
stateMeaning
pendingNothing submitted yet
settlingSubmitted, waiting to settle
filledSeller paid. txHash is the payout
failedNot sold
partialBest route only: one part sold, a later one failed

Execute before expiresAt. If the price moves before you send, the transaction reverts and nothing is sold: get a fresh quote and retry.

Errors

CodeMeaning
400Bad input, unsupported chain, expired quote, or wrong signer
401Missing or wrong x-api-key
403The quote belongs to another key
404Unknown quote, route or part
409Provider busy. Retry shortly
429Too many requests

A market-maker execute step that fails on-chain reverts with a named OctarineRFQ error:

ErrorWhat to do
OrderExpiredRefresh the quote, or open a new one
ReceivedBelowMinimumPrice moved under the floor. Refresh and retry
MakerAmountTooHighPick another route
InvalidSignatureRe-sign the request with taker, or pick another route
AssetHalted, EnforcedPauseUse an LP route or try later

Chains and assets

The EVM chains Octarine supports, including Ethereum and Plume. Pairs are an RWA sold for a stablecoin. GET /liquidity shows what a pair has. Ask us to enable a pair or a chain.