Jump to content
dvilela

TestNet issuers for currency conversion

Recommended Posts

I'm trying to test currency conversion (circular payments) on the TestNet, but I'm not sure where can I get the issuers from (for example, for USD). I've tried using get_top_currencies (Data API) within the TestNet to check if I can get a list of token issuers to test with, but all I get is "unable to retrieve top currencies" error. Any idea?

Share this post


Link to post
Share on other sites

Circular payments are not implemented.

You can run an instance of the DataAPI yourself and point it at your own server(s), I'm not sure if Ripple's instance has reliable data for TestNet.

Share this post


Link to post
Share on other sites
53 minutes ago, Sukrim said:

Circular payments are not implemented.

You mean only in TestNet, right? Or not implemented as in "not implemented also in the MainNet"? Thanks for your answer.

Share this post


Link to post
Share on other sites
25 minutes ago, dvilela said:

You mean only in TestNet, right? Or not implemented as in "not implemented also in the MainNet"? Thanks for your answer.

Also in main net (https://github.com/ripple/rippled/issues/1257).

BTW to test you can issue your own USD, or any other currency, and place orders yourself, maybe with different accounts.

Edited by tulo

Share this post


Link to post
Share on other sites
1 hour ago, tulo said:

Also in main net (https://github.com/ripple/rippled/issues/1257).

BTW to test you can issue your own USD, or any other currency, and place orders yourself, maybe with different accounts.

Thanks. There's still something I don't get. The first first comment in that thread says "circular payments are when the source and destination currencies are the same IOU but with a path that is not empty", but that differs (as I understand it) from what the documentation states: 

"Currency conversion: consumes offers in the decentralized exchange to convert one currency to another, possibly taking arbitrage  opportunities. The Amount and SendMax cannot both be XRP. Also called a circular payment because it delivers money to the sender. The Data API tracks this type of transaction as an "exchange" and not a "payment"."

If I understood it correctly, currency conversion lets you send some IOU and get another, so it's an automatic token exchange, right? The source and destination addresses are the same, not the source and destination currencies.

Share this post


Link to post
Share on other sites

The documentation is incorrect then, I would call that a self-payment, not a circular payment (since the start point and the end point of the path might be the same account, but not the same currency).

Share this post


Link to post
Share on other sites

So, what's the proper (and simplest) way to do a currency exchange (i.e, I want to send at most X USD to buy Y XRP). Is it neccesary to create an offer in the order book or is there any automatic way of doing it? Should I call path_find and use the result in a new transaction?

Share this post


Link to post
Share on other sites
1 hour ago, dvilela said:

So, what's the proper (and simplest) way to do a currency exchange (i.e, I want to send at most X USD to buy Y XRP). Is it neccesary to create an offer in the order book or is there any automatic way of doing it? Should I call path_find and use the result in a new transaction?

offercreate and path payment both can do it, call path_find maybe you can find a more cheap path and convert currency in only one tx.

Share this post


Link to post
Share on other sites
  • If you want to do instantly you can either place an offer based on the current price and be sure it's matched or make a payment to yourself with a path. The path can be a simple one (for example USD-->XRP) or a more complex one (USD-->CNY-->BTC-->XRP). Paths are a bit a pain in the a$$.
  • If you want to do it at a good price which doesn't match current price on orderbooks, you can simply leave an offer absed on your best price and hope that it gets matched sooner or later.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...