コード例 #1
0
ファイル: gateways.py プロジェクト: zmpyzmpy/ripple-data
    def get(self):
        """
        Get information about a specific gateway from the Data API's list of
        known gateways.
        """

        return RippleAPI.get_ripple_data(urljoin(str(self), ''))
コード例 #2
0
ファイル: gateways.py プロジェクト: zmpyzmpy/ripple-data
    def gateways(cls):
        """
        Get information about known gateways.
        """

        return RippleAPI.get_ripple_data(
                urljoin(cls.GATEWAYS_URL.format(gateway=''), ''))
コード例 #3
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def get(self):
        """
        Get creation info for a specific ripple account.
        """

        method = ''
        result = RippleAPI.get_ripple_data(urljoin(str(self), method))

        return result['account_data']
コード例 #4
0
ファイル: exchange_rate.py プロジェクト: zmpyzmpy/ripple-data
    def exchange_rates(self):
        """
        Retrieve current Exchange rate for a given currency pair.
        """

        method = sys._getframe().f_code.co_name
        result = RippleAPI.get_ripple_data(str(self), locals())

        return result['rate']
コード例 #5
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def accounts(cls):
        """
        Get info for all account creations.
        """

        method = 'accounts'
        result = RippleAPI.get_ripple_data(
            urljoin(cls.ACCOUNTS_URL.format(address=''), ''))

        return result[method]
コード例 #6
0
    def rippled_versions(cls):
        """
       Reports the latest versions of rippled available from the official
       Ripple Yum repositories.
        """

        method = 'rippled_versions'
        result = RippleAPI.get_ripple_data(urljoin(cls.NETWORK_URL, method))

        return result['rows']
コード例 #7
0
    def exchanges(self, start='', end='', interval='', descending='',
                  reduce='', limit='', marker='', autobridged='', format=''):
        """
        Retrieve Exchanges for a given currency pair over time. Results can be
        returned as individual exchanges or aggregated to a specific list of
        intervals
        """

        method = sys._getframe().f_code.co_name
        result = RippleAPI.get_ripple_data(str(self), locals())

        return result[method]
コード例 #8
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def orders(self,
               ledger_index='',
               ledger_hash='',
               date='',
               limit='',
               format=''):
        """
        Get orders in the order books, placed by a specific account. This does
        not return orders that have already been filled.
        """

        method = sys._getframe().f_code.co_name
        result = RippleAPI.get_ripple_data(urljoin(str(self), method),
                                           locals())

        return result[method]
コード例 #9
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def transaction_stats(self,
                          start='',
                          end='',
                          descending='',
                          limit='',
                          marker='',
                          format=''):
        """
        Retrieve daily summaries of transaction activity for an account.
        """

        method = 'stats/value'
        result = RippleAPI.get_ripple_data(urljoin(str(self), method),
                                           locals())

        return result['rows']
コード例 #10
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def balances(self,
                 ledger_index='',
                 ledger_hash='',
                 date='',
                 currency='',
                 counterparty='',
                 limit='',
                 format=''):
        """
        Get all balances held or owed by a specific XRP Ledger account.
        """

        method = sys._getframe().f_code.co_name
        result = RippleAPI.get_ripple_data(urljoin(str(self), method),
                                           locals())

        return result[method]
コード例 #11
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def balance_changes(self,
                        currency='',
                        counterparty='',
                        start='',
                        end='',
                        descending='',
                        limit='',
                        marker='',
                        format=''):
        """
        Retrieve Balance changes for a given account over time.
        """

        method = sys._getframe().f_code.co_name
        result = RippleAPI.get_ripple_data(urljoin(str(self), method),
                                           locals())

        return result[method]
コード例 #12
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def reports(self,
                currency='',
                counterparty='',
                date='',
                start='',
                end='',
                accounts='',
                payments='',
                descending='',
                format=''):
        """
        Retrieve daily summaries of payment activity for an account.
        """
        # TODO: check date OR start and end

        method = sys._getframe().f_code.co_name
        result = RippleAPI.get_ripple_data(urljoin(str(self), method),
                                           locals())

        return result[method]
コード例 #13
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def exchanges(self,
                  base='',
                  counter='',
                  start='',
                  end='',
                  type='',
                  descending='',
                  limit='',
                  marker='',
                  format=''):
        """
        Retrieve Exchanges for a given account over time.
        """
        # TODO: base, counter implementation

        method = sys._getframe().f_code.co_name
        result = RippleAPI.get_ripple_data(urljoin(str(self), method),
                                           locals())

        return result[method]
コード例 #14
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def payments(self,
                 start='',
                 end='',
                 type='',
                 currency='',
                 issuer='',
                 source_tag='',
                 destination_tag='',
                 descending='',
                 limit='',
                 marker='',
                 format=''):
        """
        Retrieve a payments for a specified account.
        """

        method = sys._getframe().f_code.co_name
        result = RippleAPI.get_ripple_data(urljoin(str(self), method),
                                           locals())

        return result[method]
コード例 #15
0
ファイル: accounts.py プロジェクト: zmpyzmpy/ripple-data
    def transactions(self,
                     start='',
                     end='',
                     min_sequence='',
                     max_sequence='',
                     type='',
                     result='',
                     binary='',
                     descending='',
                     limit='',
                     format=''):
        """
        Retrieve a history of transactions that affected a specific account.
        This includes all transactions the account sent, payments the account
        received, and payments that rippled through the account.
        """
        # TODO: sequence implementation

        method = sys._getframe().f_code.co_name
        result = RippleAPI.get_ripple_data(urljoin(str(self), method),
                                           locals())

        return result[method]
コード例 #16
0
ファイル: currencies.py プロジェクト: zmpyzmpy/ripple-data
    def get(self):
        """
        Retrieve vector icons for various currencies.
        """

        return RippleAPI.get_ripple_data(urljoin(str(self), ''))