# Read one DCA order by ID.
# Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.
ORDER_ID='5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17'
METHOD=GET
ENDPOINT="/dca-order/orders/$ORDER_ID"
QUERY=''
BODY='' # GET has no body: the signature covers the empty string
TS="${OLYMPEX_TIMESTAMP:-$(date +%s)}"
NONCE="${OLYMPEX_NONCE:-$(openssl rand -hex 12)}"
BODY_HASH="$(printf '%s' "$BODY" | openssl dgst -sha256 -binary | openssl base64 -A | tr '+/' '-_' | tr -d '=')"
VALUE_INFO="$(printf '%s\n%s\n%s' "$TS" "$NONCE" "$BODY_HASH")"
MESSAGE="$(printf 'OLPX-HMAC-SHA256-V2\n%s\n%s\n%s\n%s\n%s\n%s' "$TS" "$NONCE" "$METHOD" "/api/v1$ENDPOINT" "$QUERY" "$BODY_HASH")"
curl -sS -X "$METHOD" "https://api-rest.olympex.io/api/v1$ENDPOINT${QUERY:+?$QUERY}" \
-H "content-type: application/json" \
-H "x-api-key-id: $OLYMPEX_API_KEY_ID" \
-H "x-value-info: $(printf '%s' "$VALUE_INFO" | openssl base64 -A)" \
-H "x-passphrase: $OLYMPEX_PASSPHRASE" \
-H "x-signature: $(printf '%s' "$MESSAGE" | openssl dgst -sha256 -hmac "$OLYMPEX_SECRET_KEY" -binary | od -An -v -tx1 | tr -d ' \n')"
import { olympexRequest } from "./sign-request.ts"; // /authentication/sign-requests
type DcaOrder = {
status: string;
amount: number;
amountReceived?: number;
executionPrice?: number;
transactionHash?: string;
errorMessage?: string;
};
const orderId = "5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17";
const order = await olympexRequest<DcaOrder>("GET", `/dca-order/orders/${orderId}`);
if (order.status === "successful") {
console.log(`Sold ${order.amount}, bought ${order.amountReceived} at ${order.executionPrice}: ${order.transactionHash}`);
} else if (order.status === "error") {
console.log(`Failed: ${order.errorMessage}`);
} else {
console.log(`Order is ${order.status}`);
}
from sign_request import olympex_request # /authentication/sign-requests
order_id = "5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17"
order = olympex_request("GET", f"/dca-order/orders/{order_id}")
if order["status"] == "successful":
print(f'Sold {order["amount"]}, bought {order["amountReceived"]} at {order["executionPrice"]}: {order["transactionHash"]}')
elif order["status"] == "error":
print(f'Failed: {order["errorMessage"]}')
else:
print(f'Order is {order["status"]}')
{
"success": true,
"data": {
"id": "5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17",
"strategyId": "320263ca-2f38-4349-b641-a23aed2ff847",
"accountTo": "0x1E67cb01969D79B2B895179e4A07D24a839dBb52",
"amount": 10,
"amountReceived": 0.00238,
"executionPrice": 4201.68,
"status": "successful",
"transactionHash": "0x9f2c4b1e7a3d5c8f0b6e2a4d1c7f9e3b5a8d0c2e4f6a1b3d5c7e9f0a2b4c6d8e",
"createdAt": "2026-09-30T12:52:10.004Z",
"updatedAt": "2026-09-30T12:52:41.377Z"
},
"meta": {
"requestId": "EdjfPgZTIAMEbEA=",
"version": "v1",
"accountType": "integrator",
"apiKeyId": "00000000-0000-4000-8000-000000000000"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "DCA order not found",
"details": []
},
"meta": {
"requestId": "EdjfPgZTIAMEbEA=",
"version": "v1",
"accountType": "integrator",
"apiKeyId": "00000000-0000-4000-8000-000000000000"
}
}
{
"message": "Forbidden"
}
Get a DCA order
Read one order of a DCA strategy: its status and, once it executes, the amount bought and the transaction hash.
# Read one DCA order by ID.
# Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.
ORDER_ID='5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17'
METHOD=GET
ENDPOINT="/dca-order/orders/$ORDER_ID"
QUERY=''
BODY='' # GET has no body: the signature covers the empty string
TS="${OLYMPEX_TIMESTAMP:-$(date +%s)}"
NONCE="${OLYMPEX_NONCE:-$(openssl rand -hex 12)}"
BODY_HASH="$(printf '%s' "$BODY" | openssl dgst -sha256 -binary | openssl base64 -A | tr '+/' '-_' | tr -d '=')"
VALUE_INFO="$(printf '%s\n%s\n%s' "$TS" "$NONCE" "$BODY_HASH")"
MESSAGE="$(printf 'OLPX-HMAC-SHA256-V2\n%s\n%s\n%s\n%s\n%s\n%s' "$TS" "$NONCE" "$METHOD" "/api/v1$ENDPOINT" "$QUERY" "$BODY_HASH")"
curl -sS -X "$METHOD" "https://api-rest.olympex.io/api/v1$ENDPOINT${QUERY:+?$QUERY}" \
-H "content-type: application/json" \
-H "x-api-key-id: $OLYMPEX_API_KEY_ID" \
-H "x-value-info: $(printf '%s' "$VALUE_INFO" | openssl base64 -A)" \
-H "x-passphrase: $OLYMPEX_PASSPHRASE" \
-H "x-signature: $(printf '%s' "$MESSAGE" | openssl dgst -sha256 -hmac "$OLYMPEX_SECRET_KEY" -binary | od -An -v -tx1 | tr -d ' \n')"
import { olympexRequest } from "./sign-request.ts"; // /authentication/sign-requests
type DcaOrder = {
status: string;
amount: number;
amountReceived?: number;
executionPrice?: number;
transactionHash?: string;
errorMessage?: string;
};
const orderId = "5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17";
const order = await olympexRequest<DcaOrder>("GET", `/dca-order/orders/${orderId}`);
if (order.status === "successful") {
console.log(`Sold ${order.amount}, bought ${order.amountReceived} at ${order.executionPrice}: ${order.transactionHash}`);
} else if (order.status === "error") {
console.log(`Failed: ${order.errorMessage}`);
} else {
console.log(`Order is ${order.status}`);
}
from sign_request import olympex_request # /authentication/sign-requests
order_id = "5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17"
order = olympex_request("GET", f"/dca-order/orders/{order_id}")
if order["status"] == "successful":
print(f'Sold {order["amount"]}, bought {order["amountReceived"]} at {order["executionPrice"]}: {order["transactionHash"]}')
elif order["status"] == "error":
print(f'Failed: {order["errorMessage"]}')
else:
print(f'Order is {order["status"]}')
{
"success": true,
"data": {
"id": "5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17",
"strategyId": "320263ca-2f38-4349-b641-a23aed2ff847",
"accountTo": "0x1E67cb01969D79B2B895179e4A07D24a839dBb52",
"amount": 10,
"amountReceived": 0.00238,
"executionPrice": 4201.68,
"status": "successful",
"transactionHash": "0x9f2c4b1e7a3d5c8f0b6e2a4d1c7f9e3b5a8d0c2e4f6a1b3d5c7e9f0a2b4c6d8e",
"createdAt": "2026-09-30T12:52:10.004Z",
"updatedAt": "2026-09-30T12:52:41.377Z"
},
"meta": {
"requestId": "EdjfPgZTIAMEbEA=",
"version": "v1",
"accountType": "integrator",
"apiKeyId": "00000000-0000-4000-8000-000000000000"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "DCA order not found",
"details": []
},
"meta": {
"requestId": "EdjfPgZTIAMEbEA=",
"version": "v1",
"accountType": "integrator",
"apiKeyId": "00000000-0000-4000-8000-000000000000"
}
}
{
"message": "Forbidden"
}
GET /dca-order/orders/{id} returns one order of a strategy created with your API key. An order is one execution of the strategy: Olympex creates it as the strategy runs, and it sells totalAmount / iterations of the strategy’s tokenAddressFrom. Get order IDs from GET /dca-order/strategies/{id}/orders, and read the order again to follow its status.
Order status
status | Meaning | Fields it sets |
|---|---|---|
pending | Scheduled. Olympex hasn’t started it. | |
executing | Olympex is executing it. It can no longer be stopped. | |
successful | Executed. | transactionHash, amountReceived, executionPrice |
cancelled | Skipped. | |
error | Failed. | errorMessage |
expired | Not executed in time. |
Execution fields
| Field | Meaning |
|---|---|
amount | Amount of the token sold in this order, human-readable, as a JSON number. |
amountReceived | Amount of the token bought, human-readable, as a JSON number. |
executionPrice | Price the order executed at, in units of the token sold per 1 token bought: 4201.68 is 4,201.68 USDC per WETH. This is the inverse of the strategy’s minPrice and maxPrice, which are in units of the token bought per 1 token sold. |
transactionHash | Hash of the execution transaction, on the strategy’s chain. |
Not found
404 NOT_FOUND with the message “DCA order not found” means that no order with this ID belongs to one of your strategies: the ID doesn’t exist, or the order belongs to a strategy that another API key created.
# Read one DCA order by ID.
# Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.
ORDER_ID='5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17'
METHOD=GET
ENDPOINT="/dca-order/orders/$ORDER_ID"
QUERY=''
BODY='' # GET has no body: the signature covers the empty string
TS="${OLYMPEX_TIMESTAMP:-$(date +%s)}"
NONCE="${OLYMPEX_NONCE:-$(openssl rand -hex 12)}"
BODY_HASH="$(printf '%s' "$BODY" | openssl dgst -sha256 -binary | openssl base64 -A | tr '+/' '-_' | tr -d '=')"
VALUE_INFO="$(printf '%s\n%s\n%s' "$TS" "$NONCE" "$BODY_HASH")"
MESSAGE="$(printf 'OLPX-HMAC-SHA256-V2\n%s\n%s\n%s\n%s\n%s\n%s' "$TS" "$NONCE" "$METHOD" "/api/v1$ENDPOINT" "$QUERY" "$BODY_HASH")"
curl -sS -X "$METHOD" "https://api-rest.olympex.io/api/v1$ENDPOINT${QUERY:+?$QUERY}" \
-H "content-type: application/json" \
-H "x-api-key-id: $OLYMPEX_API_KEY_ID" \
-H "x-value-info: $(printf '%s' "$VALUE_INFO" | openssl base64 -A)" \
-H "x-passphrase: $OLYMPEX_PASSPHRASE" \
-H "x-signature: $(printf '%s' "$MESSAGE" | openssl dgst -sha256 -hmac "$OLYMPEX_SECRET_KEY" -binary | od -An -v -tx1 | tr -d ' \n')"
import { olympexRequest } from "./sign-request.ts"; // /authentication/sign-requests
type DcaOrder = {
status: string;
amount: number;
amountReceived?: number;
executionPrice?: number;
transactionHash?: string;
errorMessage?: string;
};
const orderId = "5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17";
const order = await olympexRequest<DcaOrder>("GET", `/dca-order/orders/${orderId}`);
if (order.status === "successful") {
console.log(`Sold ${order.amount}, bought ${order.amountReceived} at ${order.executionPrice}: ${order.transactionHash}`);
} else if (order.status === "error") {
console.log(`Failed: ${order.errorMessage}`);
} else {
console.log(`Order is ${order.status}`);
}
from sign_request import olympex_request # /authentication/sign-requests
order_id = "5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17"
order = olympex_request("GET", f"/dca-order/orders/{order_id}")
if order["status"] == "successful":
print(f'Sold {order["amount"]}, bought {order["amountReceived"]} at {order["executionPrice"]}: {order["transactionHash"]}')
elif order["status"] == "error":
print(f'Failed: {order["errorMessage"]}')
else:
print(f'Order is {order["status"]}')
{
"success": true,
"data": {
"id": "5b3e1f7a-9c2d-4e8b-a1f0-6d4c2b8e9a17",
"strategyId": "320263ca-2f38-4349-b641-a23aed2ff847",
"accountTo": "0x1E67cb01969D79B2B895179e4A07D24a839dBb52",
"amount": 10,
"amountReceived": 0.00238,
"executionPrice": 4201.68,
"status": "successful",
"transactionHash": "0x9f2c4b1e7a3d5c8f0b6e2a4d1c7f9e3b5a8d0c2e4f6a1b3d5c7e9f0a2b4c6d8e",
"createdAt": "2026-09-30T12:52:10.004Z",
"updatedAt": "2026-09-30T12:52:41.377Z"
},
"meta": {
"requestId": "EdjfPgZTIAMEbEA=",
"version": "v1",
"accountType": "integrator",
"apiKeyId": "00000000-0000-4000-8000-000000000000"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "DCA order not found",
"details": []
},
"meta": {
"requestId": "EdjfPgZTIAMEbEA=",
"version": "v1",
"accountType": "integrator",
"apiKeyId": "00000000-0000-4000-8000-000000000000"
}
}
{
"message": "Forbidden"
}
Authorizations
Your API key ID (UUID). See Sign requests.
Base64 of timestamp + "\n" + nonce + "\n" + bodyHash, where timestamp is Unix seconds, nonce is 24 new hexadecimal characters and bodyHash is the unpadded base64url SHA-256 of the canonical body.
Your account passphrase. Treat it like the secret key.
Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key string (UTF-8, not decoded), of seven lines joined with \n, with no trailing newline: OLPX-HMAC-SHA256-V2, timestamp, nonce, the uppercase method, path, canonicalQuery and bodyHash. path is the request path including /api/v1, without the query string, for example /api/v1/limit-order/<id>. canonicalQuery is the query parameters decoded (+ is a space), sorted by key and then by value, re-encoded per RFC 3986 and joined with &, or the empty string when there is no query. Headers signed for one request are rejected on any other. See Sign requests.
Path Parameters
DCA order ID, as returned when it was created.
Response
The order.
Was this page helpful?
