Skip to content

Commit

Permalink
Revert "[Add] asset transfer function for gateway"
Browse files Browse the repository at this point in the history
This reverts commit 4b869de.
  • Loading branch information
veighna-global committed Apr 6, 2024
1 parent 4b869de commit 1106901
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 55 deletions.
14 changes: 0 additions & 14 deletions vnpy_evo/trader/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,3 @@ class Exchange(Enum):

# Special Function
LOCAL = "LOCAL" # For local generated data


class TransferType(Enum):
"""
Transfer type.
"""
SPOT_TRADING = "spot to trading"
TRADING_SPOT = "trading to spot"

SPOT_LINEAR = "spot to linear"
LINEAR_SPOT = "linear to spot"

SPOT_INVERSE = "spot to inverse"
INVERSE_SPOT = "inverse to spot"
14 changes: 1 addition & 13 deletions vnpy_evo/trader/gateway.py
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 *
28 changes: 0 additions & 28 deletions vnpy_evo/trader/object.py
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

0 comments on commit 1106901

Please sign in to comment.