Rules

Create a new trading rule

post

Create and schedule a new trading rule for the specified user. The rule definition includes any conditions, operators, and actions that make up the trading strategy. If the rule is time-based (scheduled), it will run according to the provided schedule. If the rule has immediate conditions or a direct trigger, it may execute trades as soon as conditions are met.

Authentication: Requires X-API-Key (business API key) and X-User-Public-Key (user's wallet public key) headers.

Authorizations
X-API-KeystringRequired

Business API key provided by Coinrule for authentication.

X-User-Public-KeystringRequired

The user's smart account public key (e.g., wallet address) for which the rule is created.

Body
namestringOptional

Optional human-readable name for the rule.

timestampstring · date-timeOptional

Client timestamp of when the rule is created, in ISO 8601 format. This can be used for request auditing or to schedule relative triggers (optional).

Example: 2025-07-16T10:11:35.214Z
Responses
201

Rule successfully created.

application/json
post
/rules

Last updated