Sell

Sell a token. Receive stablecoins. Instantly.

A sell (the redeem call) submits one on-chain tx that atomically locks the user's Flo Finance tokens under the order contract and creates an on-chain order_id. settle(order_id) burns the locked tokens and pays out USDC or USDT on Arbitrum to the destination wallet, in the same tx. Sells settle instantly for the user; Flo Finance offsets the underlying at custody in the background. Quantity-in, notional-out: slippage_bps bounds min_notional_usdc, and out-of-session orders auto-promote from queued to active when the venue opens. Reorg-safe: settle reads on-chain order state before burning and paying out.

SDK · Core primitive

The full sell spec lives in the docs

Quantity-in / notional-out math (slippage_bps sets min_notional_usdc), the async order_id lifecycle (queued → active → settled or cancelled), redeem.limit with limit_price + good_till, triggers (stop_loss / take_profit / OCO), the cancel endpoint, the gas sponsor model (developer or user_notional with max_gas_usdc), recovery-window semantics, and the developer-fee object. Python and Node.js tabs, copy-ready.

Open the Sell reference

How selling works

Three steps. Lock-and-create-order, custody offset, settle on chain (burn + payout in one tx). Lifecycle observable via the sell webhook stream (redeem.* events).

01

Lock + create-order tx

One POST call submits an on-chain tx that atomically locks the user's Flo tokens under the order contract and creates an on-chain order_id. Quantity-in: slippage_bps sets min_notional_usdc on the payout. Tokens are not burned at this step; they are held by the contract pending settlement. Out-of-session orders enter status: queued and auto-promote when fillable.

02

Custody offset

Flo Finance offloads the matching underlying position at custody at the best available price. Cycle is T+1 for US equities, typically T+2 for other markets, monthly or quarterly for private credit.

03

Settle on chain, burn and pay out

Once the custody leg confirms, Flo Finance's keeper calls settle(order_id) on chain. The contract checks the order is still ACTIVE, burns the locked tokens, and pays stablecoin to the destination wallet, all in the same tx. If the custody leg fails, cancel(order_id) releases the locked tokens back to the source wallet (no re-issuance needed; the tokens were never burned). If neither happens within the recovery window, the user can call user_cancel(order_id) directly.

Symmetric to buy. Same audit trail.

Every state transition is exposed via webhook and API so your books reconcile to Flo's without a manual matching step. Sells settle instantly for the user and the custodian leg follows the underlying market cycle; on-chain order state guarantees the payout never lands without the locked tokens being burned in the same settle tx.

⚡

Asynchronous, reorg-safe

The sell call (the redeem endpoint) submits one on-chain tx that atomically locks the user's tokens under the order contract and creates an on-chain order_id. Flo Finance offsets the underlying at custody; settle(order_id) burns the locked tokens and delivers the stablecoin payout in the same tx after the offset confirms. Because settle reads on-chain order state before burning and paying out, there is no reorg / double-spend window.

🔓

Sell any time, instant for the user

Sell any Flo Finance token at any time, with no sell windows, no cooldowns, and no gated exits at the API layer. Sells settle instantly; the custodian leg follows the underlying market cycle in the background (T+1 for US equities, typically T+2 for other markets, monthly or quarterly for private credit).

🌐

Payout on Arbitrum

Stablecoin payouts land on Arbitrum only, in USDC or USDT. To hold a token on another chain, bridge it after buying.

💵

USDC or USDT payouts

Choose the payout stablecoin at sell time from the set published for Arbitrum in the chains catalog (/v1/chains pay_out_currencies). Flo Finance handles the FX leg if the underlying asset is quoted in a non-USD currency.

📋

Full audit trail

Every sell is logged onchain with the lock tx, the burn-and-payout tx, and the matching Flo Finance sell record.

📡

Webhooks for every state

Subscribe to redeem.created, redeem.queued, redeem.settled, redeem.cancelled, plus order.armed, order.triggered, and fee.refunded for limit and trigger orders. Drive UI updates and accounting reconciliation.

🎯

Limit and trigger sells

redeem.limit places a sell that sits queued until the mark crosses limit_price. Stop-loss, take-profit, and atomic OCO triggers ride the same lifecycle (armed → triggered → active → settled). Cancel any open order with a single endpoint, no fee.

⛽

Configurable gas sponsor

Set gas.sponsor to developer (Flo draws from your treasury) or user_notional (gas deducted inline from gross proceeds, before payout) on every call. Optional max_gas_usdc caps the deduction.

💰

Built-in fee collection

Pass amount_bps and a destination wallet on any sell. Flo accrues your fee and settles it daily in USDC, no fee infrastructure to build.

What happens outside core trading hours

The Flo SDK mirrors every major exchange's full schedule, pre-market, core session, post-market, and overnight. Liquidity is deepest during the core session. The on-chain lock-and-create-order tx confirms immediately at any time; settle(order_id) waits for the custody leg, which clears on the underlying market cycle (T+1 for US equities, typically T+2 for other markets). When settle runs, the locked tokens are burned and stablecoin proceeds land in the destination wallet in the same tx.

Every Flo token is sellable on demand

No lockups, no gating, no custody calls. Just client.redeem() and your users get USDC or USDT on Arbitrum.

See buying