Examples - Using the API
HTTPS Request
POST /v3/rules HTTP/1.1
Host: api.coinrule.com
X-API-Key: <YOUR_BUSINESS_API_KEY>
X-User-Public-Key: <USER_PUBLIC_KEY>
Content-Type: application/json
{
"name": "Daily DCA for ETH and AAVE",
"trigger": {
"type": "time",
"schedule": {
"start": "2025-07-16T11:08:00Z",
"interval": { "unit": "days", "value": 1 },
"repeatCount": 100
}
},
"data": {
"sequences": [
{
"t": "ACTION",
"d": {
"do": "trade",
"ta": {
"at": "buy",
"b": ["ETH"],
"q": "USDC",
"ot": "market",
"ort": "base",
"v": { "v": "50", "iv": "50", "s": "USD" },
"ls": 0,
"maxgf": "63244506424060",
"maxgfinbasecurrency": "0.2",
"maxpi": "",
"maxsl": "0.5",
"sr": null
}
}
},
{
"t": "ACTION",
"d": {
"do": "trade",
"ta": {
"at": "buy",
"b": ["AAVE"],
"q": "USDC",
"ot": "market",
"ort": "base",
"v": { "v": "30", "iv": "30", "s": "USD" },
"ls": 0,
"maxgf": "63244506424060",
"maxgfinbasecurrency": "0.2",
"maxpi": "",
"maxsl": "0.5",
"sr": null
}
}
}
]
},
"timestamp": "2025-05-16T10:11:35.214Z"
}
Last updated