---
# System prepended metadata

title: A time bot
tags: [user stories]

---

---
tags: user stories
title: A time bot
description: A bot, that gives different answer based on time of the day or date
---

# Intro

We propose a bot / automated system, that can provide information around:

- BSE / NSE holidays
- Settlement holidays
- Bank holidays
- Which NAV would you get if you place an order now?
- When would I get redemption credit in bank / trading account?
- When would I see the stock in my demat account, that I had purchased today?

Responses to these queries depend on current date & time, and operational knowledge.

A bot is perfectly suitable to answer these. One can even cross-check their understanding with the bot.

# Example Usage


![](https://i.imgur.com/p8hDgDT.png)


- For effective NAV time

   | Query | Invocation | Result |
   | -------- | -------- | -------- |
   | _Hey guys, if I place an order now, which NAV would I get?_     | `/nav time:now`     | `Hey @user, if you place an order now, as it's 11:30 a.m. IST, and markets are open, you'd get NAV of today. Pick a payment mode, that ensures your money reaches the AMC before 2:30 p.m. today. Netbanking or NEFT should be fine. The NAV would be published later tonight.`     |
   

   Other possibilities:

    - **Debt fund** `/nav time:now type:debt`
      
      _Markets are open today, but it's a bank holiday, hence you'd receive tomorrow's NAV, when debt markets open._

    - **Liquid / Overnight fund** `/nav time:now type: liquid`

    
       _With Liquid fund / Overnight fund, the accounting works a bit differently. You'd get yesterday's NAV. Unless it's a Friday. In which case, you would probably get Sunday's NAV._


    - **After hours** `/nav`
      
      _Hey, markets are closed now. If you are placing an order now, it'd only be processed tomorrow / 12th April, when markets open_.

   - **Amount higher than 2L** `/nav amount:>2L`

      _Hey there, as  you are placing an order above 2L, the cutoff time is 2 p.m. - AMC needs to get your money before 2:00 p.m. in their account. If you want today's NAV, better use a payment mode like RTGS, or Netbanking, which allows you to transfer that much with a higher third-party limit_.

   - **Order placed yesterday** `/nav time:-1d`

     _As you've placed this order yesterday, and yesterday was a holiday, it'd only be processed today, after markets open. If your amount reaches AMC before 2:30 p.m. IST, you'd receive today's NAV_.



The `/nav` API takes following arguments:

- **`time`**

   When the order was placed / triggered. Default value is `now` or `Date.now()`, if not provided.

   Allowed values: `now`, `1h`, `-1h`, `-1d`, `1d`, `-2d`, `2d` etc.

   One could also provide exact time as `yesterday 3:30p.m.` or `yesterday 15:30`.

- **`amount`**

  Amount used for the order.

  Values allowed: `10k`, `1L`, `1.5L`, `2000`, `₹2,000`.

  Default value: `₹100,000`
     
- **`type`**

  Default is `equity` or `E`.

   Other allowed values: `debt`, `D`, `liquid`, `overnight`, `ust`, `st`, `gilt` (case insensitive).

  ---
  
# Wrapping Up

Since this slash command can take more than one argument, we need _sane defaults_.

By default, we assume, it's an equity fund order, being placed now, and amount is below 2L.

Similarly, we assume sane defaults for other arguments.

For every reply where a default was assumed, bot should share the option on _how to invoke if you meant something else_, and a link to its documentation.


