github.com/diadata-org/diadata@v1.4.593/documentation/index.md (about) 1 # Overview 2 3 Welcome to the [DIAdata.org](https://diadata.org/) platform. DIA is an ecosystem for open financial data in a financial smart contract ecosystem. The target of DIA is to bring together data analysts, data providers and data users. In general, DIA provides a reliable and verifiable bridge between off-chain data from various sources and on-chain smart contracts that can be used to build a variety of financial dApps. 4 5 ### Decentralized Financial Data 6 7 All DIA data points can be used in Ethereum Smart Contracts. We provide oracle solutions to use this financial information in any smart contract. The correctness of oracle data can always be verified by monitoring our off-chain real-time API and the data published in the oracle. 8 9 ## Methodology Documentation 10 11 Currently, DIA collects several classes of data. Separate documentation exists for each of these different use cases. 12 13 * [Exchange Scrapers](methodology/exchangeprices.md) are the components that get trade data from various exchanges and use these trades to construct average prices. 14 * [Supply Scrapers](methodology/supplynumbers.md) are used to determine circulating supply numbers for cryptocurrency assets. 15 * [Oracles](methodology/oracles.md) show how our oracles can be accessed. 16 17 This information varies for each currency and is highly specific. 18 19 ## Coinhub Oracles 20 21 The Coinhub oracles are located in a [single smart contract](https://etherscan.io/address/0xD47FDf51D61c100C447E2D4747c7126F19fa23Ef). This smart contract holds mappings from an index to an asset's name, its price, and supply data. By using `getParameters(asset_index)` it is possible to retrieve this data. Along with the actual data there is a metadata field for the timestamp of the last update. 22 23 Updates are supplied by the DIA Oracle service that periodically supplies updates into the smart contract. In the event view, the latest updates can be seen. The event fields show the values in the following locations: 24 25 * Price in Cent is in the second field \(display as `number`\) 26 * Supply is in the third field \(display as `number`\) 27 * UNIX Timestamp of last update is displayed in the fourth field \(display as `number`\) 28 * Name is displayed in the sixth and last field \(display as `text`\). 29 30 ## API Access 31 32 You can find documnentation for our [live API](https://api.diadata.org/v1) on our [api documentation site](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/documentation/api.md). Several endpoints exist that show the different kind of data we collect: 33 34 When referencing currencies, `{TLA}` has to be replaced by the acronym for an asset \(e.g., BTC for Bitcoin\). 35 36 * Quotations for prices \(SMA120\) can be found at endpoint [https://api.diadata.org/v1/symbol/BTC](https://api.diadata.org/v1/symbol/BTC). 37 * Supply data for crypto assets is located at [https://api.diadata.org/v1/supply/BTC](https://api.diadata.org/v1/supply/BTC) 38 39 Currently, DIA collects data from several crypto exchanges. To get an overview, the latest information about these exchanges can be found in this table: 40 41 | Name | Number of Pairs | API link | 42 | :--- | :--- | :--- | 43 | Binance | [47](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/Binance.json) | [Binance API Documentation](https://github.com/binance-exchange/binance-official-api-docs) | 44 | Bitfinex | [25](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/Bitfinex.json) | [Bitfinex Websocket Documentation](https://docs.bitfinex.com/docs/ws-general) | 45 | Coinbase | [3](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/CoinBase.json) | [Coinbase v2 API](https://developers.coinbase.com/api/v2) | 46 | GateIO | [42](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/GateIO.json) | [Gate.io API Documentation](https://www.gate.io/api2) | 47 | HitBTC | [43](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/HitBTC.json) | [HitBTC API Browser](https://api.hitbtc.com/api/2/explore/) | 48 | Huobi | [40](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/Huobi.json) | [Huobi API Documentation](https://github.com/huobiapi/API_Docs_en/wiki/Huobi.pro-API) | 49 | Kraken | [8](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/Kraken.json) | [Kraken Public API Documentation](https://www.kraken.com/help/api#public-market-data) | 50 | LBank | [20](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/LBank.json) | [LBank API Documentation \(Chinese\)](https://github.com/LBank-exchange/lbank-official-api-docs) | 51 | OKEx | [27](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/OKEx.json) | [OKEx API Documentation \(Chinese\)](https://github.com/okcoin-okex/API-docs-OKEx.com) | 52 | Simex | [14](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/Simex.json) | [Simex API Documentation](https://simex.global/en/docs/introduction) | 53 | ZB.com | [127](https://github.com/diadata-org/diadata/tree/c982072de2ac488c5f0bdf32b677cbac1965583e/documentation/config/ZB.json) | [Zb.com API Documentation \(Chinese\)](https://www.zb.com/i/developer) | 54 55 Here you can find the introduction to the structure of the system and first steps to contribute. 56 57 ## DIA Technical Structure 58 59 DIA is setup as a hybrid system with off-chain components for storing and proceccing large amounts of data and on-chain components providing data sources for financial smart contracts. Currently, Ethereum is used as smart contract plaform because of its widespread use and technical quality, but the DIA system is not limited to one blockchain technology. 60 61 ### Centralized Backend 62 63 For collecting financial data, we use a centralized backend that runs collectors for all kinds of financial data. All collected data is processed by a database setup consisting of a stream-oriented kafka instance and a key-value store for faster access of certain intermediate results. These collectors are separated in different classes: 64 65 * Exchange Scrapers: These collect data from exchanges for cryptocurrencies and other assets \(like stocks, futures, and rare earth metals\). 66 67 Every exchange scraper is run independently and is structured around the idea of `pairs` that are used to indicate the pair of assets that is used in a trade. 68 69 For example, a trade from Bitcoin to US-Dollar is stored under `BTCUSD`. 70 71 * Blockchain Scrapers: These scrapers are used to determine attributes of blockchains. The most prominent attribute is the circulating supply of a cryptocurrency, for which various scrapers already exist. 72 73 Depending on the expected update rate of a blockchain, these scrapers update the backend periodically about their data. 74 75 Blockchain scrapers are run as docker containers that can be managed independently. 76 77 Often, these collect Gigabytes of data over time \(they are dealing with ever-growing blockchains\) and thus should be managed in a separate way not directly baked in the database executable. 78 79 * Quotation Scrapers: They are used to collect official quotations from central trusted providers. 80 81 The first quotations in our database are daily exchange rates from the European Central Bank \(ECB\) against various international currencies. 82 83 ## How to contribute 84 85 DIA is open for anyone to contribute and we always welcome pull requests. We also provide tasks on [Gitcoin](https://gitcoin.co/), a collaboration tool focused on cryptocurrency projects. 86