Login API
Before using functions in conrich, we need to initiate the trade API object and login to it with your ID and passwords.
Requirement
- Check is your account is activated for API trading.
- If not, please contact us.
- Check is the certificate expired.
- If certificate is expired, reapply from here Certuficate Enrollment System.
Stock
from conrich import StockAPI
agent = StockAPI()
agent.login("YOUR_PERSON_ID", "YOUR_PASSWORD")
Successfully log in
Futures
from conrich import FuturesAPI
agent = FuturesAPI()
agent.login("YOUR_PERSON_ID", "YOUR_PASSWORD")
Foreign Futures
from conrich import ForeignFuturesAPI
agent = ForeignFuturesAPI()
agent.login("YOUR_PERSON_ID", "YOUR_PASSWORD")