Exemplo n.º 1
0
    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), ''))
Exemplo n.º 2
0
    def gateways(cls):
        """
        Get information about known gateways.
        """

        return RippleAPI.get_ripple_data(
                urljoin(cls.GATEWAYS_URL.format(gateway=''), ''))
Exemplo n.º 3
0
    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']
Exemplo n.º 4
0
    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']
Exemplo n.º 5
0
    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]
Exemplo n.º 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']
Exemplo n.º 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]
Exemplo n.º 8
0
    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]
Exemplo n.º 9
0
    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']
Exemplo n.º 10
0
    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]
Exemplo n.º 11
0
    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]
Exemplo n.º 12
0
    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]
Exemplo n.º 13
0
    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]
Exemplo n.º 14
0
    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]
Exemplo n.º 15
0
    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]
Exemplo n.º 16
0
    def get(self):
        """
        Retrieve vector icons for various currencies.
        """

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