-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[Add] asset transfer function for gateway"
This reverts commit 4b869de.
- Loading branch information
1 parent
4b869de
commit 1106901
Showing
3 changed files
with
1 addition
and
55 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
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 |
---|---|---|
@@ -1,13 +1 @@ | ||
from vnpy.trader.gateway import BaseGateway as BaseGateway_ | ||
|
||
from .object import TransferRequest, TransferData | ||
|
||
|
||
class BaseGateway(BaseGateway_): | ||
"""Add extra functions for standard gateway""" | ||
|
||
def transfer_asset(self, req: TransferRequest) -> TransferData: | ||
""" | ||
Send a asset transfer request to server. | ||
""" | ||
pass | ||
from vnpy.trader.gateway import * |
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 |
---|---|---|
@@ -1,29 +1 @@ | ||
from dataclasses import dataclass | ||
|
||
from vnpy.trader.object import * | ||
|
||
from .constant import TransferType | ||
|
||
|
||
@dataclass | ||
class TransferRequest: | ||
""" | ||
Request sending to specific gateway for transferring fund. | ||
""" | ||
|
||
asset: str | ||
volume: int | ||
type: TransferType | ||
|
||
|
||
@dataclass | ||
class TransferData: | ||
""" | ||
Transfer data contains information for tracking lastest status | ||
of a specific transfer. | ||
""" | ||
|
||
transferid: str | ||
asset: str | ||
volume: int | ||
type: TransferType |