Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Capability Matrix
Centralized Exchanges
Decentralized Exchanges (DEX)
Hyperliquid
Lighter
edgeX
Aster
Aevo
Pendle
WOOFi Pro
Uniswap / PancakeSwap
Aerodrome / Velodrome
KyberSwap
1inch
EVM DEX Common Commands
Jupiter
OKX DEX
DEX Strategy Examples
Prediction Markets
Securities and Futures
On-chain & Custom

Pendle (Spot): Trades Pendle PT (principal tokens) and YT (yield tokens). One exchange object corresponds to one wallet on one chain: market orders are swaps built by Pendle's convert API, limit orders rest on Pendle's limit order book, and the docker signs transactions and orders with the configured private key. Supported chains: Ethereum, Arbitrum, Base, BNB Chain, HyperEVM, Plasma, Robinhood, Monad, X Layer.

Futures_Boros (Futures): Trades Pendle Boros funding-rate swaps (Yield Units, YU): on an on-chain order book on Arbitrum, buy or sell the funding rate of perpetual exchanges (Hyperliquid, Binance, OKX, Gate, KuCoin, Bybit, Lighter and more) at a fixed annualized rate, settled hourly until maturity. One exchange object corresponds to one Boros sub-account (cross margin) of one wallet. Orders cost no ETH from the wallet: the docker derives an agent key from the wallet private key, the wallet approves it by signature before the first order, and every order is then signed by the agent and put on chain by Pendle's relayer, with the relay fee taken from the Boros account's gas balance.

Names and Configuration
exchange.GetName()TypeAliases
PendleSpotPendle Finance, PT, YT
Futures_BorosFuturesBoros, Pendle Boros, Futures_Boros

✓ marks the exchange objects that have the field.

FieldPendleFutures_BorosRequiredDefaultDescription
Chain✓YesEthereumThe chain of the wallet and the trades; it also determines the default nodes and the native coin's name. Options: Ethereum, Arbitrum, Base, BNB Chain, HyperEVM, Plasma, Robinhood, Monad, X Layer
Wallet Private Key✓Yes—The EVM wallet private key (hex).
RPC Address✓Nohttps://ethereum-rpc.publicnode.com,https://eth.drpc.orgRPC nodes; separate several with commas, and the next one is used automatically when a node fails. Choosing a chain fills in its default nodes.
RPC Auth✓No—Optional. For RPC nodes that need authentication: a header in the form Header-Name: value, or a Basic auth value.
Wallet Private Key✓Yes—The EVM wallet private key (hex). The docker derives the trading agent from it and signs the approval once; deposits and withdrawals are signed with it too.
Sub-account✓No0The Boros sub-account id; 0 is the main account (only it can deposit and withdraw), range 0 to 254.
API Address✓Nohttps://api-boros.pendle.finance/apisThe Boros API address; normally left as is.
RPC Address✓Nohttps://arb1.arbitrum.io/rpc,https://arbitrum-one-rpc.publicnode.comArbitrum RPC nodes (for deposits, withdrawals and on-chain nonce reads); separate several with commas, and the next one is used when a node fails.

Trading Pairs and Contract Codes
Pendle (Spot)

Pair examples: PT-apyUSD-5NOV2026_apyUSD, YT-apyUSD-5NOV2026_USDC

The first part is the PT or YT name (with its expiry, taken from Pendle's asset list; see exchange.GetMarkets()) and the second part is the quote token. The price is how many quote tokens one PT/YT is worth. The quote can be the market's underlying asset, its accounting asset, or any other token Pendle can swap on the chain (market orders route through an aggregator), or a token contract address. Pairs are not upper-cased; write them as they are.

Futures_Boros (Futures)

Pair examples: BTC_USDT, ETH_ETH, BTC_BTC

Pairs are underlying_collateral: the underlying is the asset whose funding rate is traded, the collateral is the market's margin token (WBTC is written BTC, WETH ETH, USD₮0 USDT, plus BNB and HYPE). The same market name can exist with two collaterals (for example Hyperliquid BTC with USDT and with BTC margin); the collateral tells them apart. The price is the annualized rate as a decimal (0.065 means 6.5%) and can be negative; the amount is YU in the collateral token (in a USDT-margined market 1 YU is the funding on 1 USDT of notional).

Contract codes are Boros market names with underscores, funding source_asset_maturity, such as HYPERLIQUID_BTC_30OCT2026 or BINANCE_ETHUSDT_25DEC2026; a full symbol looks like BTC_USDT.HYPERLIQUID_BTC_30OCT2026. The Boros name itself (HYPERLIQUID-BTC-30OCT2026) also works. exchange.GetMarkets() lists the available markets (unmatured only). Boros's numeric market id (such as 206) also works.

Exchange-specific IO Commands
Pendle (Spot)
CommandArgumentsDescriptionReturns
marketsymbolThe market of a pair: expiry, years to expiry, current implied APY, the PT/YT/SY, underlying and accounting asset addresses, and how much accounting asset one quote token is worth (used by the limit-order conversion).{symbol, market, name, kind, expiry, yearsToExpiry, impliedApy, pt, yt, sy, underlying, accounting, accountingPerQuote, chainId}: kind is PT or YT, expiry is a timestamp in milliseconds and the addresses are contract addresses; accountingPerQuote is null when the quote token cannot be converted through the SY (such as USDC swapped through an aggregator).
apysymbol, priceConvert a PT/YT price to an implied APY (the same conversion limit orders use): the quote is converted to the accounting asset at the SY rate, PT price = (1 + APY)^(−years to expiry), YT price = 1 − PT price. The quote token must be one the SY can convert (as for limit orders); otherwise it fails.The implied APY (0.16 means 16%); an error and null when the price has no implied APY (a PT at or above one accounting asset, a YT outside 0 to 1) or the market has expired.
pricesymbol, apyThe reverse of apy, converting an implied APY to a price in the quote token; the quote token must meet the same condition as for apy.The price.
slippage[ratio]Slippage protection of market orders, range [0, 0.5), default 0.005 (0.5%), written into the swap transaction. The order option slippage overrides it for one order. Queries when called without an argument.The current slippage ratio.
orderExpiry[seconds]Default lifetime of limit orders in seconds, 60 to 31536000 (one year), 604800 (7 days) by default, never beyond the market's expiry. (more below the table)The current lifetime (seconds).
cancelWait[seconds]How long a cancel waits for the cancel transaction to be mined, default 30, range 0 to 600. On timeout exchange.CancelOrder() still returns true, meaning the cancel was submitted. Queries when called without an argument.The current wait (seconds).
approve[mode]Approval amount: max for unlimited, exact for just what the order needs (the default). Swaps approve the Pendle Router, limit orders the Pendle limit order contract. Queries when called without an argument.The current mode.
gasMultiplier[x]gasLimit = estimated gas × x, range 1 to 5, default 1.2. Queries when called without an argument.The current multiplier.
receipttxHash[, waitMs]Query a transaction receipt: status, block, gas and fee, optionally waiting until it is mined (up to 10 minutes). For a swap order, pass the transaction hash after the comma in the order ID.{txHash, status, blockNumber, gasUsed, fee}, where status is success, reverted or pending; while not mined (pending) only txHash and status are present.
base[url]Without an argument, returns the current RPC node address; with an address, switches the node (separate several with commas), and the first request afterwards checks that the node is on the configured chain.The previous address.
address—The wallet address.—

The rest of the longer descriptions in the table:

  • orderExpiry: The order option expiry sets the expiry of one order as a timestamp in seconds or milliseconds (a point in time, not a duration); a time already past fails, and a time after the market's expiry becomes one minute before it. Queries when called without an argument.

For the common command currency see exchange.IO.

The common command api is not supported (the call fails with an error and returns null).

Futures_Boros (Futures)
CommandArgumentsDescriptionReturns
address—The wallet address (the root address of the Boros account).—
agent—The trading agent: its address, the sub-account, and the approval expiry (Unix seconds, 0 when not approved). Read-only; the agent is approved automatically before the first order and renewed when less than a day is left.{agent, accountId, expiry, approved}
approveAgent—Have the wallet sign a (re)approval of the trading agent right away, valid for 30 days. The approval goes on chain through Pendle's relayer and costs no ETH from the wallet. The agent can only place and cancel orders and pay gas; it cannot withdraw.{agent, expiry}
gasBalance—The Boros relayer gas balance in USD. Each order or cancel costs about $0.02 to $0.04; the relayer refuses submissions below a floor.The balance in USD; negative means debt.
topUpGasusd[, currency]Pay the gas balance from the cross account's cash; usd is the USD amount (at most 100) and currency the collateral to pay with, USDT by default.{txHash, usd, paid, currency}
autoTopUp[enabled[, usd]]Automatic gas top-up: when on (the default) and the gas balance is below $0.3, an order first pays usd dollars (default 1, above 0 and at most 20, plus any debt) from the cross cash of the market's collateral, in the same batch. enabled must be a boolean (true/false); any other value leaves the switch unchanged. Queries when called without arguments.{enabled, usd}
slippage[rate]The maximum distance of a market order from the mark rate (a decimal rate, default 0.01, one percentage point), range 0 to 0.5. The order option slippage overrides it for one order. Queries when called without an argument.The current value.
base[url]Query or switch the Boros API base URL (default https://api-boros.pendle.finance/apis).The address before the switch.
rpc[url]Query or switch the Arbitrum RPC nodes (used for deposits, withdrawals and on-chain nonce reads); separate several with commas.The address before the switch.
marketsymbolThe raw market data: fees, margin parameters, mark rate, underlying funding rate, maturity and more. symbol must be a full symbol (such as BTC_USDT.HYPERLIQUID_BTC_27NOV2026); the same holds for tick and isolatedTransfer.The Boros /v1/markets/by-ids response {results, ...}: results[0] is the market, with marketId, imData (symbol, maturity, tickStep, isIsolatedOnly and more) and data (markApr, floatingApr, bestBid, bestAsk, nextSettlementTime and more; times in Unix seconds).
ticksymbol, rate[, side]Convert a rate to a limit tick: a long (buy, the default) takes the nearest step not above the rate, a short (sell) the nearest step not below it, the same rounding orders use.{market, marketId, tick, rate, tickStep}, where rate is the actual rate of the tick.
depositcurrency, amountA wallet transaction: deposit a collateral token from the wallet into the Boros cross account (approving the Boros Router first); pays ETH gas from the wallet and returns once mined.{txHash, currency, amount, accountId}
withdrawcurrency, amountA wallet transaction: request a withdrawal from the cross account to the wallet, from the main account (sub-account 0) only. Boros completes it automatically after the cooldown (about 15 minutes at present); another request during the cooldown adds to the amount and restarts the timer.{txHash, currency, amount, note}
cancelWithdrawcurrencyA wallet transaction: cancel a pending withdrawal request.{txHash, currency}
isolatedTransfersymbol, amountMove cash between the cross account and the isolated account of an isolated-only market: a positive amount (in the collateral) moves it from cross into isolated, a negative one moves it back. Goes through the relayer and uses the gas balance. Withdrawals come from the cross account only, so move isolated cash back first.{txHash, symbol, amount, account}
wallet—The wallet's (not the Boros account's) ETH and collateral token balances on Arbitrum, for checking before a deposit.[{currency, amount, token}]; the first item is the wallet's ETH (currency is ETH (gas), without token).

For the common command currency see exchange.IO.

The common command api is not supported (the call fails with an error and returns null).

Common Usage
Read a PT market and convert between price and implied APY (Pendle only)
javascript
function main() { var symbol = "PT-apyUSD-11FEB2027_apyUSD" var m = exchange.IO("market", symbol) if (!m) { Log("Market query failed:", GetLastError()) return } Log(m.kind, m.name, "expiry:", _D(m.expiry), "years to expiry:", m.yearsToExpiry) Log("implied APY now:", m.impliedApy, "accounting asset per quote:", m.accountingPerQuote) var t = exchange.GetTicker(symbol) if (t) { // The APY locked in by buying at the best ask Log("ask:", t.Sell, "implied APY:", exchange.IO("apy", symbol, t.Sell)) } // The buy price for an APY one point above the current one (a lower PT price) var price = exchange.IO("price", symbol, m.impliedApy + 0.01) Log("price for the target APY:", price) }
Place a PT limit buy at a target APY and cancel it if it has not filled after a while (Pendle only)
javascript
function main() { var symbol = "PT-apyUSD-11FEB2027_apyUSD" exchange.IO("orderExpiry", 86400) // limit orders placed from now on expire after 1 day exchange.IO("approve", "max") // approve the paying token in full (default: per order) exchange.IO("cancelWait", 60) // wait up to 60 seconds for a cancel to be mined var m = exchange.IO("market", symbol) var apy = m.impliedApy + 0.01 var price = exchange.IO("price", symbol, apy) var id = exchange.CreateOrder(symbol, "buy", price, 10) // the amount is in PT if (!id) { Log("Order failed:", GetLastError()) return } Log("limit order:", id, "price:", price, "APY:", apy) Sleep(10 * 60 * 1000) var o = exchange.GetOrder(id) if (o && o.Status == ORDER_STATE_PENDING) { // Canceling is an on-chain transaction and costs gas Log("cancel:", exchange.CancelOrder(id), "filled:", o.DealAmount) } }
Buy PT at market, then read the transaction receipt (Pendle only)
javascript
function main() { var symbol = "PT-apyUSD-11FEB2027_USDC" // quoted in USDC, swapped through an aggregator exchange.IO("slippage", 0.003) // 0.3% slippage protection var id = exchange.CreateOrder(symbol, "buy", -1, 20) // market buy: spend 20 USDC if (!id) { Log("Swap failed:", GetLastError()) return } // A swap order ID is "pair,txHash"; wait up to 2 minutes for it to be mined var r = exchange.IO("receipt", id.split(",")[1], 120000) Log("status:", r.status, "block:", r.blockNumber, "gas:", r.gasUsed, "fee:", r.fee) if (r.status == "success") { var o = exchange.GetOrder(id) Log("PT bought:", o.DealAmount, "average price:", o.AvgPrice) } }
Check the trading agent and the gas balance, and top up gas by hand when it runs low (Futures_Boros only)
javascript
function main() { Log("wallet:", exchange.IO("address")) var a = exchange.IO("agent") if (!a) { Log("Agent query failed:", GetLastError()) return } Log("agent:", a.agent, "sub-account:", a.accountId, "approved:", a.approved) // Renew early when less than 3 days are left (wallet signature, relayed, no ETH spent) if (!a.approved || a.expiry - Date.now() / 1000 < 3 * 86400) { var r = exchange.IO("approveAgent") Log("agent approved until:", _D(r.expiry * 1000)) } var gas = exchange.IO("gasBalance") Log("gas balance (USD):", gas) if (gas < 0.5) { var t = exchange.IO("topUpGas", 2, "USDT") // pay $2 from the USDT cross cash Log("gas topped up:", t.paid, t.currency, t.txHash) } // Automatic top-up before orders: keep it on, paying $3 each time Log(exchange.IO("autoTopUp", true, 3)) }
Deposit from the wallet, move margin into an isolated-only market, then request a withdrawal (Futures_Boros only)
javascript
function main() { // The wallet's (not the Boros account's) balances on Arbitrum var w = exchange.IO("wallet") for (var i = 0; i < w.length; i++) { Log(w[i].currency, w[i].amount) } // A wallet transaction: pays ETH gas from the wallet and returns once mined var d = exchange.IO("deposit", "USDT", 50) if (!d) { Log("Deposit failed:", GetLastError()) return } Log("deposited", d.amount, d.currency, "into sub-account", d.accountId, d.txHash) // Isolated-only market: positive moves cash from cross into it, negative moves it back var iso = "BRENTOIL_USDT.HYPERLIQUID_XYZBRENTOIL_18NOV2026" Log(exchange.IO("isolatedTransfer", iso, 20)) Log(exchange.IO("isolatedTransfer", iso, -20)) // Request a withdrawal (from the cross account of sub-account 0 only), paid after cooldown var r = exchange.IO("withdraw", "USDT", 30) Log(r ? r.note : GetLastError()) // Cancel during the cooldown with exchange.IO("cancelWithdraw", "USDT") }
Read a market's mark rate and underlying funding rate, and see which tick a target rate rounds to (Futures_Boros only)
javascript
function main() { var symbol = "BTC_USDT.HYPERLIQUID_BTC_27NOV2026" var r = exchange.IO("market", symbol) if (!r) { Log("Query failed:", GetLastError()) return } var m = r.results[0] Log(m.imData.symbol, "market id:", m.marketId, "isolated only:", m.imData.isIsolatedOnly) Log("mark rate:", m.data.markApr, "underlying funding rate:", m.data.floatingApr, "next settlement:", _D(m.data.nextSettlementTime * 1000)) // A long half a point below the mark rate: see which tick it rounds to first var t = exchange.IO("tick", symbol, m.data.markApr - 0.005, "buy") Log("tick:", t.tick, "actual rate:", t.rate, "tickStep:", t.tickStep) }

Function Support
Pendle (Spot)

Not supported (the call fails with an error and returns null): exchange.GetTickers, exchange.GetRecords, exchange.GetTrades, exchange.ModifyOrder, exchange.CreateConditionOrder, exchange.ModifyConditionOrder, exchange.CancelConditionOrder, exchange.GetConditionOrder, exchange.GetConditionOrders, exchange.GetHistoryConditionOrders.

Futures_Boros (Futures)

Not supported (the call fails with an error and returns null): exchange.GetTickers, exchange.SetMarginLevel, exchange.ModifyConditionOrder.

Margin, Account and Simulation
Futures_Boros (Futures)

Margin mode: Ordinary markets use the cross account (one per collateral token, shared by every market of that collateral); isolated-only markets (some commodity funding-rate markets) use their own isolated account automatically, funded first with exchange.IO("isolatedTransfer", ...) or along with an order through the option cashIn. Boros has no leverage setting: the initial margin follows the position size, the rate and the time to maturity.

Position mode: One-way positions. Boros has no reduce-only flag: closing orders (closebuy, closesell) are opposite orders capped at the current position (the exact position size when within one part per billion of it), and fail without an order when there is no position in that direction.

Account: exchange.GetAccount() reads the cross account of the current pair's collateral (the isolated account for an isolated-only market): Balance is the available initial margin, FrozenBalance the initial margin in use, Equity the account's net value (cash plus position value). In exchange.GetPositions(), Price is the fixed annualized entry rate, Profit the unrealized PnL, and Margin the initial margin the position uses in the account that holds it (cross or isolated), all in the collateral; a matured position awaiting settlement has a Margin of 0.

Notes
Pendle (Spot)
FunctionPendle behavior
exchange.GetTicker()Buy/Sell are Pendle's live executable swap rates (AMM and limit orders matched, fees included); when the live rates are missing, or the market's SY cannot convert the quote token (a token swapped through an aggregator, such as USDC on some markets), a quote for about $1000 is used instead (shrinking to $100 and $10 when that cannot be filled) and Info.source is convert; Info carries impliedApy and expiry (milliseconds). No 24h statistics: High, Low, Open are the current price and Volume is 0
exchange.GetDepth()Pendle's order book (limit orders and the AMM combined), grouped by 0.01% implied APY and converted to prices. When the market's SY cannot convert the quote token, the whole book is scaled by executable quotes for about $1000 (the mid matches exchange.GetTicker() and the relative structure of the levels is kept; without a quote, the USD prices of the two tokens are used as an approximation), and Info.approximate says how
exchange.GetMarkets()For each active market, PT and YT against the underlying asset and the accounting asset; Info carries the market address, expiry, implied APY and PT/YT/SY addresses
exchange.GetAssets()The native coin and every PT, YT, underlying asset etc. with a non-zero balance
exchange.CreateOrder()Price -1 swaps immediately: for a market buy amount is the quote to spend, for a sell the PT/YT amount, with slippage protection. A price above 0 places a resting limit order on Pendle's book, with amount in PT/YT (a buy pays amount × price of the quote token): the price is converted to an implied APY via the accounting-asset rate and years to expiry (see exchange.IO("apy", ...)). Order options go in the last object argument, e.g. exchange.CreateOrder(symbol, "buy", price, amount, {expiry: 1793836800}): impliedApy places a limit order at an APY directly (a buy still pays amount × price of the quote token), expiry is the limit order's expiry (a timestamp in seconds or milliseconds, see exchange.IO("orderExpiry", ...)), and slippage is the slippage of one market order; a value that is not a number fails
exchange.GetOrder()Swap order IDs are pair,txHash with the state from the receipt, and a swap sent by this process that the node still cannot find after 5 minutes is canceled; limit order IDs are pair,lo-orderHash with state, filled amount and average price from Pendle (still pending while partially filled). Pendle takes 15 to 40 seconds to index on-chain cancels and fills; until then the state follows the chain: once this process's cancel transaction is mined successfully the order shows as canceled right away, and an order that is fully filled or canceled on chain shows that state right away when the filled amount can be reconciled (from the on-chain fill events for orders placed by this process). Info.onChain holds the remaining and filled amounts on chain, and Info.indexed is false while Pendle has not caught up. For limit orders not placed by this process (after a restart, for example), the price is converted back from the order's implied APY at the current rate and is approximate
exchange.GetOrders()The wallet's resting limit orders (orders already canceled or filled on chain are left out), plus swaps sent by this process that are not mined yet
exchange.CancelOrder()Limit orders: sends an on-chain cancel transaction and waits for it (see exchange.IO("cancelWait", ...)). An order already canceled or fully filled on chain fails right away with an error saying which, without sending a transaction; it also fails while an earlier cancel transaction is still waiting to be mined (within 5 minutes), which can be checked with exchange.IO("receipt", ...). Swaps cannot be canceled
exchange.GetHistoryOrders()The wallet's finished (filled, canceled, expired) limit orders, including ones finished on chain that Pendle has not indexed yet; swaps are not included

Limit orders can only pay with or pay out tokens the market's SY accepts (usually the underlying and accounting assets); another quote token fails with the list of usable tokens. The token given is approved to the Pendle limit order contract automatically before placing; placing itself is off-chain and costs no gas, while canceling is an on-chain transaction.

Pendle's API is rate-limited by computing units (200 per minute: a swap quote costs at least 5, the order book 5, live prices 1). Keep market-data polling reasonable; when rate-limited the connector waits for the next minute and retries once.

Futures_Boros (Futures)
FunctionBoros behavior
exchange.GetTicker()Last is the last traded rate, Buy and Sell the best bid and ask rates, High, Low and Open come from the last 24 one-hour candles, and Volume is the 24h volume (YU); Info carries the mark rate markApr, the underlying funding rate floatingApr, the next settlement time and more
exchange.GetDepth()The Boros order book (AMM included), grouped by 0.0001 of rate
exchange.GetTrades()Recent trades of the market; Boros has no trade IDs, so Id is synthesized from the transaction hash, size and rate
exchange.GetRecords()Native periods are 5 minutes, 1 hour, 1 day and 1 week; other periods are synthesized by the docker. Candle values are rates; periods without trades repeat the previous close
exchange.GetFundings()The current funding rate of the underlying perpetual exchange: Rate is the annualized floatingApr scaled to one settlement period (1 hour), and Interval is the settlement period. Without a pair it returns every unmatured market, from the market list cached for up to 10 minutes
exchange.CreateOrder()Limit orders are GTC by default (the option tif can be ioc, fok or postOnly); the rate is rounded to a tick in the trader's favor (a long never above, a short never below the given rate), and the given rate also guards the average fill rate. Price -1 is a market order: IOC within the mark rate ± slippage (see exchange.IO("slippage", ...)), failing when nothing fills. Orders must be worth more than $10 (except closing a whole position). A paused market takes no orders and a close-only market takes closing orders only. The first order in a market enters it automatically (Boros charges a one-time entrance fee). For an isolated-only market the option cashIn (in the collateral) moves cash into the isolated account before the order
exchange.GetOrder()Order IDs are market id,order id; market orders that filled at once and never rested are returned from the fill recorded when this process placed them. AvgPrice is the order's tick rate (Boros order records carry no average fill rate), and for a market order the protective rate it was placed with
exchange.CancelOrder()Cancels through the relayer; fails when the order is no longer open (filled or already canceled)
exchange.ModifyOrder()Atomically cancels the old order and places a new one (Boros's idToStrictCancel), returning the new order ID; the whole call fails when the old order is gone. The new order is a GTC limit order; without a price it keeps the old order's rate, and without an amount it takes the old order's unfilled amount
exchange.CreateConditionOrder()Boros take-profit / stop-loss orders: once the rate crosses the trigger (TpTriggerPrice or SlTriggerPrice, which must be above 0) the position is closed at market, reduce-only. The side is the closing side (closebuy closes a long, closesell a short); an amount not below the position closes the whole position; the order price can only be -1 (market) and OCO is not supported. Main account (sub-account 0) only. The stop-order API needs an API signing key: the connector mints one the first time, signed by the trading agent (named fmz-…, valid 7 days, renewed before it expires; when the key slots are full it revokes the least recently used key this agent minted). A new key takes a while to reach all of Boros's gateways, so within a minute of minting, stop-order requests rejected with 401 are retried automatically after a short wait; the first call may take a few seconds longer
exchange.GetConditionOrders()Take-profit / stop-loss orders waiting to trigger or executing; Price is -1 and the trigger is in Condition; an order that closes the whole position has an Amount of 0 (the size is the position at trigger time)

Every order and cancel goes on chain through Pendle's relayer and is paid from the Boros account's gas balance (about $0.02 to $0.04, see exchange.IO("gasBalance")); by default a low balance is topped up from the cross cash automatically (see exchange.IO("autoTopUp", ...)). Submissions of one exchange object run one at a time.

The Boros API is rate-limited by computing units: 200 per minute per IP (orders and cancels cost 5 each, the market list and order book 2 each, most others 1). When rate-limited the connector waits for the next window and retries once; keep market-data polling reasonable.

Risks: a funding-rate swap gains or loses with the difference between the underlying funding rate and the traded rate, and with position value changes as the implied rate moves; an account short of margin is liquidated. Funding settles hourly until maturity.