Place Limit Order
Create a standalone limit buy or sell order that auto-executes when the token price hits a target. 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. 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 ID where the token lives. |
assetAddress | string | Yes | Contract address of the token to buy or sell. |
orderType | string | Yes | Order type. 'buy' = buy when price drops to target; 'sell' = sell when price rises to target. |
condition | string | Yes | Price condition. 'lte' for buy (trigger at or below target), 'gte' for sell (trigger at or above target). |
amount | string | Yes | BigInt: USDC amount to spend (buy) or token amount to sell (sell). |
targetPriceUsd | string | Yes | 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 | Yes | Token decimals (e.g., 18 for most ERC-20, 6 for USDC, 8 for WBTC). |
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": "0x0000000000000000000000000000000000000000", "chainId": 8453, "assetAddress": "0x0000000000000000000000000000000000000000", "assetDecimals": "ETH", "orderType": "buy", "condition": "gte", "amount": "1000000", "targetPriceUsd": "example-targetPriceUsd" }, "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": "0x0000000000000000000000000000000000000000", "chainId": 8453, "assetAddress": "0x0000000000000000000000000000000000000000", "assetDecimals": "ETH", "orderType": "buy", "condition": "gte", "amount": "1000000", "targetPriceUsd": "example-targetPriceUsd" }}'
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.
