---
# System prepended metadata

title: API測試紀錄留存

---

# API測試紀錄留存

## API測試紀錄留存

- 時間點
- 身分字號
- 券商代號
- 帳號
- IP
- API
- 帳號市場別
- 函式對應動作 (login、place_order)
- 函式 (python: login, place_order | T4: init_t4, stock_order2, future_order, option_order ...)
- 函式留存內容 (json format)


## 登入

### input (python)

- person_id

### intermediate (python)

- datetime
- IP (from solace)

### save to table

- 時間點: datetime
- 身分字號: person_id
- 券商代號: ""
- 帳號: ""
- IP: IP
- API: python
- 帳號市場別: ""
- 函式對應動作: login
- 函式: login
- 函式留存內容: {}



## 下單

### input (python)

- person_id
- broker_id
- account_id
- account_type (stock, future)
- code
- action # Buy, Sell
- price
- quantity
- price_type # LMT, MKT, MKP
- order_type # ROD, IOC, FOK

### intermediate (python)

- datetime
- IP (from solace)

### save to table

- 時間點: datetime
- 身分字號: person_id
- 券商代號: broker_id
- 帳號: account_id
- IP: IP
- API: python
- 帳號市場別: account_type
- 函式對應動作: place_order
- 函式: place_order
- 函式留存內容: {"code":code, "action":action, "price":price, "quantity":quantity, "price_type":price_type, "order_type":order_type}