Place Limit Order
Create a standalone limit buy or sell order that auto-executes when the token price hits a target. Creation does not move funds or require gas; later settlement requires the ordered token or canonical USDC plus native gas funds. Cancellation is accepted only while the order is active or triggered; a triggered cancellation abandons its unsigned attempt. Executing, reconciling, and quarantined orders cannot be cancelled. Once a transaction is signed and durably anchored, it may still settle or be rebroadcast. An operational settlement outage keeps one unsigned attempt queued for paced recovery redelivery without consuming the order's attempt budget. A safely expired attempt returns the order to active while its retry budget remains. The platform monitors prices and executes when the condition is met.
Built-in action Built In
Create a standalone limit buy or sell order that auto-executes when the token price hits a target. Creation does not move funds or require gas; later settlement requires the ordered token or canonical USDC plus native gas funds. Cancellation is accepted only while the order is active or triggered; a triggered cancellation abandons its unsigned attempt. Executing, reconciling, and quarantined orders cannot be cancelled. Once a transaction is signed and durably anchored, it may still settle or be rebroadcast. An operational settlement outage keeps one unsigned attempt queued for paced recovery redelivery without consuming the order's attempt budget. A safely expired attempt returns the order to active while its retry budget remains. The platform monitors prices and executes when the condition is met.
At a Glance
| Field | Value |
|---|---|
| Action ID | place-order |
| Category | Built In |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | trading, order, limit-order, defi |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
walletId | string | Yes | Wallet ID to use for the order. |
chainId | number | Yes | Chain where the token lives: Base (8453), Ethereum (1), Arbitrum (42161), Polygon (137), or Solana mainnet (7565164). |
assetAddress | string | Yes | EVM token contract or Solana SPL mint to buy or sell. Native SOL uses So11111111111111111111111111111111111111112. Solana buys may acquire only tokens accepted by the platform's cached Jupiter verified-token check; sells waive verified-list membership for tokens already held but still enforce mint and token-account safety policy. Buy eligibility is checked immediately before every signing attempt. A fresh verified-list miss fails the order before a transaction is sent. If a refresh temporarily fails, a prior process-local positive cache entry may remain eligible for up to 24 hours; a token absent from that stale snapshot is not treated as definitively unverified, so the same execution generation waits for recovery without consuming its retry budget. |
orderType | string | Yes | Order side, independent of trigger direction. 'buy' spends the chain's configured USDC to acquire the asset; 'sell' disposes of the held asset. |
condition | string | Yes | Price trigger direction, independent of order side. 'gte' triggers at or above the target; 'lte' triggers at or below it. Use sell+gte for take profit, sell+lte for stop loss, buy+lte for dip buy, and buy+gte for breakout buy. The target is a trigger, not fill-price protection: execution is a market swap subject to slippage, so the fill price is not guaranteed. The monitor triggers only when its live quote satisfies the condition. |
amount | string | Yes | Canonical unsigned decimal string (no sign or leading zero): USDC amount to spend (buy) or token amount to sell (sell). EVM amounts must fit uint256; Solana amounts must not exceed 18446744073709551615 (u64). |
targetPriceUsd | string | Yes | Canonical uint256 decimal string (no sign or leading zero): target price in USDC smallest units (6 decimals). $0.001 = '1000', $1.50 = '1500000'. |
label | string | No | Display name for the order (e.g., 'DEGEN limit buy'). |
assetDecimals | number | string | No | Optional token-decimals assertion. The platform reads the authoritative value from the token contract and rejects a mismatch. Solana trigger orders support at most 19 decimals; SOL uses 9. |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes | Unique ID of the created order. |
status | string | Yes | Order status (always 'active' at creation). |
Examples
json{ "type": "place-order", "payload": { "walletId": "wallet_evm_example", "chainId": 8453, "assetAddress": "0x4200000000000000000000000000000000000006", "orderType": "buy", "condition": "lte", "amount": "1000000", "targetPriceUsd": "3000000000", "assetDecimals": 18 }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/place-order/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "walletId": "wallet_evm_example", "chainId": 8453, "assetAddress": "0x4200000000000000000000000000000000000006", "orderType": "buy", "condition": "lte", "amount": "1000000", "targetPriceUsd": "3000000000", "assetDecimals": 18 }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
