Пример #1
0
    def __init__(self, node_id: str, buy_price_per_coin: str,
                 cryptocurrency: str, expires_at: int, max_buy: str,
                 max_sell: str, min_buy: str, min_coin_amount: str,
                 min_sell: str, sell_price_per_coin: str, status: str):
        """Create a new BuycoinsPrice object

        Args:
            node_id: the id field of the BuycoinsPrice type
            buy_price_per_coin: the buyPricePerCoin field of the BuycoinsPrice type
            cryptocurrency: the cryptocurrency field of the BuycoinsPrice type
            expires_at: the expiresAt field of the BuycoinsPrice type
            max_buy: the maxBuy field of the BuycoinsPrice type
            max_sell: the maxSel field of the BuycoinsPrice type
            min_buy: the minBuy field of the BuycoinsPrice type
            min_coin_amount: the minCoinAmount field of the BuycoinsPrice type
            min_sell: the minSell field of the BuycoinsPrice type
            sell_price_per_coin: the sellPricePerCoin field of the BuycoinsPrice type
            status: the status field of the BuycoinsPrice type
        """
        self.id = node_id
        self.buy_price_per_coin = buy_price_per_coin
        self.cryptocurrency = Cryptocurrency(cryptocurrency)
        self.expires_at = expires_at
        self.max_buy = max_buy
        self.max_sell = max_sell
        self.min_buy = min_buy
        self.min_coin_amount = min_coin_amount
        self.min_sell = min_sell
        self.sell_price_per_coin = sell_price_per_coin
        self.status = BuycoinsPriceStatus(status)
Пример #2
0
    def __init__(self, node_id: str, address: Address, amount: str,
                 confirmed: bool, created_at: int, cryptocurrency: str,
                 direction: str, onchain_transfer_request_id: str,
                 tx_hash: str):
        """Create a new Transaction object

        Args:
            node_id: the id field of the Transaction type
            address: the address field of the Transaction type
            amount: the amount field of the Transaction type
            confirmed: the confirmed field of the Transaction type
            created_at: the createdAt field of the Transaction type
            cryptocurrency: the cryptocurrency field of the Transaction type
            direction: the direction field of the Transaction type
            onchain_transfer_request_id: the id field of the onchainTransferRequest field of the Transaction type
            tx_hash: the txHash field of the Transaction type
        """
        self.id = node_id
        self.address = address
        self.amount = amount
        self.confirmed = confirmed
        self.created_at = created_at
        self.cryptocurrency = Cryptocurrency(cryptocurrency)
        self.direction = direction
        self.onchain_transfer_request_id = onchain_transfer_request_id
        self.tx_hash = tx_hash
Пример #3
0
 def __init__(self, node_id: str, coin_amount: str, created_at: int,
              cryptocurrency: str, dynamic_exchange_rate: str,
              price_per_coin: str, price_type: str, side: str,
              static_price: str, status: str):
     """
     This initialises a PostOrder object
     Args:
         node_id: the id field of the PostOrder type
         coin_amount: the coin amount field of the PostOrder type
         created_at: the createdAt field of the PostOrder type
         cryptocurrency: the cryptocurrency field of the PostOrder type
         dynamic_exchange_rate: the dynamic exchange rate field of the PostOrder type
         price_per_coin: the price per coin field of the PostOrder type
         price_type: the price type field of the PostOrder type
         side: the side field of the PostOrder type
         static_price: the static price field of the PostOrder type
         status: the status field of the PostOrder type
     """
     self.status = PostOrderStatus(status)
     self.static_price = static_price
     self.side = OrderSide(side)
     self.price_type = price_type
     self.price_per_coin = price_per_coin
     self.dynamic_exchange_rate = dynamic_exchange_rate
     self.cryptocurrency = Cryptocurrency(cryptocurrency)
     self.created_at = created_at
     self.coin_amount = coin_amount
     self.id = node_id
Пример #4
0
    def __init__(self, node_id: str, cryptocurrency: str,
                 confirmed_balance: str):
        """Create a new Account type

        Args:
            node_id: a string representing the id of the Account
            cryptocurrency: the cryptocurrency field of the Account type
            confirmed_balance: the confirmed balance field of the Account type
        """
        self.id = node_id
        self.cryptocurrency = Cryptocurrency(cryptocurrency)
        self.confirmed_balance = confirmed_balance
Пример #5
0
    def __init__(self, node_id: str, address: str, created_at: int,
                 cryptocurrency: str):
        """Create a new Address object

        Args:
            node_id: the id field of the Address object
            address: the address field of the Address object
            created_at: the createdAt field of the Address object
            cryptocurrency: the cryptocurrency field of the Address object
        """
        self.id = node_id
        self.address = address
        self.created_at = created_at
        self.cryptocurrency = Cryptocurrency(cryptocurrency)
Пример #6
0
    def __init__(self, node_id: str, address: str, amount: str,
                 created_at: int, cryptocurrency: str, fee: str, status: str,
                 transaction_id: str):
        """Create a new OnchainTransferRequest type

        Args:
            node_id: the id field of the OnchainTransferRequest type
            address: the address field of the OnchainTransferRequest type
            amount: the amount field of the OnchainTransferRequest type
            created_at: the createdAt field of the OnchainTransferRequest type
            cryptocurrency: the cryptocurrency field of the OnchainTransferRequest type
            fee: the fee field of the OnchainTransferRequest type
            status: the status field of the OnchainTransferRequest type
            transaction_id: the id of the transaction of the OnchainTransferRequest type
        """
        self.id = node_id
        self.address = address
        self.amount = amount
        self.created_at = created_at
        self.cryptocurrency = Cryptocurrency(cryptocurrency)
        self.fee = fee
        self.status = OnchainTransferRequestStatus(status)
        self.transaction_id = transaction_id
Пример #7
0
    def __init__(self, node_id: str, created_at: int, cryptocurrency: str,
                 filled_coin_amount: str, price: BuycoinsPrice, side: str,
                 status: str, total_coin_amount: str):
        """

        Args:
            node_id: the id field of the Order object
            created_at: the createdAt field of the Order object
            cryptocurrency: the cryptocurrency field of the Order object
            filled_coin_amount: the filledCoinAmount field of the Order object
            price: the price field of the Order object
            side: the side field of the Order object
            status: the status field of the Order object
            total_coin_amount: the totalCoinAmount field of the Order object
        """
        self.id = node_id
        self.created_at = created_at
        self.cryptocurrency = Cryptocurrency(cryptocurrency)
        self.filled_coin_amount = filled_coin_amount
        self.price = price
        self.side = OrderSide(side)
        self.status = OrderStatus(status)
        self.total_coin_amount = total_coin_amount