Send buy orders every 5 minutes via REST API
Recipe ToolsMarketingDeveloper ToolAPI Integration
What it does
When the clock triggers every 5 minutes, this automation fetches the current time and price. It builds key and signature lists, then posts the buy order to an external system through a callable subprocess.
Who it's for
Finance teams who need to execute automated buy orders on a fixed schedule without manual intervention.
How teams use this
Execute orders on market open
Run this automation every 5 minutes during market hours so buy orders are placed consistently without manual oversight. The team can monitor execution logs to verify each order.
Route orders to different exchanges
Modify the subprocess to route orders to multiple exchanges based on price thresholds. Only the callable subprocess logic changes while the schedule and data fetch remain the same.
Add order size conditions
Include a condition that checks inventory levels before posting the buy order so only sized orders are sent. Add an inventory check step between the price fetch and the order post.
How it works
- Start every 5 minutes. This automation runs on a schedule, starting every 5 minutes so buy orders are placed at regular intervals.
- Fetch current time via Rest. Retrieve the current time from an external service using Rest so the order timestamp reflects real-time data.
- Fetch market price via Rest. Retrieve the current market price from an external service using Rest so the order reflects real-time pricing.
- Build and post the buy order. Create key and signature lists in batches, then post the completed order with time, price, and authentication to the external system via Rest.
- Confirm order in subprocess. Invoke a callable subprocess to log the order or trigger downstream processes after the buy order is posted successfully.