arsenlosenko / python-ripple-lib Goto Github PK
View Code? Open in Web Editor NEWPython client for the Ripple API
License: MIT License
Python client for the Ripple API
License: MIT License
The Ripple Data API server is not applying the parameters of the RippleDataAPIClient functions
I run a script using this code every day and the the code seemed to be working fine until 2/19/2020.
My environment:
Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Data request using the Data API v2 Tool provided by Ripple [https://xrpl.org/data-api-v2-tool.html#get-account-value-stats] (https://xrpl.org/data-api-v2-tool.html#get-account-value-stats)
URL:
https://data.ripple.com/v2/accounts/rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn/stats/value?limit=2&descending=true&start=2020-02-20T01:00:00Z
Response:
{
"result": "success",
"count": 2,
"marker": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn|20200229000000",
"rows": [
{
"date": "2020-03-02T00:00:00Z",
"account_value": "423.0136879999998",
"balance_change_count": 0
},
{
"date": "2020-03-01T00:00:00Z",
"account_value": "423.0136879999957",
"balance_change_count": 0
}
]
}
When I try the equivalent request with the RippleDataAPIClient:
>>> import pandas as pd
>>> from ripple_api import RippleDataAPIClient
>>> ts = pd.Timestamp("2020-02-20 01:00:00").strftime("%Y-%m-%dT%H:%M:%SZ")
>>> ts
'2020-02-20T01:00:00Z'
>>> acct = "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
>>> api = RippleDataAPIClient("https://data.ripple.com")
>>> api.get_account_value_stats(acct, start=ts, limit=2, descending=True)
Response:
{'result': 'success',
'count': 200,
'marker': 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn|20141215000000',
'rows': [{'date': '2014-05-29T00:00:00Z',
'account_value': '100.0',
'balance_change_count': 1},
{'date': '2014-05-30T00:00:00Z',
'account_value': '100.0',
'balance_change_count': 0},
{'date': '2014-05-31T00:00:00Z',
'account_value': '100.0',
'balance_change_count': 0},
{'date': '2014-06-01T00:00:00Z',
'account_value': '100.0',
'balance_change_count': 0},
... for 196 more records
The Account transaction example seems to be flawed. The message "Invalid parameters."
is all it will produce. I have tried multi servers and multiple account.
Also, the amount
must be a string if I read this correctly in the send_xrp
function.
Can we get an example of a tx query ?
I have tried different combinations of this.
from ripple_api import RippleDataAPIClient
from pprint import pprint
api = RippleDataAPIClient('https://data.ripple.com')
query_params = dict(type='payment')
get_tx = api.get_transactions()
pprint(get_tx)
TypeError: get_transactions() takes 1 positional argument but 2 were given
Hi, I've tried to connect to my node which is running with auth enabled but had no success.
Tried to specify credentials in URL as for basic auth as follows https://user:pass@host:port/ but got:
URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
.
It would be great if RippleRPCClient allowed to specify user and password as parameters to __init__
method, which would be passed then in Request of urllib.
I have noticed that ripple only supports now local signing transactions.
Tries send_xrp method, got an error:
{'status': 'error', 'error': urllib.error.URLError(socket.gaierror(-2, 'Name or service not known'))}
Could someone provide please pythonic ripple transaction signing methods? thanks!
Hi Arsen,
I don't know if you saw, but recently Ripple released an 'official' XRPL python library hosted at the XRP Ledger Foundation's github:
https://pypi.org/project/xrpl-py/
https://github.com/XRPLF/xrpl-py
I noticed your library hasn't been updated in a number of years, and was wondering if you are still maintaining it? Would you be interested in putting a link in your README to xrpl-py which is under active maintenance? I'm happy to submit a PR for this to your repo, but wanted to ask first!
Thanks,
Matt
Hi, I'm trying to use your python-ripple-lib and I'm trying to make trancastion from one account on testnet to another. In the code bellow you can see, that I replace parameters from example by mine parameters, but I didn't figure out what this parameters mean. Would you mind explain it to me what should I insert to parameter seed and url for Account?
`rpc = RippleRPCClient('https://s.altnet.rippletest.net:51234/', username='', password='')
account_info = rpc.account_info('rUjtNMGKsDjaopy6X8wonVPAeWAGzugYiT')
taker = 'rfqRW3XUfB9uib2iMJU7rH1WHEnAtY33nw'
issuer = 'rUjtNMGKsDjaopy6X8wonVPAeWAGzugYiT'
seed = '<account_seed>'
account = Account('http://localhost:5005', issuer, seed)
tx_info = account.send_xrp(issuer=issuer, taker=taker, secret=seed, amount=10)`
Console gives me this error:
{'status': 'error', 'error': URLError(ConnectionRefusedError(61, 'Connection refused'),)}
Currently ledger method only supports ledger_index arguments, rather than both ledger_hash and ledger_index.
Hi. does this library support offline transactions? by offline transactions I mean a transaction that can be signed locally.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.