shioaji 永豐API
Quick Start
1 | !pip install shioaji |
Login
1 | import shioaji as sj |
Logout
1 | api.logout() |
下單
1 | # contract - 合同 |
contract
Order Attributes
price
(float
orint
): the price of orderquantity
(int
): the quantity of orderaction
(str
): order action to buy or sell- {Buy, Sell}
price_type
(str
): pricing type of order- {LMT, MKT, MKP} (限價、市價、範圍市價)
order_type
(str
): the type of order- {ROD, IOC, FOK} (掛單到收盤,允許部分成交,全部成交否則取消)
order_cond
(str
): order condition stock only- {Cash, MarginTrading, ShortSelling} (現股、融資、融券)
order_lot
(str
): the type of order- {Common, Fixing, Odd, IntradayOdd} (整股、定盤、盤後零股、盤中零股)
daytrade_short
{bool
}: the type of first sell
{True, False}
custom_field
{str
}: memo field, only letters and numbers are allowed, and the maximum length is 6.account
(:obj
:Account): which account to place this orderca
(binary
): the ca of this order
本部落格所有文章除特別聲明外,均採用 CC BY-NC-SA 4.0 許可協議。轉載請註明來自 Imisky!
評論