nearswaps

Learn · NEAR trading

DCA and TWAP on NEAR: buy or sell on a schedule

DCA buys or sells a fixed amount every hour, day or week. TWAP splits one large trade into slices over 15 minutes to 24 hours. On nearswaps.com/dca (beta) each leg is a 1-click trade from your trading balance, signed on time by a key that can trade that balance and recover a stuck trade, and never withdraw.

Last checked

DCA or TWAP

DCA (dollar-cost averaging) spreads buying over days or weeks: "buy 10 NEAR of a token every day for 30 days" pays the average price of the month instead of one day's price. TWAP (time-weighted average price) spreads one large trade over minutes or hours, so a thin pool isn't hit all at once: "buy 5,000 NEAR of a token over the next hour in 12 slices". Both are the same thing underneath: a total, a number of legs and a gap between them.

How it works on nearswaps

  1. Deposit NEAR, USDC, USDT or the token into your 1-click balance in the Terminal. A schedule trades only that balance. See how 1-click trading works.
  2. Sign in on nearswaps.com/dca: your wallet signs a short message (NEP-413) with the account's full-access key. It costs nothing and sends nothing; it proves the account is yours.
  3. Add the key. nearswaps' server makes a key for your account and keeps it encrypted; your wallet approves one transaction that adds it. It can call only trade and recover_trade on orders.nearswaps.near: no withdraw, no transfers, no other contract.
  4. Set the schedule: Buy or Sell, the token, the total, and either "Every" (hour, day or week) with a number of legs, or "Spread over" (15 minutes, 1, 4 or 24 hours) with a number of slices.
  5. Watch it: every leg shows on the page with its fill, fee and transaction. Pause, resume or cancel at any time.

The rules

RuleLimit
Legs2 to 60
Gap between legsa minute to a week
Last legwithin 30 days
Each legworth at least 0.1 NEAR, and within your 1-click per-trade limit and daily budget
Slippage1% to 5%
Schedules at once5 per account
VenuesRhea pools and Intear DEX; Rhea DCL launch pools and Shards not yet
BaseNEAR, or USDC and USDT for Rhea tokens

A buy needs the token to pass the token check (a score of 70 or more, at most 3 things it could not check, at least 100 NEAR of liquidity), checked again before every leg, unless you tick "I know this token". Sells are never blocked by the check. One leg's worth must be in the balance when you start.

When a leg can't trade

If the price moves past your slippage, the leg is tried again on the next runs within its window (half the gap, at least 2 minutes). A price band ("only while the price is at or below ...") skips a leg outside it. A short balance waits for a deposit for up to 24 hours. Each of these ends as a missed leg, never as a bigger leg later: a schedule never trades more than its total. A trade the contract refuses for a limit pauses the schedule until you raise the limit in the Terminal.

What each leg costs

Each leg is a 1-click trade and pays the 1-click fee, 0.5%, taken from what it receives. NEAR gas comes from your wallet: about 0.12 NEAR is reserved per leg and most of it comes back within seconds, so keep about 1 NEAR free. There is no fee for the schedule itself. Every fee: nearswaps fees.

The risks

  • nearswaps' server holds a key that can trade your 1-click balance within your own 1-click limits. It can't withdraw or send anything, but a bad trade inside those limits is possible. Keep the limits and the balance at what you mean to schedule.
  • Remove the key in your wallet and every schedule stops at its next leg. nearswaps can also stop every schedule at once.
  • DCA is in beta. Start small.

Questions people ask

What is the difference between DCA and TWAP?

DCA spreads buys or sells over days or weeks to average the price. TWAP spreads one large trade over minutes or hours so a pool isn't hit all at once. On nearswaps both are a total, a number of legs and a gap.

Can the DCA key withdraw my funds?

No. It can call only trade and recover_trade on orders.nearswaps.near. A trade's output stays in your 1-click balance, and only you can withdraw it, to your own account.

How do I stop a schedule?

Pause or Cancel it on the DCA page. To stop every schedule at once, remove the DCA key in your wallet.

What does DCA cost on nearswaps?

Each leg pays the 1-click fee, 0.5%, from what it receives, plus NEAR gas from your wallet. The schedule itself is free.

Which tokens can I schedule?

Tokens on Rhea pools and Intear DEX that are switched on for 1-click. Buys also need to pass the token check, unless you tick "I know this token".