Examples: Advanced Trade
Worked exchange-trading workflow patterns
Check price, then place a limit order
products / getwithproductId: "BTC-USD"to read the current price.- A condition node compares the returned
priceagainst your target entry price. - If favorable,
orders / createwithproductId: "BTC-USD",side: "BUY",orderType: "limit",baseSize: "0.01",limitPriceset to your target, and aclientOrderIdgenerated once and stored (e.g. in workflow state) so a retry of this exact step reuses it. - Poll
orders / getwith the returnedorderIDuntilstatusis no longerOPEN.
Preview before committing
Run orders / preview with the same fields you intend to send to orders / create (minus clientOrderId) to see estimated fill price and size before risking a real order — useful as a pre-flight check gating the real create call behind a condition node.
Daily portfolio breakdown report
portfolios / listto enumerate all portfolios.- For each portfolio UUID,
portfolios / getBreakdownto gettotalBalanceUSDand the per-currencybalances[]. - Feed the results into a notification or reporting node on a schedule trigger.
Convert idle USD to USDC
converts / createQuotewithfromCurrency: "USD",toCurrency: "USDC",amountset to the idle balance.- Inspect the quote's
expiresAtandtoAmount. - If acceptable,
converts / commitTradewith the quote'stradeId— remember this call opts out of automatic 429 retry, so checkconverts / getTradebefore retrying manually if the call times out.
Fee-aware order sizing
fees / getTransactionSummary returns your current takerFeeRate/makerFeeRate. Combine with products / get's price before orders / create to compute a size that nets a target amount after fees.