create_dca_order
Automate recurring crypto investments by setting up Dollar-Cost Averaging (DCA) orders. Specify tokens, amounts, frequency, and conditions for targeted trading strategies.
Instructions
Create a DCA order.
Expects a DCAOrderRequestContainer, returns a list of DCAOrderResponse.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
dca_order_requests | Yes |
Input Schema (JSON Schema)
{
"$defs": {
"DCAOrderRequest": {
"properties": {
"amount": {
"description": "total amount of input token to invest",
"title": "Amount",
"type": "number"
},
"cron_expression": {
"description": "cron expression for the DCA worker execution frequency",
"title": "Cron Expression",
"type": "string"
},
"delta_percentage": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "If the DCA is conditional, percentage of the change to watch for given the delta_type",
"title": "Delta Percentage"
},
"delta_type": {
"anyOf": [
{
"enum": [
"INCREASE",
"DECREASE",
"MOVE",
"MOVE_DAILY",
"AVERAGE_MOVE"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "If the DCA is conditional, the operator of the watch field in the conditional statement",
"title": "Delta Type"
},
"execution_type": {
"description": "set to SINGLE only if the user is asking for a single scheduled order, MULTIPLE if it is a true DCA",
"enum": [
"MULTIPLE",
"SINGLE"
],
"title": "Execution Type",
"type": "string"
},
"input_token": {
"description": "public address of the input token. To get the address from a token symbol use `get_token_details`",
"title": "Input Token",
"type": "string"
},
"output_token": {
"description": "public address of the output token. To get the address from a token symbol use `get_token_details`",
"title": "Output Token",
"type": "string"
},
"strategy_duration": {
"description": "Total running time of the DCA order given in strategy duration units, should be more than 0",
"title": "Strategy Duration",
"type": "integer"
},
"strategy_duration_unit": {
"description": "unit of the duration of the DCA order",
"enum": [
"MINUTE",
"HOUR",
"DAY",
"WEEK",
"MONTH",
"YEAR"
],
"title": "Strategy Duration Unit",
"type": "string"
},
"time_zone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "user's time zone. Defaults to UTC",
"title": "Time Zone"
},
"token_address_watcher": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "If the DCA is conditional, public address of the token to watch.",
"title": "Token Address Watcher"
},
"wallet": {
"description": "name of the wallet",
"title": "Wallet",
"type": "string"
},
"watch_field": {
"anyOf": [
{
"enum": [
"liquidity",
"marketCap",
"price"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "If the DCA is conditional, field to watch for the condition",
"title": "Watch Field"
}
},
"required": [
"wallet",
"input_token",
"output_token",
"amount",
"cron_expression",
"strategy_duration_unit",
"strategy_duration",
"execution_type",
"token_address_watcher",
"watch_field",
"delta_type",
"delta_percentage",
"time_zone"
],
"title": "DCAOrderRequest",
"type": "object"
},
"DCAOrderRequestContainer": {
"properties": {
"dca_order_requests": {
"items": {
"$ref": "#/$defs/DCAOrderRequest"
},
"title": "Dca Order Requests",
"type": "array"
}
},
"required": [
"dca_order_requests"
],
"title": "DCAOrderRequestContainer",
"type": "object"
}
},
"properties": {
"dca_order_requests": {
"$ref": "#/$defs/DCAOrderRequestContainer"
}
},
"required": [
"dca_order_requests"
],
"title": "create_dca_orderArguments",
"type": "object"
}