Skip to main content
GET
https://starknet.api.avnu.fi
/
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

traderAddress
string
required
Trader’s wallet address (hex format)
status
string
Filter by order status (INDEXING, ACTIVE, or CLOSED)
page
number
default:0
Page number for pagination
size
number
default:20
Number of orders per page (max: 50)
sort
string
default:"createdAt,desc"
Sort order. Format: field,direction
  • Fields: createdAt, status, remainingCycles
  • Direction: asc or desc

Response

content
array
required
Array of DCA order objects
size
integer
required
Page size
number
integer
required
Current page number (zero-based)
totalElements
integer
required
Total number of orders
totalPages
integer
required
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