fastbot
Try it
Back to Blog
·5 min read

DNSE trading bot — Automating Vietnam stocks in 2026

DNSE is the first Vietnam stock broker to offer API connectivity to retail customers. Overview of automation options, key trading rules (sessions, lot sizes), and how to get started quickly.

DNSEVietnam StocksAutomationTrading

DNSE (Đà Nẵng Securities) is the first Vietnamese stock broker to offer API connectivity to retail customers. Before DNSE, every Vietnam stock trade had to be manual clicks or a phone call to a broker. After DNSE, retail investors can fully automate their Vietnam equity portfolio for the first time.

This post covers what you need to know to start automating DNSE in 2026 — operational rules to understand (trading sessions, lot sizes, holidays) and two common ways to do it.

Is automated stock trading legal in Vietnam?

Yes, as long as:

  1. You use your own account (not trading for others without a license)
  2. The tool/bot doesn't custody customer funds
  3. The tool doesn't create wash trading / market manipulation

Specifically for DNSE:

  • DNSE actively opened API connectivity to encourage automation
  • Reputable bots don't hold funds (they stay at DNSE), can't withdraw (withdrawals require DNSE UI + separate OTP)
  • Placing orders via API is functionally identical to a user clicking — legally indistinguishable

3 critical constraints when automating DNSE

Constraint 1: Trading sessions — you can't place orders anytime

HOSE/HNX has 3 sessions per day:

SessionHours
ATO09:00 - 09:15
Morning continuous09:15 - 11:30
Lunch break11:30 - 13:00
Afternoon continuous13:00 - 14:30
ATC14:30 - 14:45
After-hours14:45 onward

Orders placed outside session → exchange rejects. Good bots handle this: skip, or queue for the next session.

Weekends / holidays: HOSE/HNX closed on Saturdays, Sundays, and official Vietnam holidays. Automation tools must have the Vietnam holiday calendar.

Constraint 2: Round lot (100) vs odd lot

HOSE rules:

  • Round lot: ≥ 100 shares, step 100. Trades in normal session, good liquidity.
  • Odd lot: 1-99 shares. Worse liquidity, requires limit orders.

When you want to buy, say, 250 HPG shares: 200 is round lot (fast), 50 is odd lot (needs specific price).

Good bots will auto-split lots — the user just enters total shares or total VND, the bot handles the rest.

Constraint 3: Tick size

HOSE tick sizes:

  • Price < 10,000đ: step 10đ
  • Price 10,000-50,000đ: step 50đ
  • Price ≥ 50,000đ: step 100đ

Bots must round prices to ticks — wrong tick → exchange rejects.

2 ways to automate DNSE in 2026

Option 1: Roll your own

For developers with time + wanting full control.

You need: deep understanding of DNSE API docs, code the full auth flow, handle sessions / lot splitting / tick rounding / periodic token refresh / holidays, deploy to VPS, monitor.

Effort: ~40-80h initial dev, ~5h/month maintenance.

Pros: free, fully customizable. Cons: time-intensive, you fix when DNSE updates.

Option 2: Use an existing bot (e.g. fastbot)

For traders/investors who want it working now.

You need: sign up for the bot, connect your DNSE account via the settings menu, allow the bot to read OTPs from your email (for periodic auto-refresh of authentication).

Effort: ~10 min setup.

Pros: no code; handles sessions, lot splitting, tick rounding, holidays, auto-refresh; DCA + auto take-profit; unified with Binance + eToro management. Cons: $15/month after 7-day trial; depends on service uptime.

Setting up DNSE in fastbot — high-level flow

Step 1: Connect DNSE account

In the Telegram bot menu: Settings → Connect DNSE → enter DNSE username + password. Bot authenticates with the broker and obtains trading access.

Step 2: Authorize email read (for auto-refresh)

DNSE requires periodic re-authentication via OTP sent to your email. Good bots auto-read that OTP so you don't have to manually input it each time.

You grant the bot Read-only access to your email — the minimum permission needed.

(If you prefer not to grant email access, choose manual OTP mode — the bot sends a reminder when refresh is needed.)

Step 3: Test order (small)

Menu DNSE → Place order → flow:

  • Side: Buy / Sell
  • Symbol: e.g. HPG
  • Order type: Market / Limit
  • Quantity or VND amount
  • Confirm

Test with a small lot (e.g. 100 HPG ~3-4M VND) during session to confirm end-to-end.

Step 4: Set up DCA (optional)

Menu DCA → Create plan → exchange DNSE:

  • Symbol: e.g. HPG
  • Frequency: Monthly
  • Day + time
  • Amount per buy
  • Take-profit % (optional)

Bot buys on schedule, auto-splits lots, logs history, updates average cost basis.

Edge cases good bots handle

ScenarioExpected behavior
DCA scheduled on Sat/Sun/holidaySkip, fire on next business day
Monthly plan day=31 in 30-day monthsFire on last day of month
VND wallet insufficientSkip + notify to top up
Odd-lot order unfilled at session endAuto-cancel + notify
Periodic auth refreshAutomatic via email OTP (transparent)
Symbol temporarily suspendedSpecific error + suggested action

FAQ

Q: Does DNSE charge for API access? A: No, free for DNSE customers. You only pay standard trading fees (~0.15% buy + 0.15% sell + 0.1% income tax on profitable sales).

Q: Can the bot withdraw money from my DNSE account? A: No. DNSE withdrawals go through the Pro Trading UI with a separate OTP per withdrawal. Bots have no withdraw permission.

Q: If DNSE updates the API, do bots break? A: Temporarily possibly. Reputable bots ship updates when DNSE changes (rare — DNSE keeps APIs stable). A self-coded bot has the same problem but you have to fix it yourself.

Q: Can fastbot work with other Vietnamese brokers (SSI, VPS, VND, MBS)? A: Currently DNSE only — the only broker with stable retail API connectivity. Others require complex licensing.

Q: Does it support derivatives / covered warrants? A: Currently spot stocks only (HOSE + HNX). VN30 Index futures aren't supported yet due to liquidity and margin complexity.


Next steps

If you invest in Vietnam stocks via DNSE and want to DCA your favorite tickers automatically, track combined P&L with crypto / US stocks, and place orders from Telegram:

👉 Open fastbot — 7-day free trial.

Next in the series: TradingView webhook to Binance via fastbot.