Skip to main content
POST
POST /dca-order/strategies creates a DCA strategy: Olympex spends totalAmount of tokenAddressFrom in iterations equal orders, one every frequency seconds, to buy tokenAddressTo for the maker wallet accountTo. The strategy starts active immediately, unless you send "status": "cancelled" to create a stopped one for testing. Nothing moves when you create it: each order pulls its amount from accountTo through the Olympex order contract when it executes. DCA explains how strategies and their orders work.

Units

Every numeric field is a JSON number, unlike the decimal strings that quotes and limit orders use. A string such as "totalAmount": "100" returns 400 VALIDATION_ERROR. The reference signers format numbers the way JavaScript does, so fractional values sign correctly in TypeScript, Python and the API console. See Portability rules.

Sign the pair and approve the amount

Orders execute only when the maker wallet accountTo has done two things. Order signatures and allowances covers both, with the Olympex order contract address on each chain.
  1. Signed the token pair. signature is the maker’s personal_sign over the 32 bytes of keccak256(abi.encodePacked(accountTo, accountTo, tokenAddressFrom, tokenAddressTo)). Sign the bytes, not their hex string. Olympex doesn’t check the signature when you create the strategy, and a wrong one makes execution fail later, so verify it before you send it. A limit order for the same pair uses the same signature.
  2. Approved totalAmount. The maker approves the Olympex order contract, not the contractToApprove that POST /swap returns, to spend totalAmount of tokenAddressFrom. Execution gas is reimbursed out of the token bought, so the allowance needs nothing on top for fees. The allowance is shared: if other active strategies or open limit orders sell the same token on the same chain, approve the sum.
This endpoint creates a live strategy, including when you send it from the console on this page. The pair signature doesn’t bind an amount, a price or an expiry, and it stays valid after you cancel. The on-chain limit is the maker’s allowance to the order contract: approve only what open orders need, never an unlimited amount, and set it to 0 to stop everything for a token.

Tokens, chain and maker

  • One chain. chainIdFrom and chainIdTo must be the same chain, and DCA executes only on chains with an Olympex order contract.
  • Tokens you can sell. tokenAddressFrom must be an ERC-20 token. Native tokens can’t be sold: wrap them first (WETH, WBNB, WPOL, listed in List tokens). Fee-on-transfer tokens aren’t supported, and USDT isn’t supported as the token you sell in limit orders or DCA on Ethereum.
  • The maker. accountTo sells tokenAddressFrom, receives tokenAddressTo and signs signature. It must be an externally owned account (EOA): smart-contract wallets such as Safe or ERC-4337 accounts can’t sign orders, because only 65-byte ECDSA signatures are accepted. Olympex stores the address as you send it and list filters match it case-sensitively, so send the EIP-55 checksummed form.
  • Symbols. Send the tokens’ real symbols in tokenSymbolFrom, tokenSymbolTo and pair. Read them with symbol() from the token contracts, or take them from GET /tokens by address, trimmed and without a trailing _<number>.
  • Test without scheduling orders. Omit status and the strategy starts active. Send "status": "cancelled" to create a stopped strategy, for example to test your integration without moving funds. pending and finished are reserved for Olympex.
  • What the create call checks. Olympex checks the types, the required fields and that each address is a valid EVM address. It doesn’t check the other rules in this section or the pair signature: a strategy that breaks one is created, and its orders can’t execute. Check them before you send the request.
  • Other fields in the schema are set by Olympex; don’t send them.

Each call creates a strategy

Every successful call creates a new strategy with a new ID, and Olympex ignores any id you send. If a request times out or the connection drops, you don’t know whether the strategy exists. Before you send it again, list the maker’s active strategies and look for one with the same tokens, totalAmount, iterations and frequency. The retry wrappers in Handle errors and retries never retry this endpoint automatically. Store data.id from the response. Olympex places the orders one frequency apart: follow them with GET /dca-order/strategies/{id}/orders, and stop the strategy with PATCH /dca-order/strategies/{id}.

Authorizations

x-api-key-id
string
header
required

Your API key ID (UUID). See Sign requests.

x-value-info
string
header
required

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.

x-passphrase
string
header
required

Your account passphrase. Treat it like the secret key.

x-signature
string
header
required

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.

Body

application/json

Creates a strategy that buys tokenAddressTo with tokenAddressFrom in iterations equal orders, one every frequency seconds. Fields marked read-only are accepted by the API but reserved for Olympex.

accountTo
string
required

The maker: the wallet that sells tokenAddressFrom, receives tokenAddressTo and signs signature. It must be an externally owned account (EOA). Stored exactly as sent. Send the EIP-55 checksummed form, and use the same form in list filters, which match case-sensitively. Must be a valid EVM address: 0x and 40 hexadecimal digits, in lowercase or EIP-55 checksummed form. A mixed-case address with a wrong checksum returns 400 VALIDATION_ERROR ("Must be a valid EVM address").

Minimum string length: 1
chainIdFrom
integer
required

Chain of tokenAddressFrom, as a number. Use a chain from GET /chains.

Required range: 0 < x <= 9007199254740991
chainIdTo
integer
required

Chain of tokenAddressTo. Must equal chainIdFrom: DCA runs on one chain.

Required range: 0 < x <= 9007199254740991
tokenAddressFrom
string
required

ERC-20 token to sell in every order. Native tokens can't be sold: use the wrapped token (WETH, WBNB, WPOL). Must be a valid EVM address: 0x and 40 hexadecimal digits, in lowercase or EIP-55 checksummed form. A mixed-case address with a wrong checksum returns 400 VALIDATION_ERROR ("Must be a valid EVM address").

Minimum string length: 1
tokenAddressTo
string
required

Token to buy. Must be a valid EVM address: 0x and 40 hexadecimal digits, in lowercase or EIP-55 checksummed form. A mixed-case address with a wrong checksum returns 400 VALIDATION_ERROR ("Must be a valid EVM address").

Minimum string length: 1
tokenSymbolFrom
string
required

Symbol of tokenAddressFrom, for example USDC.

Minimum string length: 1
tokenSymbolTo
string
required

Symbol of tokenAddressTo, for example WETH.

Minimum string length: 1
pair
string
required

The pair as <tokenSymbolFrom>/<tokenSymbolTo>, for example USDC/WETH. Not returned in responses.

Minimum string length: 1
totalAmount
number
required

Total amount of tokenAddressFrom to spend across all orders, human-readable (100 is 100 USDC), as a JSON number. Each order spends totalAmount / iterations.

Required range: x > 0
frequency
integer
required

Seconds between orders, for example 86400 for daily.

Required range: 0 < x <= 9007199254740991
iterations
integer
required

Number of orders.

Required range: 0 < x <= 9007199254740991
signature
string
required

The maker's signature authorizing Olympex to execute orders for this token pair: personal_sign over keccak256(abi.encodePacked(accountTo, accountTo, tokenAddressFrom, tokenAddressTo)), 65 bytes as 0x-prefixed hex. It's the same signature a limit order for the same pair uses. See Order signatures and allowances.

Minimum string length: 1
slippage
number

Maximum slippage per order, in percent, as a JSON number (1 is 1%). Always send it: responses show 0 when it's missing.

Required range: x > 0
minPrice
number

Optional lower price bound, in units of tokenAddressTo per 1 tokenAddressFrom. Orders run only while the price is within the bounds you set.

maxPrice
number

Optional upper price bound, in units of tokenAddressTo per 1 tokenAddressFrom.

status
enum<string>

Optional. Omit it and the strategy starts active. Send cancelled to create a stopped strategy, for example to test your integration without scheduling orders. pending and finished are reserved for Olympex.

Available options:
pending,
active,
cancelled,
finished

Response

The strategy, as stored.

success
enum<boolean>
required
Available options:
true
data
object
required

A DCA strategy. Olympex can add fields; ignore the ones you don't use.

meta
object
required