---
# System prepended metadata

title: 20210817 Add insturment to symbol table

---

# 20210817 Add insturment to symbol table

1. str2sym to test the symbol exist or not
str2sym FUT_TAIFEX_QFF
str2sym FUT_TAIFEX_PUF

2. Add instrument to .lua file
    * capital-conf/qd/taifex_qd.cpbq.filter.futures.lua   
    * capital-conf/qd/taifexrtqd.cpbq.filter.futures.lua
    * capital-conf/qd/taifexrtqd.cpbq.filter.fut.trades.lua
    * capital-conf/qd/taifex_qd.cptw.filter.futures.lua
    * capital-conf/qd/taifexrtqd.cptw.filter.fut.trades.lua
    * capital-conf/qd/taifexrtqd.cptw.filter.futures.lua

3. Find which machine that you need to push
Notice that the `taifex_qd.cpbq.filter.futures.lua` is included in `taifex_qd.cpbq.futures.lua`, the same pricinple applied to other files. Therefore, we only need to find the `tdconfig` files that include following in `capital-conf/core`:
    * `taifex_qd.cpbq.futures.lua`
    * `taifexrtqd.cpbq.futures.lua`
    * `taifex_qd.cptw.futures.lua`
    * `taifexrtqd.cptw.futures.lua` 
The name of the `tdconfig` file give you the idea of which machine need to be updated. e.g. `tdconfig.trading0.lua` --> `trading0` 

4. Update the databases
There are two databases need to be updated ()
5. 
```
5. tetrion_populate_tickers symbol.extend
6. 
```
Some other notes:
https://groups.google.com/u/1/a/tetrioncapital.com/g/brokenpipe/c/CM9hm0ZEwmI/m/5TmjAi9DAAAJ?pli=1