-
Notifications
You must be signed in to change notification settings - Fork 864
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
1,252 additions
and
1,410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
POST http://127.0.0.1:8090/api/trading/query_stock_quotes | ||
accept: application/json | ||
Content-Type: application/json | ||
|
||
{ | ||
"tag": "材料", | ||
"limit": 500, | ||
"order_by_field": "change_pct" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
from zvt.autocode import gen_exports | ||
|
||
if __name__ == "__main__": | ||
gen_exports(dir_path="./zvt_vip/dataset") | ||
gen_exports(dir_path="./zvt_vip/recorders") | ||
gen_exports(dir_path="./zvt_vip/tag") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
from typing import Optional | ||
|
||
from zvt import zvt_env | ||
from zvt.broker.qmt.qmt_account import QmtStockAccount | ||
|
||
|
||
class QmtContext(object): | ||
def __init__(self): | ||
self.qmt_account: Optional[QmtStockAccount] = None | ||
|
||
|
||
qmt_context = QmtContext() | ||
|
||
|
||
def init_qmt_account(qmt_mini_data_path=None, qmt_account_id=None): | ||
if not qmt_mini_data_path: | ||
qmt_mini_data_path = zvt_env["qmt_mini_data_path"] | ||
if not qmt_account_id: | ||
qmt_account_id = zvt_env["qmt_account_id"] | ||
qmt_context.qmt_account = QmtStockAccount( | ||
path=qmt_mini_data_path, account_id=qmt_account_id, trader_name="zvt", session_id=None | ||
) | ||
|
||
|
||
init_qmt_account() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
class TraderError(Exception): | ||
"""Base class for exceptions in this module.""" | ||
|
||
pass | ||
|
||
|
||
class QmtError(TraderError): | ||
def __init__(self, message="qmt error"): | ||
self.message = message | ||
|
||
|
||
class PositionOverflowError(TraderError): | ||
def __init__(self, message="超出仓位限制"): | ||
self.message = message |
Oops, something went wrong.