For example, I see a few here: https://coinmarketcap.com/exchanges/stellar-decentralized-exchange/
Are there more, and if so what's the data source?
Thank you.
For example, I see a few here: https://coinmarketcap.com/exchanges/stellar-decentralized-exchange/
Are there more, and if so what's the data source?
Thank you.
An asset on the stellar network is defined by its asset code (max 12 characters long code) and issuer. For example CNY and Ripplefox (GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX).
If you have access to a stellar-core instance database, the orderbook is contained in the offers
table of the score
database. The table schema is the following:
Table "public.offers"
Column | Type | Modifiers
------------------+-----------------------+-----------
sellerid | character varying(56) | not null
offerid | bigint | not null
sellingassettype | integer | not null
sellingassetcode | character varying(12) |
sellingissuer | character varying(56) |
buyingassettype | integer | not null
buyingassetcode | character varying(12) |
buyingissuer | character varying(56) |
amount | bigint | not null
pricen | integer | not null
priced | integer | not null
price | double precision | not null
flags | integer | not null
lastmodified | integer | not null
To get a list of all unique asset pair, we run the following sql query:
select distinct sellingassettype, sellingassetcode, sellingissuer,
buyingassettype, buyingassetcode, buyingissuer
from offers;
Which returns around 216 assets pairs.
While the columns assetcode and issuer are self-explanatory, assettype may need some explanation. At the low-level stellar has 3 assets: Native, and 2 for Credit assets (one with code of maximum 4 characters, another with maximum 12). In the database, assettype = 0
is the native assets (Lumens), 1 is the 4 char code asset, and 2 is the 12 char code asset.
From the same table, you can extract the orderbook data you need for each individual asset.
Agree with the other answer - looking into internal database is the easiest and most comprehensive way.
But if you don't run your own node, then you could just query horizon:
https://horizon.stellar.org/assets?limit=100&cursor=0
and then request orderbook
for each pair you're interested in
StellarTerm maintains and uses a list of pairs in the stellarterm directory here.
There's a pretty good list here on StellarExpert.