curl -X GET "https://starknet.api.avnu.fi/dca/v3/orders?traderAddress=0x0123...&status=ACTIVE"
{
"content": [
{
"id": "ae1a649c-a9fb-4130-835b-cb14e144e8c1",
"blockNumber": 860820,
"timestamp": "2024-10-31T16:01:15Z",
"traderAddress": "0x25b..",
"orderAddress": "0x50ab..",
"creationTransactionHash": "0x6b65..",
"orderClassHash": "0x2d5af3e59f6b180bb2190957b527dd4db61a2c1095d4fd1e75e3a89732c796b",
"sellTokenAddress": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
"sellAmount": "0xde0b6b3a7640000",
"sellAmountPerCycle": "0x94079cd1a42aaa",
"buyTokenAddress": "0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",
"startDate": "2024-10-31T16:01:15Z",
"endDate": "2024-11-01T16:01:15Z",
"closeDate": "2024-11-01T15:02:27.923Z",
"frequency": "PT1H",
"iterations": 24,
"status": "CLOSED",
"pricingStrategy": {},
"amountSold": "0xde0b6b3a763fff0",
"amountBought": "0x214",
"averageAmountBought": "0x16",
"executedTradesCount": 24,
"cancelledTradesCount": 0,
"pendingTradesCount": 0,
"trades": [
{
"sellAmount": "0x94079cd1a42aaa",
"sellAmountInUsd": 0.015667,
"buyAmount": "0x17",
"buyAmountInUsd": 0.016246,
"expectedTradeDate": "2024-10-31T16:01:15Z",
"status": "SUCCEEDED",
"actualTradeDate": "2024-10-31T16:01:56.860Z",
"txHash": "0x25a006ecd.."
},
{
"sellAmount": "0x94079cd1a42aaa",
"sellAmountInUsd": 0.015561,
"buyAmount": "0x16",
"buyAmountInUsd": 0.015482,
"expectedTradeDate": "2024-10-31T17:01:15Z",
"status": "SUCCEEDED",
"actualTradeDate": "2024-10-31T17:01:57.834Z",
"txHash": "0x7972e18b2c.."
}
]
}
],
"size": 25,
"number": 0,
"totalElements": 1,
"totalPages": 1
}
Recurring Buy
Get DCA Orders
Retrieve all DCA orders for a specific trader address
GET
/
dca
/
v3
/
orders
curl -X GET "https://starknet.api.avnu.fi/dca/v3/orders?traderAddress=0x0123...&status=ACTIVE"
{
"content": [
{
"id": "ae1a649c-a9fb-4130-835b-cb14e144e8c1",
"blockNumber": 860820,
"timestamp": "2024-10-31T16:01:15Z",
"traderAddress": "0x25b..",
"orderAddress": "0x50ab..",
"creationTransactionHash": "0x6b65..",
"orderClassHash": "0x2d5af3e59f6b180bb2190957b527dd4db61a2c1095d4fd1e75e3a89732c796b",
"sellTokenAddress": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
"sellAmount": "0xde0b6b3a7640000",
"sellAmountPerCycle": "0x94079cd1a42aaa",
"buyTokenAddress": "0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",
"startDate": "2024-10-31T16:01:15Z",
"endDate": "2024-11-01T16:01:15Z",
"closeDate": "2024-11-01T15:02:27.923Z",
"frequency": "PT1H",
"iterations": 24,
"status": "CLOSED",
"pricingStrategy": {},
"amountSold": "0xde0b6b3a763fff0",
"amountBought": "0x214",
"averageAmountBought": "0x16",
"executedTradesCount": 24,
"cancelledTradesCount": 0,
"pendingTradesCount": 0,
"trades": [
{
"sellAmount": "0x94079cd1a42aaa",
"sellAmountInUsd": 0.015667,
"buyAmount": "0x17",
"buyAmountInUsd": 0.016246,
"expectedTradeDate": "2024-10-31T16:01:15Z",
"status": "SUCCEEDED",
"actualTradeDate": "2024-10-31T16:01:56.860Z",
"txHash": "0x25a006ecd.."
},
{
"sellAmount": "0x94079cd1a42aaa",
"sellAmountInUsd": 0.015561,
"buyAmount": "0x16",
"buyAmountInUsd": 0.015482,
"expectedTradeDate": "2024-10-31T17:01:15Z",
"status": "SUCCEEDED",
"actualTradeDate": "2024-10-31T17:01:57.834Z",
"txHash": "0x7972e18b2c.."
}
]
}
],
"size": 25,
"number": 0,
"totalElements": 1,
"totalPages": 1
}
Overview
Fetches all DCA orders created by a trader, with filtering options for order status and pagination support. Each order includes execution history, remaining cycles, and current status.Request
Trader’s wallet address (hex format)
Filter by order status (
INDEXING, ACTIVE, or CLOSED)Page number for pagination
Number of orders per page (max: 50)
Sort order. Format:
field,direction- Fields:
createdAt,status,remainingCycles - Direction:
ascordesc
Response
Array of DCA order objects
Show Order Object
Show Order Object
The order identifier (UUID format)
The block number when the order was created
The timestamp when the order was created (ISO 8601 format)
The trader address (hex format)
The order address (hex format)
The transaction hash of the order creation
The order class hash
The sell token address (hex format)
The total amount you want to invest (hex format)
The amount that will be sold at each iteration (hex format)
The buy token address (hex format)
The start date of the order (ISO 8601 format)
The end date of the order (ISO 8601 format)
The close date of the order (ISO 8601 format)
The duration between each iteration. Follows ISO 8601 standard
The number of iterations
The order status (
INDEXING, ACTIVE, or CLOSED)The amount already sold
The amount already bought
The average amount bought
The number of executed trades
The number of cancelled trades
The number of pending trades
The trades
Show Trade Object
Show Trade Object
The amount sold
The amount sold in USD
The amount bought
The amount bought in USD
The expected trade date (ISO 8601 format)
The trade status (
PENDING, SUCCEEDED, or CANCELLED)The actual trade date (ISO 8601 format)
The transaction hash of the trade
The error reason. Defined only if the trade failed
Page size
Current page number (zero-based)
Total number of orders
Total pages available
curl -X GET "https://starknet.api.avnu.fi/dca/v3/orders?traderAddress=0x0123...&status=ACTIVE"
{
"content": [
{
"id": "ae1a649c-a9fb-4130-835b-cb14e144e8c1",
"blockNumber": 860820,
"timestamp": "2024-10-31T16:01:15Z",
"traderAddress": "0x25b..",
"orderAddress": "0x50ab..",
"creationTransactionHash": "0x6b65..",
"orderClassHash": "0x2d5af3e59f6b180bb2190957b527dd4db61a2c1095d4fd1e75e3a89732c796b",
"sellTokenAddress": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
"sellAmount": "0xde0b6b3a7640000",
"sellAmountPerCycle": "0x94079cd1a42aaa",
"buyTokenAddress": "0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",
"startDate": "2024-10-31T16:01:15Z",
"endDate": "2024-11-01T16:01:15Z",
"closeDate": "2024-11-01T15:02:27.923Z",
"frequency": "PT1H",
"iterations": 24,
"status": "CLOSED",
"pricingStrategy": {},
"amountSold": "0xde0b6b3a763fff0",
"amountBought": "0x214",
"averageAmountBought": "0x16",
"executedTradesCount": 24,
"cancelledTradesCount": 0,
"pendingTradesCount": 0,
"trades": [
{
"sellAmount": "0x94079cd1a42aaa",
"sellAmountInUsd": 0.015667,
"buyAmount": "0x17",
"buyAmountInUsd": 0.016246,
"expectedTradeDate": "2024-10-31T16:01:15Z",
"status": "SUCCEEDED",
"actualTradeDate": "2024-10-31T16:01:56.860Z",
"txHash": "0x25a006ecd.."
},
{
"sellAmount": "0x94079cd1a42aaa",
"sellAmountInUsd": 0.015561,
"buyAmount": "0x16",
"buyAmountInUsd": 0.015482,
"expectedTradeDate": "2024-10-31T17:01:15Z",
"status": "SUCCEEDED",
"actualTradeDate": "2024-10-31T17:01:57.834Z",
"txHash": "0x7972e18b2c.."
}
]
}
],
"size": 25,
"number": 0,
"totalElements": 1,
"totalPages": 1
}
Order Status
- INDEXING: Order is being indexed after creation (temporary state)
- ACTIVE: Order is currently active and executing
- CLOSED: Order has been completed or cancelled
Was this page helpful?
⌘I