Skip to content

Commit ce74226

Browse files
committed
加入toCsv param說明
1 parent 62aa8ae commit ce74226

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

api.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_pyramid_arithmetic(
4242
fltIncrementAmountMinimum:float,
4343
fltOrderAmountArithmeticParam:float,
4444
fltOrderAmountInit:float=1.0,
45-
toCsv:bool=False
45+
toCsv:bool=True
4646
)->dict:
4747
"""
4848
等差金字塔 <br>
@@ -55,6 +55,7 @@ def get_pyramid_arithmetic(
5555
金字塔放大倍數 = 總預算 / dic_單位等差金字塔下單資料["總金額"] <br>
5656
本階單位數 = (起始單位數 + (下單數量等差參數 * i) ) * 金字塔放大倍數 e.g. 1 <br>
5757
:param fltOrderAmountInit=1.0:起始單位數 <br>
58+
:param toCsv: 是否輸出csv檔案, 預設 true 為 輸出csv <br>
5859
:return: e.g.
5960
{
6061
"各階資料": [
@@ -141,7 +142,7 @@ def get_pyramid_geometric(
141142
fltIncrementAmountMinimum:float,
142143
fltOrderAmountGeometicParam:float,
143144
fltOrderAmountInit:float=1.0,
144-
toCsv:bool=False
145+
toCsv:bool=True
145146
)->dict:
146147
"""
147148
等比金字塔 <br>
@@ -152,6 +153,7 @@ def get_pyramid_geometric(
152153
:param fltIncrementAmountMinimum:最小增量 <br>
153154
:param fltOrderAmountGeometicParam:等比增量算式參數, e.g. 2倍 <br>
154155
:param fltOrderAmountInit=1.0:起始單位數 <br>
156+
:param toCsv: 是否輸出csv檔案, 預設 true 為 輸出csv <br>
155157
:return: e.g.
156158
"各階資料": [{
157159
"1": {

readme.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Call api, and get result. <br>
55
For api doc, refer to [https://apialgorithms.yuehchengchang.repl.co/docs#/](https://apialgorithms.yuehchengchang.repl.co/docs#/) <br>
66
# Changelog
77

8+
## 20221020
9+
- 加入累計跌幅百分比
10+
- 加入csv下載功能
811
## 20220707
912
- Pyramid - arithmetic: get買入等差金字塔(flt_總預算,flt_起始價格, flt最終價格, int_交易次數, flt_最小增加數量, flt_下單數量等差參數, flt_起始單位數=1)
1013
- Pyramid - geometric: get買入等比金字塔(flt_總預算,flt_起始價格, flt最終價格, int_交易次數, flt_最小增加數量, flt_下單數量等比參數, flt_起始單位數=1)

0 commit comments

Comments
 (0)